Class IdentityConstraint

    • Constructor Detail

      • IdentityConstraint

        protected IdentityConstraint()
        Constructor used by sub-classes. Creates a new IdentityConstraint.
    • Method Detail

      • getConstraintCategory

        public abstract java.lang.String getConstraintCategory()
        The type of constraint: one of "key", "unique", or "keyref"
        one of "key", "unique", or "keyref" (note the spelling)
      • addField

        public void addField​(IdentityField field)
        Adds the given IdentityField to this IdentityConstraint
        field - the IdentityField to add.
      • getFields

        public java.util.List<IdentityField> getFields()
        Returns the List of Fields contained within this IdentityConstraint.
        the List of fields
      • getName

        public java.lang.String getName()
        Return the name of this IdentityConstraint. This value will never be null.
        the name of this IdentityConstraint
      • getTargetNamespace

        public java.lang.String getTargetNamespace()
        Return the target namespace of this IdentityConstraint.
        the target namespace of this IdentityConstraint. Return null if the target namespace is "absent".
      • getSelector

        public IdentitySelector getSelector()
        Returns the selector of this IdentityConstraint.
        the IdentitySelector of this IdentityConstraint
      • setSelector

        public void setSelector​(IdentitySelector selector)
        Sets the selector for this IdentityConstraint.
        selector - the Selector for this IdentityConstraint. Must not be null.
      • setConstraintName

        public void setConstraintName​(StructuredQName nc)
        Set the integer cdde of the name of this identity constraint
        nc - the namecode
      • getConstraintName

        public StructuredQName getConstraintName()
        Get the name of this identity constraint
        the component's name
      • setOrdered

        public void setOrdered​(boolean ordered)
      • isOrdered

        public boolean isOrdered()
      • typeCheck

        public void typeCheck​(SchemaCompiler compiler,
                              SchemaType contextType)
                       throws XPathException
        Typecheck the selector and the fields. This reports warnings if the XPath expressions used in defining the constraint cannot select anything, or under similar conditions
        compiler - the schema compiler
        contextType - the type of the element whose constraint is being defined
        XPathException - if a type error is found
      • isSameDeclaration

        public boolean isSameDeclaration​(IdentityConstraint other)
        Test whether this is the same constraint as another. They are considered to be the same component if they are derived from the same definition in the original XML representation (which can happen when there are multiple includes of the same file)
        other - the notation declaration that we are comparing with
        true if the two notation declarations are identical
      • elaborate

        public void elaborate​(SchemaCompiler compiler)
        Elaborate the schema component: after reloading a serialized schema component model, this expands the component with derived information needed during validation episodes. The model is assumed to be valid.
        Specified by:
        elaborate in interface UserSchemaComponent
        elaborate in class SchemaStructure
        compiler - the schema compiler
      • 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
        the schema component represented as a function from property names to property values.