org.jibx.schema.validation
Class RegistrationVisitor

java.lang.Object
  extended by org.jibx.schema.SchemaVisitor
      extended by org.jibx.schema.validation.RegistrationVisitor

public class RegistrationVisitor
extends SchemaVisitor

Visitor for handling registration. This records the names for each child element of the schema in the validation context. TODO: need to implement two-pass handling, the first to get the definitions and the second to handle the imports, so that circular imports will be processed correctly.


Field Summary
private  ValidationContext m_context
          Validation context.
 
Constructor Summary
RegistrationVisitor(ValidationContext context)
          Constructor.
 
Method Summary
 void exit(SchemaLocationBase node)
          Exit schema location element.
 void run(SchemaElement root, TreeWalker tctx)
          Run registration.
 boolean visit(AttributeElement node)
          Visit attribute element.
 boolean visit(AttributeGroupElement node)
          Visit attributeGroup element for definition.
 boolean visit(ComplexTypeElement node)
          Visit complexType element.
 boolean visit(ElementElement node)
          Visit element element.
 boolean visit(GroupElement node)
          Visit group element for definition.
 boolean visit(SchemaBase node)
          Visit element.
 boolean visit(SchemaElement node)
          Visit schema element.
 boolean visit(SchemaLocationBase node)
          Visit schema location element.
 boolean visit(SimpleTypeElement node)
          Visit simpleType element.
 
Methods inherited from class org.jibx.schema.SchemaVisitor
exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, exit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_context

private final ValidationContext m_context
Validation context.

Constructor Detail

RegistrationVisitor

public RegistrationVisitor(ValidationContext context)
Constructor.

Parameters:
context -
Method Detail

run

public void run(SchemaElement root,
                TreeWalker tctx)
Run registration.

Parameters:
root - schema element to be validated
tctx - tree context

visit

public boolean visit(SchemaBase node)
Description copied from class: SchemaVisitor
Visit element. This method will be called for every element in the model. The default implementation just returns true to continue expansion of the tree.

Overrides:
visit in class SchemaVisitor
Parameters:
node - element being visited
Returns:
true if children to be processed, false if not

visit

public boolean visit(AttributeElement node)
Description copied from class: SchemaVisitor
Visit attribute element.

Overrides:
visit in class SchemaVisitor
Parameters:
node - element being visited
Returns:
true if children to be processed, false if not

visit

public boolean visit(AttributeGroupElement node)
Description copied from class: SchemaVisitor
Visit attributeGroup element for definition.

Overrides:
visit in class SchemaVisitor
Parameters:
node - element being visited
Returns:
true if children to be processed, false if not

visit

public boolean visit(ComplexTypeElement node)
Description copied from class: SchemaVisitor
Visit complexType element.

Overrides:
visit in class SchemaVisitor
Parameters:
node - element being visited
Returns:
true if children to be processed, false if not

visit

public boolean visit(ElementElement node)
Description copied from class: SchemaVisitor
Visit element element.

Overrides:
visit in class SchemaVisitor
Parameters:
node - element being visited
Returns:
true if children to be processed, false if not

visit

public boolean visit(GroupElement node)
Description copied from class: SchemaVisitor
Visit group element for definition.

Overrides:
visit in class SchemaVisitor
Parameters:
node - element being visited
Returns:
true if children to be processed, false if not

visit

public boolean visit(SchemaElement node)
Description copied from class: SchemaVisitor
Visit schema element.

Overrides:
visit in class SchemaVisitor
Parameters:
node - element being visited
Returns:
true if children to be processed, false if not

visit

public boolean visit(SchemaLocationBase node)
Description copied from class: SchemaVisitor
Visit schema location element.

Overrides:
visit in class SchemaVisitor
Parameters:
node - element being visited
Returns:
true if children to be processed, false if not

visit

public boolean visit(SimpleTypeElement node)
Description copied from class: SchemaVisitor
Visit simpleType element.

Overrides:
visit in class SchemaVisitor
Parameters:
node - element being visited
Returns:
true if children to be processed, false if not

exit

public void exit(SchemaLocationBase node)
Description copied from class: SchemaVisitor
Exit schema location element.

Overrides:
exit in class SchemaVisitor
Parameters:
node - element being exited


Project Web Site