com.oxygenxml.validate.nvdl
Class ValidatorImpl.Section

java.lang.Object
  extended by com.oxygenxml.validate.nvdl.ValidatorImpl.Section
All Implemented Interfaces:
SectionState
Enclosing class:
ValidatorImpl

private class ValidatorImpl.Section
extends Object
implements SectionState

Store section information.


Field Summary
(package private)  Vector activeHandlers
          List of the ContentHandlers that want to see the elements in this section
(package private)  Vector activeHandlersAttributeModeUsage
           
(package private)  int attributeProcessing
          Max attribute processing value from all modes in this section.
(package private)  Vector attributeValidationModeUsages
           
(package private)  Vector childPrograms
          List of Programs saying what to do with child sections
(package private)  Stack context
          Keep the context stack if we have a context dependent section.
(package private)  boolean contextDependent
          Flag indicating is this section depends on context or not.
(package private)  int depth
          Number of open elements in this section.
(package private)  String ns
          Namespace of this section.
(package private)  ValidatorImpl.Section parent
          The parent section.
(package private)  Vector placeholderHandlers
          Stores the attach placeholder handlers.
(package private)  Vector placeholderModeUsages
          Stores the attach place holder mode usages.
(package private)  Vector schemas
           
(package private)  Vector validators
          List of the Validators rooted in this section
 
Constructor Summary
ValidatorImpl.Section(String ns, ValidatorImpl.Section parent)
          Creates a section for a given namespace and links to to its parent section.
 
Method Summary
 void addActiveHandler(ContentHandler handler, ModeUsage attributeModeUsage)
          Adds a handler for a mode usage.
 void addAttributeValidationModeUsage(ModeUsage modeUsage)
          Adds a mode usage to the attributeValidationModeUsages list if we process attributes.
 void addChildMode(ModeUsage modeUsage, ContentHandler handler)
           
 void addValidator(Schema schema, ModeUsage modeUsage)
          Adds a validator.
 void attachPlaceholder(ModeUsage modeUsage, ContentHandler handler)
           
 void reject()
          Reject content, report an error.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

final ValidatorImpl.Section parent
The parent section.


ns

final String ns
Namespace of this section. Empty string for absent.


depth

int depth
Number of open elements in this section.


validators

final Vector validators
List of the Validators rooted in this section


schemas

final Vector schemas

activeHandlers

final Vector activeHandlers
List of the ContentHandlers that want to see the elements in this section


activeHandlersAttributeModeUsage

final Vector activeHandlersAttributeModeUsage

attributeValidationModeUsages

final Vector attributeValidationModeUsages

childPrograms

final Vector childPrograms
List of Programs saying what to do with child sections


context

final Stack context
Keep the context stack if we have a context dependent section.


contextDependent

boolean contextDependent
Flag indicating is this section depends on context or not.


attributeProcessing

int attributeProcessing
Max attribute processing value from all modes in this section.


placeholderHandlers

final Vector placeholderHandlers
Stores the attach placeholder handlers.


placeholderModeUsages

final Vector placeholderModeUsages
Stores the attach place holder mode usages.

Constructor Detail

ValidatorImpl.Section

ValidatorImpl.Section(String ns,
                      ValidatorImpl.Section parent)
Creates a section for a given namespace and links to to its parent section.

Parameters:
ns - The section namespace.
parent - The parent section.
Method Detail

addChildMode

public void addChildMode(ModeUsage modeUsage,
                         ContentHandler handler)
Specified by:
addChildMode in interface SectionState
Parameters:
modeUsage - The mode usage that determines the next mode.
handler - The content handler that receives notifications.

addValidator

public void addValidator(Schema schema,
                         ModeUsage modeUsage)
Adds a validator.

Specified by:
addValidator in interface SectionState
Parameters:
schema - The schema to validate against.
modeUsage - The mode usage for this validate action.

addActiveHandler

public void addActiveHandler(ContentHandler handler,
                             ModeUsage attributeModeUsage)
Adds a handler for a mode usage.

Specified by:
addActiveHandler in interface SectionState
Parameters:
handler - The content handler to be added.
attributeModeUsage - The mode usage.

addAttributeValidationModeUsage

public void addAttributeValidationModeUsage(ModeUsage modeUsage)
Adds a mode usage to the attributeValidationModeUsages list if we process attributes.

Specified by:
addAttributeValidationModeUsage in interface SectionState

reject

public void reject()
            throws SAXException
Reject content, report an error.

Specified by:
reject in interface SectionState
Throws:
SAXException

attachPlaceholder

public void attachPlaceholder(ModeUsage modeUsage,
                              ContentHandler handler)
Specified by:
attachPlaceholder in interface SectionState