Class ModelGroupDefinition

    • Constructor Detail

      • ModelGroupDefinition

        public ModelGroupDefinition​(EnterpriseConfiguration config,
                                    javax.xml.transform.SourceLocator locator)
        Creates a new Model Group definition
        Parameters:
        config - the Configuration to which this Model Group definition belongs
        locator - the source location of the model group definition
    • Method Detail

      • setRedefinedModelGroupDefinition

        public void setRedefinedModelGroupDefinition​(ModelGroupDefinition other)
        Set the model group definition that this one redefines. Only set if this is a redefining model group that does not contain a self-reference; in this case validate() must check that it is a valid refinement
        Parameters:
        other - the model group that this one redefines
      • setModelGroupName

        public void setModelGroupName​(StructuredQName nameCode)
      • getName

        public java.lang.String getName()
        Returns the local part of the name of this named Group.
        Returns:
        the local name of this named Group.
      • getTargetNamespace

        public java.lang.String getTargetNamespace()
        Returns the namespace URI of the name of this named Group.
        Returns:
        the namespace URI of this named Group: null if the group is in no namespace
      • isPointless

        public boolean isPointless​(ModelGroup container)
        Test whether the compositor is pointless, as described in XML Schema Part 1 Schema Component Constraint: Particle Valid (Restriction)
        Overrides:
        isPointless in class ModelGroup
        Parameters:
        container - the particle that contains this model group definition
        Returns:
        true if this compositor is pointless
      • lookForCycles

        public void lookForCycles​(java.util.Stack<SchemaComponent> references,
                                  SchemaCompiler compiler)
                           throws SchemaException
        This method is called to look for cycles. The object implementing this method is required (a) to raise an exception if the object itself appears in the list of references, (b) to add itself to the list of references, and (c) to call the lookForCycles method on all the objects that it references.
        Specified by:
        lookForCycles in interface UserSchemaComponent
        Overrides:
        lookForCycles in class ModelGroup
        Parameters:
        references - A list of objects that contain direct or indirect references to this object, and that must therefore not be referred to from this object.
        compiler - used for error reporting
        Throws:
        SchemaException - if cycles are found
      • isSameGroup

        public boolean isSameGroup​(ModelGroupDefinition other)
        Test whether this is the same group as another group. They are considered to be the same type if they are derived from the same type definition in the original XML representation (which can happen when there are multiple includes of the same file)
        Parameters:
        other - the other group
        Returns:
        true if the groups are the same
      • getCompositorName

        public java.lang.String getCompositorName()
        Description copied from class: ModelGroup
        Get the name of the compositor used in this model group
        Specified by:
        getCompositorName in class ModelGroup
        Returns:
        one of "sequence", "choice", or "all"
      • getComponentAsFunction

        public Function getComponentAsFunction()
        Description copied from interface: SchemaComponent
        Get the schema component in the form of a function item. This allows schema information to be made visible to XSLT or XQuery code. The function makes available the contents of the schema component as defined in the XSD specification. The function takes a string as argument representing a property name, and returns the corresponding property of the schema component. There is also a property "class" which returns the kind of schema component, for example "Attribute Declaration".
        Specified by:
        getComponentAsFunction in interface SchemaComponent
        Overrides:
        getComponentAsFunction in class ModelGroup
        Returns:
        the schema component represented as a function from property names to property values.