public class XSDBuilder extends java.lang.Object implements XSDConstantValues
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ANNOTATION_CONTEXT |
static java.lang.String |
IGNORE_DUPLICATE |
static java.lang.String |
IGNORE_DUPLICATES |
static java.lang.String |
IMPORT_INCLUDE_ERROR |
static java.lang.String |
INCREMENTAL_BUILD |
static java.lang.String |
KEEP_DOM_NODE |
static java.lang.String |
NAMESPACE_CONTEXT |
static java.lang.String |
SCHEMA_ANNOTATION |
static java.lang.String |
SORT_SCHEMA_IMPORTS |
static java.lang.String |
SQL_OFFLINE_SIZE |
static java.lang.String |
XDB_SQLINLINE |
_abstract, _all, _annotation, _any, _anyAttribute, _anySimpleType, _anyType, _appinfo, _attrFormDefault, _attribute, _attributeGroup, _attrTag, _base, _block, _blockDefault, _choice, _complexContent, _complexType, _content, _default, _derivedBy, _documentation, _element, _elementOnly, _elemFormDefault, _empty, _enumeration, _equivClass, _extension, _false, _field, _final, _finalDefault, _fixed, _form, _group, _id, _import, _include, _itemType, _key, _keyref, _lax, _list, _maxOccurs, _memberTypes, _minOccurs, _mixed, _nall, _name, _namespace, _nil, _nillable, _nnany, _nnlist, _nnlocal, _nnother, _nntargetNS, _noNSSchemaLocation, _notation, _null, _nullable, _optional, _pattern, _processContents, _prohibited, _publicid, _qualified, _redefine, _ref, _refer, _required, _restriction, _restrictions, _schemaLocation, _selector, _sequence, _simpleContent, _simpleType, _skip, _strict, _substitution, _substitutionGrp, _systemid, _targetNS, _textOnly, _this, _true, _type, _undef, _union, _unique, _unqualified, _use, _value, _version, _xmlns, ABSENT_NS, ACCEPTED, ALL, ANNOTATION, ANY, ANY_ATTRIBUTE, ANY_NODE, ATTRIBUTE, ATTRIBUTE_GROUP, AUTO_VALIDATION, BASE_RESOLVED, BASE_UNRESOLVED, BASE_URL, BUILD_FAIL, CHOICE, CIRCULAR_SUBST, CONFLICIT_FACET, constName, DATATYPE, DEEP_VALIDATION, derivationBlock, DONE, DUPLICATE_DEF, duplicateId, ELEMENT, ELEMENT_CHILD, ELEMENT_ONLY, elemNotNullable, EMPTY, ENTITY_RESOLVER, EQUIV_RESOLVED, EQUIV_UNRESOLVED, ERROR, EXTENTION, FACET_CHILD, FAKE_ATTR, FAKE_NODE, FIXED_SCHEMA, GROUP, IABSTRACT, IBLOCKEXT, IBLOCKRST, IBLOCKSUB, IDENTITY_ERROR, IDENTITY_KEY, IDENTITY_KEYREF, IDENTITY_UNIQUE, IFINALEXT, IFINALLIST, IFINALRST, IFINALUNION, IMPORT, INCLUDE, INCORRECT_ATTR, INCORRECT_ELEM, INFINITY, INTERNAL_ERROR, INVALID_DATE, INVALID_DATETIME, INVALID_DERIVATION, INVALID_FACET, INVALID_FACET_VALUE, INVALID_NOTATION, INVALID_REGEX, INVALID_SCHEMA_NS, INVALID_TIME, INVALID_TYPE_VALUE, invalidAttr, invalidAttrVal, invalidChars, invalidElem, invalidFixedChars, invalidNS, invalidPrefix, invalidProperty, invalidRef, invalidSubstitution, invalidTargetNS, LAX_VALIDATION, MISSING_NS, missingAttr, MIXED, NEW_STATE, NO_CHILD, noDefinition, NOT_DONE, NOTATION, notComplete, notSubstitutable, notSubTypeOf, NS_CONFLICT, NS_DIF_SPECIFIED, NS_NOT_ALLOWED, NS_NOT_EXPECTED, NS_NOT_SAME, NS_RESOLVER, REDEFINE, REF_RESOLVED, REF_UNRESOLVED, RESTRICTION, ROOT_ELEMENT, ROOT_NODE, ROOT_TYPE, SCHEMA_NS, SCHEMA_RESOLVER, SEQ, STRICT_VALIDATION, TEXT_ONLY, TOP_LEVEL, TYPE, TYPE_RESOLVED, TYPE_UNRESOLVED, UNDEF, unexpectedAttr, unexpectedElem, VALIDATION_MODE, VIOLATE_FACET, XSDRECNS, XSDRECTYPENS, XSIRECNS, XSITYPE_ABSENT| Constructor and Description |
|---|
XSDBuilder()
XSDBuilder constructor
|
| Modifier and Type | Method and Description |
|---|---|
XMLSchema |
build(InputSource source)
Build an XMLSchema object
|
XMLSchema |
build(java.io.InputStream in, java.net.URL baseurl)
Build an XMLSchema object
|
XMLSchema |
build(java.io.Reader r, java.net.URL baseurl)
Build an XMLSchema object
|
XMLSchema |
build(java.lang.String sysId)
Build an XMLSchema object
|
XMLSchema |
build(java.lang.String ns, java.lang.String sysid)
Build an XMLSchema object
|
XMLSchema |
build(java.lang.String ns, java.net.URL sysid)
Build an XMLSchema object
|
XMLSchema |
build(java.net.URL schemaurl)
Build an XMLSchema object
|
XMLSchema |
build(XMLDocument[] schemaDoc)
Build XMLSchema from a set of XML documents The system id of each document is used as the based uri
|
XMLSchema |
build(XMLDocument[] schemaDoc, java.net.URL baseurl)
Build XMLSchema from a set of XML documents
|
XMLSchema |
build(XMLDocument doc, java.lang.String fragment, java.lang.String ns, java.net.URL baseurl)
Build an XMLSchema object
|
XMLSchema |
build(XMLDocument schemaDoc, java.net.URL baseurl)
Build XMLSchema from XML document
|
XMLSchema |
build(XMLElement[] schemaDoc, java.net.URL baseurl)
Build XMLSchema from a set of XMLElements
|
java.lang.Object |
getObject()
Returns the schema object.
|
java.util.HashSet |
getSchemaCircle() |
void |
setDebugMode(boolean mode)
Sets debug mode.
|
void |
setEntityResolver(EntityResolver entResolver)
Set an EntityResolver for resolving imports/include
|
void |
setError(XMLError er)
Sets XMLError object.
|
void |
setJAXP(boolean jaxp)
Set JAXP mode, in this mode, only resolved URI will be sent to entityResolver.
|
void |
setLocale(java.util.Locale locale)
Sets locale for error reporting.
|
void |
setXMLProperty(java.lang.String name, java.lang.Object value) |
public static final java.lang.String SCHEMA_ANNOTATION
public static final java.lang.String XDB_SQLINLINE
public static final java.lang.String SQL_OFFLINE_SIZE
public static final java.lang.String SORT_SCHEMA_IMPORTS
public static final java.lang.String ANNOTATION_CONTEXT
public static final java.lang.String KEEP_DOM_NODE
public static final java.lang.String INCREMENTAL_BUILD
public static final java.lang.String NAMESPACE_CONTEXT
public static final java.lang.String IMPORT_INCLUDE_ERROR
public static final java.lang.String IGNORE_DUPLICATES
public static final java.lang.String IGNORE_DUPLICATE
public XSDBuilder()
throws XSDException
XSDExceptionpublic void setError(XMLError er)
er - XMLError objectpublic void setDebugMode(boolean mode)
mode - booleanpublic void setLocale(java.util.Locale locale)
locale - Locale objectpublic void setEntityResolver(EntityResolver entResolver)
entResolver - EntityResolverEntityResolverpublic void setJAXP(boolean jaxp)
jaxp - - true for JAXP modepublic void setXMLProperty(java.lang.String name,
java.lang.Object value)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic java.util.HashSet getSchemaCircle()
public java.lang.Object getObject()
public XMLSchema build(java.lang.String sysId) throws XSDException
sysId - Schema locationXSDException - An XSDException is thrown if Builder fails to build an XMLSchema object.public XMLSchema build(java.io.InputStream in, java.net.URL baseurl) throws XSDException
in - Inputstream of Schemabaseurl - URL used to resolve any relative refs.XSDException - An XSDException is thrown if Builder fails to build an XMLSchema object.public XMLSchema build(java.io.Reader r, java.net.URL baseurl) throws XSDException
r - Reader of Schemabaseurl - URL used to resolve any relative refs.XSDException - An XSDException is thrown if Builder fails to build an XMLSchema object.public XMLSchema build(java.net.URL schemaurl) throws XSDException
schemaurl - - URL of SchemaXSDException - An XSDException is thrown if Builder fails to build an XMLSchema object.public XMLSchema build(InputSource source) throws XSDException
source - - InputSource of SchemaXSDException - An XSDException is thrown if Builder fails to build an XMLSchema object.public XMLSchema build(XMLDocument schemaDoc, java.net.URL baseurl) throws XSDException
schemaDoc - XMLDocumentbaseurl - base URL to be use for any import/include in documentXSDException - An XSDException is thrown if Builder fails to build an XMLSchema object.public XMLSchema build(XMLDocument[] schemaDoc, java.net.URL baseurl) throws XSDException
schemaDoc - Array of XMLDocumentbaseurl - base URL to be use for any import/include in documentXSDException - An XSDException is thrown if Builder fails to build an XMLSchema object.public XMLSchema build(XMLDocument[] schemaDoc) throws XSDException
schemaDoc - Array of XMLDocumentXSDException - An XSDException is thrown if Builder fails to build an XMLSchema object.public XMLSchema build(XMLElement[] schemaDoc, java.net.URL baseurl) throws XSDException
schemaDoc - Array of XMLElementbaseurl - base URL to be use for any import/include in documentXSDException - An XSDException is thrown if Builder fails to build an XMLSchema object.public XMLSchema build(XMLDocument doc, java.lang.String fragment, java.lang.String ns, java.net.URL baseurl) throws XSDException
doc - XMLdocument contain the schema elementfragment - Fragment ID of the schema elementns - Schema target namespace used to validate targetNamespacebaseurl - Schema locationXSDException - An XSDException is thrown if Builder fails to build an XMLSchema object.public XMLSchema build(java.lang.String ns, java.lang.String sysid) throws XSDException
ns - Schema target namespace used to validate targetNamespacesysid - Schema locationXSDException - An XSDException is thrown if Builder fails to build an XMLSchema object.public XMLSchema build(java.lang.String ns, java.net.URL sysid) throws XSDException
ns - Schema target namespace used to validate targetNamespacesysid - URL Schema locationXSDException - An XSDException is thrown if Builder fails to build an XMLSchema object.