|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Implementations of this interface are responsible for parsing schema document into an instance of Schema object.
The typical usage of schema parser is:
parse. In this stage, not all references might be
resolved.resolve() followed by
getUnresolvedReferences()), add schemas if there are
somegetSchema()
| Method Summary | |
java.util.Map |
getNamespaceLocationMap()
Returns the map from namespaceURI(String) -> Location(String) of the schema. |
Schema |
getSchema()
Resolves all pending unresolved references and returns a representation of loaded schema. |
java.lang.String |
getSchemaLocation(java.lang.String targetNamespace)
Gets physical schema location for the given namespace. |
java.util.Iterator |
getUnresolvedAttributeGroups()
Returns an iterator of unresolved attribute groups or null if all attribute groups are resolved. |
java.util.Iterator |
getUnresolvedAttributes()
Returns an iterator of unresolved attributes or null if all attributes are resolved. |
java.util.Iterator |
getUnresolvedElements()
Returns an iterator of unresolved elements or null if all elements are resolved. |
java.util.Iterator |
getUnresolvedGroups()
Returns an iterator of unresolved groups or null if all groups are resolved. |
java.util.Iterator |
getUnresolvedTypes()
Returns an iterator of unresolved types or null if all types are resolved. |
boolean |
isParsingFacets()
Returns true if the parser stores facets. |
void |
parse(org.w3c.dom.Element element,
Endpoint schemaLocation)
Parses in an already loaded schema document. |
void |
parse(Endpoint schemaLocation)
Parses in a schema document. |
void |
parse(java.lang.String namespaceURI)
Parses in a schema document. |
void |
parseLocation(java.lang.String url)
Parses in a schema document from the given location URL. |
void |
resolve()
Resolves all pending unresolved references. |
void |
setHostTransportProperties(java.lang.String host,
java.util.Map transportProperties)
Sets up the transport properties (i.e. |
void |
setNamespaceLocationMap(java.util.Map namespaceLocationMap)
Sets the schema location map. |
void |
setParsingFacets(boolean parsingFacets)
Instructs the parser (not) to parse and store facets. |
| Method Detail |
public void parse(java.lang.String namespaceURI)
throws SchemaException
namespaceURI - the namespaceURI of the schema
document. Theree must be a mapping between namespace and
document's location in the schemaLocationMap. See
get/setNamespaceLocationMap.
SchemaException - if the namespace could not be
loaded.
public void parse(Endpoint schemaLocation)
throws SchemaException
schemaLocation - the location of the schema; the string shouldn't be URL encoded (see #25403)
SchemaException - if something goes wrong
public void parseLocation(java.lang.String url)
throws SchemaException
url - the location of the schema
SchemaException - if something goes wrong
public void parse(org.w3c.dom.Element element,
Endpoint schemaLocation)
throws SchemaException
element - the already-loaded schema documentschemaLocation - location of the schema document, will be
used as base for relative references.
SchemaException - if there is an error in the schema.public java.util.Iterator getUnresolvedTypes()
public java.util.Iterator getUnresolvedElements()
public java.util.Iterator getUnresolvedGroups()
public java.util.Iterator getUnresolvedAttributes()
public java.util.Iterator getUnresolvedAttributeGroups()
public void resolve()
throws SchemaException
SchemaException - if the resolve has not been successful
public Schema getSchema()
throws SchemaException
SchemaException - if there were unresolved (and
unresolvable) references.public java.util.Map getNamespaceLocationMap()
public void setNamespaceLocationMap(java.util.Map namespaceLocationMap)
namespaceLocationMap - map of schema location [namespaceURI(String) -> Location(String)]public boolean isParsingFacets()
After parsing, they can be obtained using getFacets() on SchemaConstruct.
public void setParsingFacets(boolean parsingFacets)
parsingFacets - true if the parser should store facets
public void setHostTransportProperties(java.lang.String host,
java.util.Map transportProperties)
host - host name; if null the call has no effecttransportProperties - can be null; properties that will be used
for the host from this moment;
the map is never modified by SchemaParserpublic java.lang.String getSchemaLocation(java.lang.String targetNamespace)
targetNamespace - targetNamespace of some XML Schema
null if location is
unknown
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||