com.ebmwebsourcing.commons.schema.api
Interface SchemaReader

All Known Implementing Classes:
AbstractSchemaReader, SchemaReader

public interface SchemaReader

This interface describes a collection of methods that enable conversion of a Schema document (in XML, following the Schema schema described in the Schema specification) into a Schema model.

Author:
Nicolas Salatge - eBM WebSourcing

Nested Class Summary
static class SchemaReader.FeatureConstants
          Constants for the Message Exchange Patterns.
 
Method Summary
 java.lang.Object getFeature(SchemaReader.FeatureConstants name)
          Gets the value of the specified feature.
 java.util.Map<SchemaReader.FeatureConstants,java.lang.Object> getFeatures()
          Gets all features.
 Schema readSchema(org.w3c.dom.Document wsdlDocument)
          Read the specified Schema document into a Schema definition.
 Schema readSchema(java.net.URI schemaURI)
          Read the Schema document accessible via the specified URI into a Schema definition.
 Schema readSchema(java.net.URI schemaURI, javax.xml.transform.dom.DOMSource inputSource)
          Read a Schema document into a Schema definition.
 void setFeature(SchemaReader.FeatureConstants name, java.lang.Object value)
          Sets the specified feature to the specified value.
 

Method Detail

setFeature

void setFeature(SchemaReader.FeatureConstants name,
                java.lang.Object value)
                throws java.lang.IllegalArgumentException
Sets the specified feature to the specified value.

The minimum features that must be supported are:

Name Description Default Value
com.ebmwebsourcing.commons.schema.verbose
If set to true, status messages will be displayed.
type: boolean - default value: false
com.ebmwebsourcing.commons.schema.importDocuments
If set to true, imported WSDL documents will be retrieved and processed.
type: boolean - default value: true
com.ebmwebsourcing.commons.schema.pathDirectoryOfImportLocations
If the location is set, imported WSDL documents will be retrieved at this location (Set the importDocuments Features at true).
type: String

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

Parameters:
name - the name of the feature to be set.
value - the value to set the feature to.
Throws:
java.lang.IllegalArgumentException - if the feature name is not recognized.
See Also:
#getFeature(String)

getFeature

java.lang.Object getFeature(SchemaReader.FeatureConstants name)
Gets the value of the specified feature.

Parameters:
name - the name of the feature to get the value of.
Returns:
the value of feature
Throws:
java.lang.IllegalArgumentException - if the feature name is not recognized.
See Also:
#setFeature(String, boolean)

getFeatures

java.util.Map<SchemaReader.FeatureConstants,java.lang.Object> getFeatures()
Gets all features.

Returns:
the features
See Also:
#setFeature(String, boolean)

readSchema

Schema readSchema(java.net.URI schemaURI)
                  throws SchemaException
Read the Schema document accessible via the specified URI into a Schema definition.

Parameters:
schemaURI - a URI (can be a filename or URL) pointing to a Schema XML definition.
Returns:
the definition.
Throws:
SchemaException

readSchema

Schema readSchema(org.w3c.dom.Document wsdlDocument)
                  throws SchemaException
Read the specified Schema document into a Schema definition.

Parameters:
documentBaseURI - the document base URI of the Schema definition described by the document. Will be set as the documentBaseURI of the returned Definition. Can be null, in which case it will be ignored.
wsdlDocument - the Schema document, an XML document obeying the Schema schema.
Returns:
the definition described in the document.
Throws:
SchemaException

readSchema

Schema readSchema(java.net.URI schemaURI,
                  javax.xml.transform.dom.DOMSource inputSource)
                  throws SchemaException
Read a Schema document into a Schema definition.

Parameters:
schemaURI - the uri of the schema
inputSource - an InputSource pointing to the Schema document, an XML document obeying the Schema schema.
Returns:
the definition described in the document pointed to by the InputSource.
Throws:
SchemaException


Copyright © 2008 eBM WebSourcing. All Rights Reserved.