edu.uga.cs.lsdis.internal.wsdl20.extension.sawsdl.reader
Class WrappingReader

java.lang.Object
  extended by edu.uga.cs.lsdis.internal.wsdl20.extension.sawsdl.reader.WrappingReader
All Implemented Interfaces:
WSDLReader

public class WrappingReader
extends java.lang.Object
implements WSDLReader

A WSDLReader that wraps another WSDLReader to ensure the propagation of ModelReferences and SchemaMappings in a SAWSDL document.

Author:
Douglas Brewer

Field Summary
 
Fields inherited from interface org.apache.woden.WSDLReader
FEATURE_CONTINUE_ON_ERROR, FEATURE_VALIDATION, FEATURE_VERBOSE, PROPERTY_TYPE_SYSTEM_API, PROPERTY_XML_PARSER_API, TYPE_XSD_2001
 
Constructor Summary
WrappingReader(WSDLReader reader)
           
 
Method Summary
 WSDLSource createWSDLSource()
          Returns a WSDLSource object that is compatible with the WSDLReader implementation.
 ErrorReporter getErrorReporter()
          
 ExtensionRegistry getExtensionRegistry()
          
 java.lang.String getFactoryImplName()
          
 boolean getFeature(java.lang.String name)
          Returns the on/off setting of the named feature, represented as a boolean.
 java.lang.Object getProperty(java.lang.String name)
          Returns the value of the named property.
 URIResolver getURIResolver()
          Gets the URI Resolver currently in use
 Description readWSDL(java.lang.String wsdlURI)
          Read the WSDL document at the specified URI and return a WSDL Description component containing the WSDL components derived from that document.
 Description readWSDL(java.lang.String wsdlURI, ErrorHandler errorHandler)
          Read the WSDL document at the specified URI and return a WSDL Description component containing the WSDL components derived from that document.
 Description readWSDL(WSDLSource wsdlSource)
          Read the WSDL obtained from the specified WSDLSource object and return a WSDL Description component containing the WSDL components derived from that WSDL source.
 Description readWSDL(WSDLSource wsdlSource, ErrorHandler errorHandler)
          Read the WSDL obtained from the specified WSDLSource object and return a WSDL Description component containing the WSDL components derived from that WSDL source.
 void setExtensionRegistry(ExtensionRegistry extReg)
          
 void setFactoryImplName(java.lang.String factoryImplName)
          Store the name of the WSDLFactory implementation class to be used for any subsequent WSDLFactory requests.
 void setFeature(java.lang.String name, boolean value)
          Set a named feature on or off with a boolean.
 void setProperty(java.lang.String name, java.lang.Object value)
          Set a named property to the specified object.
 void setURIResolver(URIResolver resolver)
          Sets the URI resolver to be used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WrappingReader

public WrappingReader(WSDLReader reader)
Method Detail

createWSDLSource

public WSDLSource createWSDLSource()
Returns a WSDLSource object that is compatible with the WSDLReader implementation. That is, a WSDLSource implementation that represents WSDL using types that the WSDLReader implementation can understand. For example, DOM-based WSDLReader implementation will likely return a WSDLSource object that represents the WSDL as a DOM Document or Element (org.w3c.dom.Document or org.w3c.dom.Element), both of which should be type compatible the DOM-based reader.

This WSDLSource object can be used to encapsulate the WSDL and is then passed to the WSDLReader as a parameter to its readWSDL methods.

Specified by:
createWSDLSource in interface WSDLReader
Returns:
the WSDLSource class compatible with the WSDLReader implementation.

getErrorReporter

public ErrorReporter getErrorReporter()

Specified by:
getErrorReporter in interface WSDLReader
Returns:
the ErrorReporter used by this reader

getExtensionRegistry

public ExtensionRegistry getExtensionRegistry()

Specified by:
getExtensionRegistry in interface WSDLReader

getFactoryImplName

public java.lang.String getFactoryImplName()

Specified by:
getFactoryImplName in interface WSDLReader
Returns:
the WSDLFactory implementation classname

getFeature

public boolean getFeature(java.lang.String name)
Returns the on/off setting of the named feature, represented as a boolean.

Specified by:
getFeature in interface WSDLReader
Parameters:
name - the name of the feature to get the value of
Returns:
a boolean representing the on/off state of the named feature

getProperty

public java.lang.Object getProperty(java.lang.String name)
Returns the value of the named property.

Specified by:
getProperty in interface WSDLReader
Parameters:
name - the name of the property to get the value of
Returns:
an Object representing the property's value

getURIResolver

public URIResolver getURIResolver()
Gets the URI Resolver currently in use

Specified by:
getURIResolver in interface WSDLReader
Returns:
the URI resolver currently in use

readWSDL

public Description readWSDL(java.lang.String wsdlURI)
                     throws WSDLException
Read the WSDL document at the specified URI and return a WSDL Description component containing the WSDL components derived from that document.

Specified by:
readWSDL in interface WSDLReader
Parameters:
wsdlURI - a URI (absolute filename or URL) pointing to a WSDL document.
Returns:
the Description component
Throws:
WSDLException - for terminating errors and as wrapper for checked exceptions.

readWSDL

public Description readWSDL(java.lang.String wsdlURI,
                            ErrorHandler errorHandler)
                     throws WSDLException
Read the WSDL document at the specified URI and return a WSDL Description component containing the WSDL components derived from that document. Use the specified custom error handler rather than the Woden default handler to handle any WSDL parsing or validation error messages.

Specified by:
readWSDL in interface WSDLReader
Parameters:
wsdlURI - a URI (absolute filename or URL) pointing to a WSDL document.
errorHandler - An error handler that will handle reporting of errors and warnings.
Returns:
the Description component.
Throws:
WSDLException - for terminating errors and as wrapper for checked exceptions.

readWSDL

public Description readWSDL(WSDLSource wsdlSource)
                     throws WSDLException
Read the WSDL obtained from the specified WSDLSource object and return a WSDL Description component containing the WSDL components derived from that WSDL source.

The WSDLSource object must represent the WSDL using a type that the WSDLReader implementation can understand. That is, the WSDLSource and WSDLReader implementations must be compatible. For example, a DOM-based WSDLReader implementation will likely require the WSDLSource object to represent the WSDL as a DOM Document or Element (org.w3c.dom.Document or org.w3c.dom.Element), both of which should be type compatible the DOM-based reader.

Specified by:
readWSDL in interface WSDLReader
Parameters:
wsdlSource - contains an object representing the WSDL
Returns:
the Description component
Throws:
WSDLException - for terminating errors and as a wrapper for checked exceptions

readWSDL

public Description readWSDL(WSDLSource wsdlSource,
                            ErrorHandler errorHandler)
                     throws WSDLException
Read the WSDL obtained from the specified WSDLSource object and return a WSDL Description component containing the WSDL components derived from that WSDL source. Use the specified custom error handler rather than the Woden default handler to handle any WSDL parsing or validation error messages.

The WSDLSource object must represent the WSDL using a type that the WSDLReader implementation can understand. That is, the WSDLSource and WSDLReader implementations must be compatible. For example, a DOM-based WSDLReader implementation will likely require the WSDLSource object to represent the WSDL as a DOM Document or Element (org.w3c.dom.Document or org.w3c.dom.Element), both of which should be type compatible the DOM-based reader.

Specified by:
readWSDL in interface WSDLReader
Parameters:
wsdlSource - contains an object representing the WSDL
errorHandler - a custom error handler that overrides the default handler
Returns:
the Description component
Throws:
WSDLException - for terminating errors and as a wrapper for checked exceptions

setExtensionRegistry

public void setExtensionRegistry(ExtensionRegistry extReg)

Specified by:
setExtensionRegistry in interface WSDLReader

setFactoryImplName

public void setFactoryImplName(java.lang.String factoryImplName)
Store the name of the WSDLFactory implementation class to be used for any subsequent WSDLFactory requests. The named factory class will replace any existing factory object in use.

Specified by:
setFactoryImplName in interface WSDLReader
Parameters:
factoryImplName - the WSDLFactory implementation classname

setFeature

public void setFeature(java.lang.String name,
                       boolean value)
Set a named feature on or off with a boolean. Note, this relates to features of the Woden framework, not to WSDL-specific features such as the WSDL 2.0 Feature component.

All feature names should be fully-qualified, Java package style to avoid name clashes. All names starting with org.apache.woden. are reserved for features defined by the Woden implementation. Features specific to other implementations should be fully-qualified to match the package name structure of that implementation. For example: com.abc.featureName

Specified by:
setFeature in interface WSDLReader
Parameters:
name - the name of the feature to be set
value - a boolean value where true sets the feature on, false sets it off

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
Set a named property to the specified object. Note, this relates to properties of the Woden implementation, not to WSDL-specific properties such as the WSDL 2.0 Property component.

All property names should be fully-qualified, Java package style to avoid name clashes. All names starting with org.apache.woden. are reserved for properties defined by the Woden implementation. Properties specific to other implementations should be fully-qualified to match the package name structure of that implementation. For example: com.abc.propertyName

Specified by:
setProperty in interface WSDLReader
Parameters:
name - the name of the property to be set
value - an Object representing the value to set the property to

setURIResolver

public void setURIResolver(URIResolver resolver)
Sets the URI resolver to be used.

Specified by:
setURIResolver in interface WSDLReader


Copyright © 2007. All Rights Reserved.