org.jibx.binding.model
Class RegistrationVisitor

java.lang.Object
  extended by org.jibx.binding.model.ModelVisitor
      extended by org.jibx.binding.model.RegistrationVisitor

public class RegistrationVisitor
extends ModelVisitor

Model visitor for handling item registration. This works with the ValidationContext class to handle registration of items which can be referenced by name or by function (such as ID values within an object structure). The only items of this type which are not handled by this visitor are format definitions. The formats need to be accessed during prevalidation, so they're registered during that pass.

Author:
Dennis M. Sosnoski

Field Summary
private  ValidationContext m_context
          Validation context running this visitor.
 
Constructor Summary
RegistrationVisitor(ValidationContext vctx)
          Constructor.
 
Method Summary
 boolean visit(ContainerElementBase node)
          Visit container element.
 boolean visit(MappingElementBase node)
          Visit mapping element.
 boolean visit(TemplateElement node)
          Visit template element.
 boolean visit(TemplateElementBase node)
          Visit template element.
 void visitTree(ElementBase root)
          Visit binding model tree to handle registration.
 
Methods inherited from class org.jibx.binding.model.ModelVisitor
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
 
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 running this visitor.

Constructor Detail

RegistrationVisitor

public RegistrationVisitor(ValidationContext vctx)
Constructor.

Parameters:
vctx - validation context that will run this visitor
Method Detail

visitTree

public void visitTree(ElementBase root)
Visit binding model tree to handle registration.

Parameters:
root - node of tree to be visited

visit

public boolean visit(ContainerElementBase node)
Description copied from class: ModelVisitor
Visit container element. This method will be called for any form of container element.

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

visit

public boolean visit(TemplateElementBase node)
Description copied from class: ModelVisitor
Visit template element. This method will be called for any form of template element.

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

visit

public boolean visit(MappingElementBase node)
Description copied from class: ModelVisitor
Visit mapping element.

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

visit

public boolean visit(TemplateElement node)
Description copied from class: ModelVisitor
Visit template element.

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


Project Web Site