org.apache.tuscany.sca.xsd.impl
Class XSDefinitionImpl

java.lang.Object
  extended by org.apache.tuscany.sca.xsd.impl.XSDefinitionImpl
All Implemented Interfaces:
Base, XSDefinition

public class XSDefinitionImpl
extends java.lang.Object
implements XSDefinition

Represents a XML schema definition.


Constructor Summary
XSDefinitionImpl()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.util.List<XSDefinition> getAggregatedDefinitions()
          Get the aggregated definitions for a facade XSDefinition
 org.w3c.dom.Document getDocument()
          Get the DOM representation of the XSD
 java.net.URI getLocation()
          Get the location of the XSD
 java.lang.String getNamespace()
          Returns the namespace of this XmlSchema definition.
 XmlSchema getSchema()
          Returns the XmlSchema definition model
 XmlSchemaCollection getSchemaCollection()
           
 XmlSchemaElement getXmlSchemaElement(javax.xml.namespace.QName name)
          Get an XSD element by QName
static
<T extends XmlSchemaObject>
T
getXmlSchemaObject(XmlSchema schema, javax.xml.namespace.QName name, java.lang.Class<T> type)
           
 XmlSchemaType getXmlSchemaType(javax.xml.namespace.QName name)
          Get an XSD type by QName
 int hashCode()
           
 boolean isUnresolved()
          Returns true if the model element is unresolved.
 void setAggregatedDefinitions(java.util.List<XSDefinition> definitions)
          Set the aggregated definitions for a facade XSDefinition
 void setDocument(org.w3c.dom.Document document)
          Set the DOM representation of the XSD
 void setLocation(java.net.URI location)
          Set the location of the XSD
 void setNamespace(java.lang.String namespace)
          Sets the namespace of this XmlSchema definition.
 void setSchema(XmlSchema definition)
          Sets the XmlSchema definition model
 void setSchemaCollection(XmlSchemaCollection schemaCollection)
           
 void setUnresolved(boolean undefined)
          Sets whether the model element is unresolved.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSDefinitionImpl

public XSDefinitionImpl()
Method Detail

getSchema

public XmlSchema getSchema()
Description copied from interface: XSDefinition
Returns the XmlSchema definition model

Specified by:
getSchema in interface XSDefinition
Returns:
the XmlSchema definition model

setSchema

public void setSchema(XmlSchema definition)
Description copied from interface: XSDefinition
Sets the XmlSchema definition model

Specified by:
setSchema in interface XSDefinition
Parameters:
definition - the XmlSchema definition model

isUnresolved

public boolean isUnresolved()
Description copied from interface: Base
Returns true if the model element is unresolved.

Specified by:
isUnresolved in interface Base
Returns:
true if the model element is unresolved.

setUnresolved

public void setUnresolved(boolean undefined)
Description copied from interface: Base
Sets whether the model element is unresolved.

Specified by:
setUnresolved in interface Base
Parameters:
undefined - whether the model element is unresolved

getNamespace

public java.lang.String getNamespace()
Description copied from interface: XSDefinition
Returns the namespace of this XmlSchema definition.

Specified by:
getNamespace in interface XSDefinition
Returns:
the namespace of this XmlSchema definition

setNamespace

public void setNamespace(java.lang.String namespace)
Description copied from interface: XSDefinition
Sets the namespace of this XmlSchema definition.

Specified by:
setNamespace in interface XSDefinition
Parameters:
namespace - the namespace of this XmlSchema definition

getLocation

public java.net.URI getLocation()
Description copied from interface: XSDefinition
Get the location of the XSD

Specified by:
getLocation in interface XSDefinition
Returns:
the location

setLocation

public void setLocation(java.net.URI location)
Description copied from interface: XSDefinition
Set the location of the XSD

Specified by:
setLocation in interface XSDefinition
Parameters:
location - the location to set

getDocument

public org.w3c.dom.Document getDocument()
Description copied from interface: XSDefinition
Get the DOM representation of the XSD

Specified by:
getDocument in interface XSDefinition
Returns:
the document

setDocument

public void setDocument(org.w3c.dom.Document document)
Description copied from interface: XSDefinition
Set the DOM representation of the XSD

Specified by:
setDocument in interface XSDefinition
Parameters:
document - the document to set

getSchemaCollection

public XmlSchemaCollection getSchemaCollection()
Specified by:
getSchemaCollection in interface XSDefinition
Returns:
the schemaCollection

setSchemaCollection

public void setSchemaCollection(XmlSchemaCollection schemaCollection)
Specified by:
setSchemaCollection in interface XSDefinition
Parameters:
schemaCollection - the schemaCollection to set

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
See Also:
Object.hashCode()

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
See Also:
Object.equals(java.lang.Object)

getXmlSchemaObject

public static <T extends XmlSchemaObject> T getXmlSchemaObject(XmlSchema schema,
                                                               javax.xml.namespace.QName name,
                                                               java.lang.Class<T> type)

getXmlSchemaElement

public XmlSchemaElement getXmlSchemaElement(javax.xml.namespace.QName name)
Description copied from interface: XSDefinition
Get an XSD element by QName

Specified by:
getXmlSchemaElement in interface XSDefinition
Parameters:
name - The element name
Returns:
The XSD element

getXmlSchemaType

public XmlSchemaType getXmlSchemaType(javax.xml.namespace.QName name)
Description copied from interface: XSDefinition
Get an XSD type by QName

Specified by:
getXmlSchemaType in interface XSDefinition
Parameters:
name - The type name
Returns:
The XSD type

getAggregatedDefinitions

public java.util.List<XSDefinition> getAggregatedDefinitions()
Description copied from interface: XSDefinition
Get the aggregated definitions for a facade XSDefinition

Specified by:
getAggregatedDefinitions in interface XSDefinition
Returns:
The aggregated definitions, or null if not a facade

setAggregatedDefinitions

public void setAggregatedDefinitions(java.util.List<XSDefinition> definitions)
Description copied from interface: XSDefinition
Set the aggregated definitions for a facade XSDefinition

Specified by:
setAggregatedDefinitions in interface XSDefinition