class LazyTypeIncubator extends java.lang.Object implements XSTypeIncubator
This incubator is used to add facets to lazily created XSDatatypeExp object. Since the actual Datatype object is not available when facets are parsed, this object merely stores all facets when the addFacet method is called.
Once the actual Datatype is provided, this class uses ordinary TypeIncubator and builds a real type object.
Modifier and Type | Class and Description |
---|---|
private class |
LazyTypeIncubator.Facet
store the information about one added facet.
|
Modifier and Type | Field and Description |
---|---|
private XSDatatypeExp |
baseType
base object.
|
private java.util.List |
facets
applied facets.
|
private GrammarReader |
reader |
Constructor and Description |
---|
LazyTypeIncubator(XSDatatypeExp base,
GrammarReader reader) |
Modifier and Type | Method and Description |
---|---|
void |
addFacet(java.lang.String name,
java.lang.String strValue,
boolean fixed,
org.relaxng.datatype.ValidationContext context) |
XSDatatypeExp |
derive(java.lang.String nsUri,
java.lang.String localName) |
private final XSDatatypeExp baseType
private final GrammarReader reader
private final java.util.List facets
public LazyTypeIncubator(XSDatatypeExp base, GrammarReader reader)
public void addFacet(java.lang.String name, java.lang.String strValue, boolean fixed, org.relaxng.datatype.ValidationContext context)
addFacet
in interface XSTypeIncubator
public XSDatatypeExp derive(java.lang.String nsUri, java.lang.String localName) throws org.relaxng.datatype.DatatypeException
derive
in interface XSTypeIncubator
org.relaxng.datatype.DatatypeException