Class XSDatatypeExp

    • Field Detail

      • namespaceUri

        private final java.lang.String namespaceUri
        Namespace URI of this datatype. Local name is stored in the name field of ReferenceExp.
      • dt

        private XSDatatype dt
        Datatype object wrapped by this expression. This field can be null if the datatype object is not available at this moment (say, because of the forward reference). In this case, ownerState and renderer fields are available.
      • pool

        private ExpressionPool pool
        ExpressionPool that can be used if necessary.
      • ownerState

        private transient State ownerState
        State object that creates this late-binding object. The source location of this state is used for error message.
      • renderer

        private transient XSDatatypeExp.Renderer renderer
        Once the parsing is completed, this function object should be able to render the actual datatype object.
    • Constructor Detail

      • XSDatatypeExp

        public XSDatatypeExp​(XSDatatype dt,
                             ExpressionPool _pool)
        Creates this object from existing XSDatatype.
      • XSDatatypeExp

        public XSDatatypeExp​(java.lang.String nsUri,
                             java.lang.String typeName,
                             GrammarReader reader,
                             XSDatatypeExp.Renderer _renderer)
        Creates lazily created datatype.
      • XSDatatypeExp

        private XSDatatypeExp​(java.lang.String nsUri,
                              java.lang.String localName)
        Used only for cloning
    • Method Detail

      • createIncubator

        public XSTypeIncubator createIncubator()
        Creates an incubator so that the caller can add more facets and derive a new type.
      • getCreatedType

        public XSDatatype getCreatedType()
        Gets a encapsulated datatype object This method can be called only after all the datatypes are created.

        Some of the datatypes are lazily during the back-patching phase.

      • patch

        public void patch()
        Renders the type (GrammarReader.BackPatch implementation).
        Specified by:
        patch in interface GrammarReader.BackPatch
      • isLateBind

        public final boolean isLateBind()
      • getClone

        public XSDatatypeExp getClone()
        Gets a clone of this object.
      • redefine

        public void redefine​(XSDatatypeExp rhs)
        Updates this object by copying the state from rhs
      • createFinalizedType

        public XSDatatypeExp createFinalizedType​(int finalValue,
                                                 GrammarReader reader)
        Derives a new type by setting final values.
      • makeList

        public static XSDatatypeExp makeList​(java.lang.String nsUri,
                                             java.lang.String typeName,
                                             XSDatatypeExp itemType,
                                             GrammarReader reader)
                                      throws org.relaxng.datatype.DatatypeException
        Derives a new type by list.
        Throws:
        org.relaxng.datatype.DatatypeException
      • makeUnion

        public static XSDatatypeExp makeUnion​(java.lang.String typeNameUri,
                                              java.lang.String typeName,
                                              java.util.Collection members,
                                              GrammarReader reader)
                                       throws org.relaxng.datatype.DatatypeException
        Derives a new type by union.
        Throws:
        org.relaxng.datatype.DatatypeException