Interface ContentModelGroup

    • Method Detail

      • addElementDecl

        void addElementDecl​(ElementDecl elementDecl)
                     throws SchemaException
        Adds the given ElementDecl to this ContentModelGroup.
        Parameters:
        elementDecl - the ElementDecl to add
        Throws:
        SchemaException - when an ElementDecl already exists with the same name as the given ElementDecl
      • removeElementDecl

        boolean removeElementDecl​(ElementDecl elementDecl)
        Removes the given ElementDecl from this ContentModelGroup.
        Parameters:
        elementDecl - the ElementDecl to remove.
        Returns:
        true if the element has been successfully removed, false otherwise.
      • removeGroup

        boolean removeGroup​(Group group)
        Removes the given Group from this ContentModelGroup.
        Parameters:
        group - the Group to remove.
        Returns:
        true if the group has been successfully removed, false otherwise.
      • removeGroup

        boolean removeGroup​(ModelGroup group)
        Removes the given ModelGroup definition from this ContentModelGroup.
        Parameters:
        group - the ModelGroup definition to remove.
        Returns:
        true if the group has been successfully removed, false otherwise.
      • removeWildcard

        boolean removeWildcard​(Wildcard wildcard)
        Removes the given Wildcard from this ContentModelGroup.
        Parameters:
        wildcard - the Wildcard to remove.
        Returns:
        true if the given Wildcard has been successfully removed, false otherwise.
      • getElementDecl

        ElementDecl getElementDecl​(java.lang.String name)
        Returns the element declaration with the given name, or null if no element declaration with that name exists in this ContentModelGroup.
        Parameters:
        name - the name of the element.
        Returns:
        the ElementDecl with the given name, or null if no ElementDecl exists in this ContentModelGroup.
      • getMaxOccurs

        int getMaxOccurs()
        Returns the maximum number of occurrences that this ContentModelGroup may appear.
        Returns:
        the maximum number of occurrences that this ContentModelGroup may appear. A non positive (n < 1) value indicates that the value is unspecified (ie. unbounded).
      • getMinOccurs

        int getMinOccurs()
        Returns the minimum number of occurrences that this ContentModelGroup must appear.
        Returns:
        the minimum number of occurrences that this ContentModelGroup must appear A negative (n < 0) value indicates that the value is unspecified.
      • getParticleCount

        int getParticleCount()
        Returns the number of particles contained within this ContentModelGroup.
        Returns:
        the number of particles
      • getParticle

        Particle getParticle​(int index)
        Returns the Particle at the specified index.
        Parameters:
        index - the index of the Particle to return
        Returns:
        the CMParticle at the specified index