public class SchemaReaderImpl extends AbstractSchemaReader implements SchemaReader
SchemaReader.FeatureConstants| Constructor and Description |
|---|
SchemaReaderImpl() |
| Modifier and Type | Method and Description |
|---|---|
URI |
getDocumentBaseURI()
Get the document base URI of the reader.
|
Object |
getFeature(SchemaReader.FeatureConstants name)
Gets the value of the specified feature.
|
Map<SchemaReader.FeatureConstants,Object> |
getFeatures()
Gets all features.
|
Schema |
read(Document doc)
|
Schema |
read(InputSource inputSource)
Read the XMLSchema definition accessible via the specified
InputSource, and bind it into a Schema object. |
Schema |
read(URL schemaURL)
Read the XMLSchema definition available at the location identified by the
specified URL, and bind it into a
Schema object. |
protected Schema |
readExternalPart(URI schemaLocationURI,
URI baseURI,
Map<URI,AbsItfSchema> imports)
Read an external XML Schema URI according to a base URI.
|
protected Schema |
readSchema(InputSource source,
Map<URI,AbsItfSchema> imports) |
void |
setDocumentBaseURI(URI documentBaseURI)
Set the document base URI of the reader to be able to resolve imported
parts.
|
void |
setFeature(SchemaReader.FeatureConstants name,
Object value)
Sets the specified feature to the specified value.
|
void |
setFeatures(Map<SchemaReader.FeatureConstants,Object> features)
Set the specified features.
|
public SchemaReaderImpl()
throws SchemaException
SchemaExceptionpublic void setDocumentBaseURI(URI documentBaseURI)
setDocumentBaseURI in interface SchemaReaderpublic URI getDocumentBaseURI()
getDocumentBaseURI in interface SchemaReaderpublic Schema read(URL schemaURL) throws SchemaException, URISyntaxException, IOException
Read the XMLSchema definition available at the location identified by the
specified URL, and bind it into a Schema object.
Note: all relative URIs are resolved according to the specified URL.
read in interface SchemaReaderschemaURL - an URL pointing to a XMLSchema definition.Schema definition.SchemaException - An error occurs during the parsing or the binding of the
XMLSchemaURISyntaxException - If the URL is not formatted strictly according to to RFC2396
and cannot be converted to a URI.IOException - An I/O error occurs openning the URL stream.public Schema read(InputSource inputSource) throws SchemaException, URISyntaxException, MalformedURLException
Read the XMLSchema definition accessible via the specified
InputSource, and bind it into a Schema object.
Note: To be able to resolve relative URIs, the InputSource
system identifier must be set.
read in interface SchemaReaderinputSource - an InputSource pointing to a XMLSchema definition.Schema definition.SchemaException - An error occurs during the parsing or the binding of the
XMLSchemaURISyntaxException - If the system identifier URL is not formatted strictly
according to to RFC2396 and cannot be converted to a URI.MalformedURLException - The system identifier URL is not a well-formed URLpublic Schema read(Document doc) throws SchemaException
Read the XMLSchema definition accessible via the specified DOM
Document, and bind it into a Schema object.
Note: To be able to resolve relative URIs, the Document
base URI must be set.
read in interface SchemaReaderdoc - a DOM Document pointing to a XMLSchema definition.Schema definition.SchemaException - An error occurs during the parsing or the binding of the
XMLSchemaprotected Schema readExternalPart(URI schemaLocationURI, URI baseURI, Map<URI,AbsItfSchema> imports) throws SchemaException, MalformedURLException, URISyntaxException
readExternalPart in class AbstractSchemaReaderSchemaExceptionMalformedURLException - The URL based on the external XSD URI and the current base
URI is a malformed URL.URISyntaxException - The URL based on the external XSD URI and the current base
URI is an URL not formatted strictly according to to RFC2396
and cannot be converted to a URI.protected Schema readSchema(InputSource source, Map<URI,AbsItfSchema> imports) throws SchemaException, MalformedURLException, URISyntaxException
public void setFeature(SchemaReader.FeatureConstants name, Object value) throws IllegalArgumentException
SchemaReaderThe minimum features that must be supported are:
| Name | Description | Default Value |
|---|---|---|
| If set to true, status messages will be displayed. | ||
| If set to true, imported WSDL documents will be retrieved and processed. | ||
|
|
If the location is set, imported WSDL documents will be retrieved at this location (Set the importDocuments Features at true). |
All feature names must be fully-qualified, Java package style. All names starting with com.ebmwebsourcing. are reserved for features defined by the specification. It is recommended that implementation- specific features be fully-qualified to match the package name of that implementation. For example: com.abc.featureName
setFeature in interface SchemaReadername - the name of the feature to be set.value - the value to set the feature to.IllegalArgumentException - if the feature name is not recognized.#getFeature(String)public Object getFeature(SchemaReader.FeatureConstants name) throws IllegalArgumentException
SchemaReadergetFeature in interface SchemaReadername - the name of the feature to get the value of.IllegalArgumentException - if the feature name is not recognized.#setFeature(String, boolean)public Map<SchemaReader.FeatureConstants,Object> getFeatures()
SchemaReadergetFeatures in interface SchemaReader#setFeature(String, boolean)public void setFeatures(Map<SchemaReader.FeatureConstants,Object> features)
SchemaReaderSchemaReader.setFeature(FeatureConstants, Object) for more information on
available features.setFeatures in interface SchemaReaderfeatures - Set of features to set.Copyright © 2008-2015 Petals Link (previously EBM WebSourcing). All Rights Reserved.