org.apache.woden.schema
Interface Schema

All Known Subinterfaces:
ImportedSchema, InlinedSchema
All Known Implementing Classes:
ImportedSchemaImpl, InlinedSchemaImpl, SchemaImpl

public interface Schema

This interface provides an abstract representation of an XML Schema referenced within the <wsdl:types> element. For example, via <xs:schema> or <xs:import>. It provides the namespace used as the target namespace of an inlined schema or as the imported namespace of a schema import. It provides a reference to the actual schema definition, represented by org.apache.ws.commons.schema.XmlSchema. For applications that use other representations for XML Schema content, it also provides a reference to the org.apache.woden.XMLElement object that wraps the underlying <xs:schema> or <xs:import> element. It also indicates whether the schema is 'referenceable' by the surrounding WSDL document, as defined by the schema referenceability rules in the WSDL 2.0 spec.

NOTE: non-XML type systems like DTD are not handled by this interface. They must be handled by WSDL 2.0 extension mechanisms.
TODO Need to determine if this interface is suitable for use with other xml-based schema types like Relax NG or if some type of schema extension mechanism is required.

Author:
John Kaputin (jkaputin@apache.org)

Method Summary
 java.net.URI getNamespace()
          Returns a URI representing the targetNamespace attribute of a <xs:schema> element or the namespace attribute of a <xs:import> element.
 org.apache.ws.commons.schema.XmlSchema getSchemaDefinition()
          Returns an XmlSchema representing the schema definition inlined by a <xs:schema> element or imported by a <xs:import> element.
 XMLElement getXMLElement()
          Returns the XMLElement representing the xs:schema or xs:import element within the wsdl:types element.
 void setNamespace(java.net.URI namespace)
          Set the targetNamespace attribute of a <xs:schema> element or the namespace attribute of a <xs:import> element.
 void setSchemaDefinition(org.apache.ws.commons.schema.XmlSchema schemaDef)
          Sets the schema definition for an inlined schema or schema import to the specified XmlSchema.
 void setXMLElement(XMLElement xsdElement)
          Sets the XMLElement representing the underlying xs:schema or xs:import element.
 

Method Detail

getNamespace

java.net.URI getNamespace()
Returns a URI representing the targetNamespace attribute of a <xs:schema> element or the namespace attribute of a <xs:import> element.

Returns:
a URI representing the schema's namespace

setNamespace

void setNamespace(java.net.URI namespace)
Set the targetNamespace attribute of a <xs:schema> element or the namespace attribute of a <xs:import> element.

Parameters:
namespace -

getSchemaDefinition

org.apache.ws.commons.schema.XmlSchema getSchemaDefinition()
Returns an XmlSchema representing the schema definition inlined by a <xs:schema> element or imported by a <xs:import> element.

Returns:
the XmlSchema representing schema definition.

setSchemaDefinition

void setSchemaDefinition(org.apache.ws.commons.schema.XmlSchema schemaDef)
Sets the schema definition for an inlined schema or schema import to the specified XmlSchema.

Parameters:
schemaDef - the XmlSchema representing this schema

getXMLElement

XMLElement getXMLElement()
Returns the XMLElement representing the xs:schema or xs:import element within the wsdl:types element. This provides an 'wrapper' to the underlying XML Schema infoset for applications that need schema processing alternatives to Apache WS Commons XmlSchema.

Returns:
the XMLElement that wraps the underlying schema or schema import element

setXMLElement

void setXMLElement(XMLElement xsdElement)
Sets the XMLElement representing the underlying xs:schema or xs:import element.

Parameters:
xsdElement - the XMLElement


Copyright © 2007. All Rights Reserved.