Class SchemaContextTracker

  • All Implemented Interfaces:
    ISchemaListener
    Direct Known Subclasses:
    ValidationContext

    public class SchemaContextTracker
    extends Object
    implements ISchemaListener
    Current schema name context tracker. This tracks the current schema and the name register associated with that schema.
    • Field Detail

      • m_nameRegister

        protected NameRegister m_nameRegister
        Schema global name register.
    • Constructor Detail

      • SchemaContextTracker

        public SchemaContextTracker()
        Constructor.
    • Method Detail

      • getNameRegister

        public NameRegister getNameRegister()
        Get name register. This requires the name register to have been set, throwing an exception if it has not.
        Returns:
        name register (never null)
      • setNameRegister

        public void setNameRegister​(NameRegister reg)
        Set name register. This is provided for cases where components are being processed individually, so that the user can set the appropriate register for a component directly.
        Parameters:
        reg - Name Register
      • getCurrentSchema

        public SchemaElement getCurrentSchema()
        Get current schema element. This requires the schema to have been set, throwing an exception if it has not.
        Returns:
        current schema element (never null)
      • clearTraversed

        public void clearTraversed()
        Clear the set of schemas that have been traversed. This must be called between passes on a set of schemas, so that all the schemas will again be processed in the new pass.
      • enterSchema

        public boolean enterSchema​(SchemaElement schema)
        Description copied from interface: ISchemaListener
        Enter schema. This is called before beginning the traversal of a schema, including both standalone schemas and referenced schemas.
        Specified by:
        enterSchema in interface ISchemaListener
        Parameters:
        schema - Schema
        Returns:
        true if schema should be entered, false if not
      • exitSchema

        public void exitSchema()
        Description copied from interface: ISchemaListener
        Exit schema. This is called when the tranversal of a schema is completed.
        Specified by:
        exitSchema in interface ISchemaListener