Class XSDatatypeExp
java.lang.Object
com.sun.msv.grammar.Expression
com.sun.msv.grammar.ReferenceExp
com.sun.msv.reader.datatype.xsd.XSDatatypeExp
- All Implemented Interfaces:
GrammarReader.BackPatch, Serializable
A wrapper of XSDatatype that serves as an expression
and encapsulates lazy-constructed datatypes.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacethis object renders the actual datatype object.static classthis object is used to keep the information about the dependency between late-bind datatype objects. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate XSDatatypeDatatype object wrapped by this expression.private final StringNamespace URI of this datatype.private StateState object that creates this late-binding object.private ExpressionPoolExpressionPool that can be used if necessary.private XSDatatypeExp.RendererOnce the parsing is completed, this function object should be able to render the actual datatype object.Fields inherited from class ReferenceExp
exp, nameFields inherited from class Expression
anyString, epsilon, nullSet, verifierTag -
Constructor Summary
ConstructorsModifierConstructorDescriptionXSDatatypeExp(XSDatatype dt, ExpressionPool _pool) Creates this object from existing XSDatatype.privateXSDatatypeExp(String nsUri, String localName) Used only for cloningXSDatatypeExp(String nsUri, String typeName, GrammarReader reader, XSDatatypeExp.Renderer _renderer) Creates lazily created datatype. -
Method Summary
Modifier and TypeMethodDescriptioncreateFinalizedType(int finalValue, GrammarReader reader) Derives a new type by setting final values.Creates an incubator so that the caller can add more facets and derive a new type.getClone()Gets a clone of this object.Gets a encapsulated datatype object This method can be called only after all the datatypes are created.gets State object who has submitted this patch job.getType(XSDatatypeExp.RenderingContext context) Gets the type definition.final booleanstatic XSDatatypeExpmakeList(String nsUri, String typeName, XSDatatypeExp itemType, GrammarReader reader) Derives a new type by list.static XSDatatypeExpmakeUnion(String typeNameUri, String typeName, Collection members, GrammarReader reader) Derives a new type by union.voidpatch()Renders the type (GrammarReader.BackPatch implementation).voidredefine(XSDatatypeExp rhs) Updates this object by copying the state from rhsMethods inherited from class ReferenceExp
calcEpsilonReducibility, calcHashCode, equals, isDefined, visit, visit, visit, visitMethods inherited from class Expression
getExpandedExp, hashCode, hashCode, hashCode, isEpsilonReducible, peelOccurence, readResolve, visit, visit, visit, visit
-
Field Details
-
namespaceUri
Namespace URI of this datatype. Local name is stored in the name field of ReferenceExp. -
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,ownerStateandrendererfields are available. -
pool
ExpressionPool that can be used if necessary. -
ownerState
State object that creates this late-binding object. The source location of this state is used for error message. -
renderer
Once the parsing is completed, this function object should be able to render the actual datatype object.
-
-
Constructor Details
-
XSDatatypeExp
Creates this object from existing XSDatatype. -
XSDatatypeExp
public XSDatatypeExp(String nsUri, String typeName, GrammarReader reader, XSDatatypeExp.Renderer _renderer) Creates lazily created datatype. -
XSDatatypeExp
-
-
Method Details
-
createIncubator
Creates an incubator so that the caller can add more facets and derive a new type. -
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.
-
getType
Gets the type definition. This method renders the datatype object if it's not rendered yet. Internal use only. -
patch
public void patch()Renders the type (GrammarReader.BackPatch implementation).- Specified by:
patchin interfaceGrammarReader.BackPatch
-
getOwnerState
Description copied from interface:GrammarReader.BackPatchgets State object who has submitted this patch job.- Specified by:
getOwnerStatein interfaceGrammarReader.BackPatch
-
isLateBind
public final boolean isLateBind() -
getClone
Gets a clone of this object. -
redefine
Updates this object by copying the state from rhs -
createFinalizedType
Derives a new type by setting final values. -
makeList
public static XSDatatypeExp makeList(String nsUri, 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(String typeNameUri, String typeName, Collection members, GrammarReader reader) throws org.relaxng.datatype.DatatypeException Derives a new type by union.- Throws:
org.relaxng.datatype.DatatypeException
-