public abstract class BaseWSDLReader extends Object implements WSDLReader
TODO a Template Inheritance pattern that ensures WSDL validation gets invoked (if turned on by some property) after the subclass has parsed the WSDL. Note, this class is currently WSDL version-independent and XML parser-independent; should try to keep it that way.
Modifier and Type | Field and Description |
---|---|
protected ReaderFeatures |
features |
protected WSDLContext |
fWsdlContext |
FEATURE_CONTINUE_ON_ERROR, FEATURE_VALIDATION, FEATURE_VERBOSE, PROPERTY_TYPE_SYSTEM_API, PROPERTY_XML_PARSER_API, TYPE_XSD_2001
Modifier | Constructor and Description |
---|---|
protected |
BaseWSDLReader(WSDLContext wsdlContext) |
Modifier and Type | Method and Description |
---|---|
protected abstract XMLElement |
createXMLElement(Object elem)
Returns an XMLElement object representing the specified element
object.
|
ErrorReporter |
getErrorReporter() |
ExtensionRegistry |
getExtensionRegistry() |
protected WSDLFactory |
getFactory()
Get the cached WSDLFactory if there is one, otherwise
create and cache a new one.
|
String |
getFactoryImplName() |
boolean |
getFeature(String name)
Returns the on/off setting of the named feature, represented as a boolean.
|
Object |
getProperty(String name)
Returns the value of the named property.
|
protected URI |
getURI(String anyURI) |
URIResolver |
getURIResolver()
Find the current URI Resolver
|
protected abstract DescriptionElement |
getWSDLFromLocation(String locationURI,
DescriptionElement desc,
Map wsdlModules) |
protected DescriptionElement |
parseDescription(String documentBaseURI,
XMLElement descEl,
Map wsdlModules) |
protected DocumentationElement |
parseDocumentation(XMLElement docEl,
DescriptionElement desc,
DocumentableElement parent) |
protected abstract void |
parseExtensionAttributes(XMLElement extEl,
Class wsdlClass,
WSDLElement wsdlObj,
DescriptionElement desc) |
protected ExtensionElement |
parseExtensionElement(Class parentType,
WSDLElement parent,
XMLElement el,
DescriptionElement desc) |
protected abstract void |
parseNamespaceDeclarations(XMLElement xmlElem,
WSDLElement wsdlElem) |
protected void |
parseSchemaForXMLSchema(DescriptionElement desc) |
protected abstract Schema |
parseSchemaImport(XMLElement importEl,
DescriptionElement desc) |
protected abstract Schema |
parseSchemaInline(XMLElement schemaEl,
DescriptionElement desc) |
protected String |
resolveURI(String uri) |
protected URI |
resolveURI(URI uri) |
void |
setExtensionRegistry(ExtensionRegistry extReg)
Set the extension registry to the specified registry reference.
|
void |
setFactoryImplName(String factoryImplName)
Stores the name of the WSDLFactory implementation class to be used for
any subsequent WSDLFactory requests, first discarding any cached factory
object.
|
void |
setFeature(String name,
boolean value)
Set a named feature on or off with a boolean.
|
void |
setProperty(String name,
Object value)
Set a named property to the specified object.
|
void |
setURIResolver(URIResolver resolver)
Provides the capability of setting a custom URI Resolver.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createWSDLSource, readWSDL, readWSDL
protected WSDLContext fWsdlContext
protected final ReaderFeatures features
protected BaseWSDLReader(WSDLContext wsdlContext) throws WSDLException
WSDLException
public ErrorReporter getErrorReporter()
getErrorReporter
in interface WSDLReader
protected WSDLFactory getFactory() throws WSDLException
WSDLException
public void setFactoryImplName(String factoryImplName)
setFactoryImplName
in interface WSDLReader
factoryImplName
- the WSDLFactory implementation classnamepublic String getFactoryImplName()
getFactoryImplName
in interface WSDLReader
public void setExtensionRegistry(ExtensionRegistry extReg)
WSDLReader
setExtensionRegistry
in interface WSDLReader
extReg
- an ExtensionRegistrypublic ExtensionRegistry getExtensionRegistry()
getExtensionRegistry
in interface WSDLReader
public void setFeature(String name, boolean value)
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
setFeature
in interface WSDLReader
name
- the name of the feature to be setvalue
- a boolean value where true sets the feature on, false sets it offIllegalArgumentException
- if the feature name is not recognized.public boolean getFeature(String name)
getFeature
in interface WSDLReader
name
- the name of the feature to get the value ofIllegalArgumentException
- if the feature name is not recognized.public void setProperty(String name, Object value)
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
setProperty
in interface WSDLReader
name
- the name of the property to be setvalue
- an Object representing the value to set the property toIllegalArgumentException
- if the property name is not recognized.public Object getProperty(String name)
getProperty
in interface WSDLReader
name
- the name of the property to get the value ofIllegalArgumentException
- if the property name is not recognized.protected DescriptionElement parseDescription(String documentBaseURI, XMLElement descEl, Map wsdlModules) throws WSDLException
WSDLException
protected DocumentationElement parseDocumentation(XMLElement docEl, DescriptionElement desc, DocumentableElement parent) throws WSDLException
WSDLException
protected abstract Schema parseSchemaImport(XMLElement importEl, DescriptionElement desc) throws WSDLException
WSDLException
protected abstract Schema parseSchemaInline(XMLElement schemaEl, DescriptionElement desc) throws WSDLException
WSDLException
protected ExtensionElement parseExtensionElement(Class parentType, WSDLElement parent, XMLElement el, DescriptionElement desc) throws WSDLException
WSDLException
protected abstract void parseExtensionAttributes(XMLElement extEl, Class wsdlClass, WSDLElement wsdlObj, DescriptionElement desc) throws WSDLException
WSDLException
protected abstract void parseNamespaceDeclarations(XMLElement xmlElem, WSDLElement wsdlElem) throws WSDLException
WSDLException
protected void parseSchemaForXMLSchema(DescriptionElement desc) throws WSDLException
WSDLException
protected abstract XMLElement createXMLElement(Object elem) throws IllegalArgumentException
IllegalArgumentException
- if elem is not a type recognized by the
WSDLReader implementation.protected URI getURI(String anyURI) throws WSDLException
WSDLException
protected abstract DescriptionElement getWSDLFromLocation(String locationURI, DescriptionElement desc, Map wsdlModules) throws WSDLException
WSDLException
public void setURIResolver(URIResolver resolver)
setURIResolver
in interface WSDLReader
resolver
- the custom URIResolverNullPointerException
- if the 'resolver' parameter is null.protected URI resolveURI(URI uri) throws WSDLException
WSDLException
public URIResolver getURIResolver()
getURIResolver
in interface WSDLReader
Copyright © 2005–2018 Apache Software Foundation. All rights reserved.