org.ow2.easywsdl.schema.api.abstractElmt
Class AbstractSchemaImpl<E,T extends AbsItfType,El extends AbsItfElement,A extends AbsItfAttribute,Incl extends AbsItfInclude,Impt extends AbsItfImport>

java.lang.Object
  extended by org.ow2.easywsdl.schema.api.abstractElmt.AbstractSchemaElementImpl<E>
      extended by org.ow2.easywsdl.schema.api.abstractElmt.AbstractSchemaImpl<E,T,El,A,Incl,Impt>
All Implemented Interfaces:
java.io.Serializable, AbsItfSchema<T,El,A,Incl,Impt>, SchemaElement
Direct Known Subclasses:
SchemaImpl

public abstract class AbstractSchemaImpl<E,T extends AbsItfType,El extends AbsItfElement,A extends AbsItfAttribute,Incl extends AbsItfInclude,Impt extends AbsItfImport>
extends AbstractSchemaElementImpl<E>
implements AbsItfSchema<T,El,A,Incl,Impt>

Author:
Nicolas Salatge - eBM WebSourcing
See Also:
Serialized Form

Field Summary
 java.util.List<A> attributes
          the list of attributes
protected  java.net.URI baseURI
          the baseUri
protected  org.jdom.Document document
          the jdom document
 java.util.List<El> elements
          the list of elements
protected  java.util.Map<SchemaReader.FeatureConstants,java.lang.Object> features
          Features
protected  java.util.List<Impt> imports
          list of imports
protected  java.util.List<Incl> includes
          list of includes
protected  javax.xml.namespace.NamespaceContext namespaceContext
          the namespace context
protected  java.util.Map<java.lang.String,java.lang.String> schemaLocations
          parent location
 java.util.List<T> types
          the list of types
 
Fields inherited from class org.ow2.easywsdl.schema.api.abstractElmt.AbstractSchemaElementImpl
documentation, model, parent
 
Constructor Summary
AbstractSchemaImpl()
           
AbstractSchemaImpl(java.net.URI baseURI, E schema, org.jdom.Document doc)
           
 
Method Summary
 void addAttribute(A elmt)
           
 void addElement(El elmt)
           
 void addImport(Impt impt)
          ImportImpl operation
protected  void addImportElementsInAllList()
           
 void addInclude(Incl incl)
          IncludeImpl operation
protected  void addIncludeElementsInAllList()
           
 void addType(T type)
           
 javax.xml.namespace.NamespaceContext getAllNamespaces()
           
 A getAttribute(javax.xml.namespace.QName element)
           
 java.util.List<A> getAttributes()
           
 org.jdom.Document getDocument()
           
 java.net.URI getDocumentBaseURI()
          methods for baseURI
 El getElement(javax.xml.namespace.QName element)
           
 java.util.List<El> getElements()
           
 java.util.Map<SchemaReader.FeatureConstants,java.lang.Object> getFeatures()
           
 java.util.List<Impt> getImports()
          Get a map of lists containing all the imports defined here.
 java.util.List<Impt> getImports(java.lang.String namespaceUri)
          Get the list of imports for the specified namespaceURI.
 java.util.List<Incl> getIncludes()
          Get a map of lists containing all the includes defined here.
 java.util.List<Incl> getIncludes(java.lang.String locationUri)
          Get the list of includes for the specified locationURI.
 java.util.Map<java.lang.String,java.lang.String> getSchemaLocation()
          get the parent location
 T getType(javax.xml.namespace.QName type)
           
 java.util.List<T> getTypes()
           
 void setDocumentBaseURI(java.net.URI documentBaseURI)
          Set the document base URI of this definition.
 void setFeatures(java.util.Map<SchemaReader.FeatureConstants,java.lang.Object> features)
           
 java.lang.String toString()
           
 
Methods inherited from class org.ow2.easywsdl.schema.api.abstractElmt.AbstractSchemaElementImpl
createDocumentation, getDocumentation, getModel, getOtherAttributes, getParent, getSchema, getTopParent, setDocumentation, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.ow2.easywsdl.schema.api.absItf.AbsItfSchema
createAttribute, createComplexType, createElement, createImport, createInclude, createSimpleType, getAttributeFormDefault, getBlockDefault, getElementFormDefault, getFinalDefault, getLang, getTargetNamespace, getVersion, removeImport, removeInclude, setTargetNamespace
 
Methods inherited from interface org.ow2.easywsdl.schema.api.SchemaElement
createDocumentation, getDocumentation, getOtherAttributes, setDocumentation
 

Field Detail

features

protected java.util.Map<SchemaReader.FeatureConstants,java.lang.Object> features
Features


document

protected org.jdom.Document document
the jdom document


namespaceContext

protected javax.xml.namespace.NamespaceContext namespaceContext
the namespace context


imports

protected java.util.List<Impt extends AbsItfImport> imports
list of imports


includes

protected java.util.List<Incl extends AbsItfInclude> includes
list of includes


types

public java.util.List<T extends AbsItfType> types
the list of types


elements

public java.util.List<El extends AbsItfElement> elements
the list of elements


attributes

public java.util.List<A extends AbsItfAttribute> attributes
the list of attributes


baseURI

protected java.net.URI baseURI
the baseUri


schemaLocations

protected java.util.Map<java.lang.String,java.lang.String> schemaLocations
parent location

Constructor Detail

AbstractSchemaImpl

public AbstractSchemaImpl()

AbstractSchemaImpl

public AbstractSchemaImpl(java.net.URI baseURI,
                          E schema,
                          org.jdom.Document doc)
Parameters:
parent -
doc -
Method Detail

addImportElementsInAllList

protected void addImportElementsInAllList()

addIncludeElementsInAllList

protected void addIncludeElementsInAllList()

addImport

public void addImport(Impt impt)
ImportImpl operation

Specified by:
addImport in interface AbsItfSchema<T extends AbsItfType,El extends AbsItfElement,A extends AbsItfAttribute,Incl extends AbsItfInclude,Impt extends AbsItfImport>
Parameters:
impt - the import to be added

getImports

public java.util.List<Impt> getImports()
Description copied from interface: AbsItfSchema
Get a map of lists containing all the imports defined here. The map's keys are the namespaceURIs, and the map's values are lists. There is one list for each namespaceURI for which imports have been defined.

Specified by:
getImports in interface AbsItfSchema<T extends AbsItfType,El extends AbsItfElement,A extends AbsItfAttribute,Incl extends AbsItfInclude,Impt extends AbsItfImport>

getImports

public java.util.List<Impt> getImports(java.lang.String namespaceUri)
Description copied from interface: AbsItfSchema
Get the list of imports for the specified namespaceURI.

Specified by:
getImports in interface AbsItfSchema<T extends AbsItfType,El extends AbsItfElement,A extends AbsItfAttribute,Incl extends AbsItfInclude,Impt extends AbsItfImport>
Parameters:
namespaceUri - the namespaceURI associated with the desired imports.
Returns:
a list of the corresponding imports, or null if there weren't any matching imports

addInclude

public void addInclude(Incl incl)
                throws SchemaException
IncludeImpl operation

Specified by:
addInclude in interface AbsItfSchema<T extends AbsItfType,El extends AbsItfElement,A extends AbsItfAttribute,Incl extends AbsItfInclude,Impt extends AbsItfImport>
Parameters:
incl - the include to be added
Throws:
WSDLException
SchemaException

getIncludes

public java.util.List<Incl> getIncludes()
Description copied from interface: AbsItfSchema
Get a map of lists containing all the includes defined here. The map's keys are the namespaceURIs, and the map's values are lists. There is one list for each locationURI for which imports have been defined.

Specified by:
getIncludes in interface AbsItfSchema<T extends AbsItfType,El extends AbsItfElement,A extends AbsItfAttribute,Incl extends AbsItfInclude,Impt extends AbsItfImport>

getIncludes

public java.util.List<Incl> getIncludes(java.lang.String locationUri)
Description copied from interface: AbsItfSchema
Get the list of includes for the specified locationURI.

Specified by:
getIncludes in interface AbsItfSchema<T extends AbsItfType,El extends AbsItfElement,A extends AbsItfAttribute,Incl extends AbsItfInclude,Impt extends AbsItfImport>
Parameters:
locationUri - the locationURI associated with the desired includes.
Returns:
a list of the corresponding includes, or null if there weren't any matching includes

getTypes

public java.util.List<T> getTypes()
Specified by:
getTypes in interface AbsItfSchema<T extends AbsItfType,El extends AbsItfElement,A extends AbsItfAttribute,Incl extends AbsItfInclude,Impt extends AbsItfImport>
Returns:

getType

public T getType(javax.xml.namespace.QName type)
Specified by:
getType in interface AbsItfSchema<T extends AbsItfType,El extends AbsItfElement,A extends AbsItfAttribute,Incl extends AbsItfInclude,Impt extends AbsItfImport>

addType

public void addType(T type)
Specified by:
addType in interface AbsItfSchema<T extends AbsItfType,El extends AbsItfElement,A extends AbsItfAttribute,Incl extends AbsItfInclude,Impt extends AbsItfImport>

getAttributes

public java.util.List<A> getAttributes()
Specified by:
getAttributes in interface AbsItfSchema<T extends AbsItfType,El extends AbsItfElement,A extends AbsItfAttribute,Incl extends AbsItfInclude,Impt extends AbsItfImport>

getAttribute

public A getAttribute(javax.xml.namespace.QName element)
Specified by:
getAttribute in interface AbsItfSchema<T extends AbsItfType,El extends AbsItfElement,A extends AbsItfAttribute,Incl extends AbsItfInclude,Impt extends AbsItfImport>

addAttribute

public void addAttribute(A elmt)
Specified by:
addAttribute in interface AbsItfSchema<T extends AbsItfType,El extends AbsItfElement,A extends AbsItfAttribute,Incl extends AbsItfInclude,Impt extends AbsItfImport>

getElements

public java.util.List<El> getElements()
Specified by:
getElements in interface AbsItfSchema<T extends AbsItfType,El extends AbsItfElement,A extends AbsItfAttribute,Incl extends AbsItfInclude,Impt extends AbsItfImport>

getElement

public El getElement(javax.xml.namespace.QName element)
Specified by:
getElement in interface AbsItfSchema<T extends AbsItfType,El extends AbsItfElement,A extends AbsItfAttribute,Incl extends AbsItfInclude,Impt extends AbsItfImport>

addElement

public void addElement(El elmt)
Specified by:
addElement in interface AbsItfSchema<T extends AbsItfType,El extends AbsItfElement,A extends AbsItfAttribute,Incl extends AbsItfInclude,Impt extends AbsItfImport>

getAllNamespaces

public javax.xml.namespace.NamespaceContext getAllNamespaces()
Specified by:
getAllNamespaces in interface AbsItfSchema<T extends AbsItfType,El extends AbsItfElement,A extends AbsItfAttribute,Incl extends AbsItfInclude,Impt extends AbsItfImport>

getFeatures

public java.util.Map<SchemaReader.FeatureConstants,java.lang.Object> getFeatures()
Returns:
the features

setFeatures

public void setFeatures(java.util.Map<SchemaReader.FeatureConstants,java.lang.Object> features)
Parameters:
features - the features to set

getDocument

public org.jdom.Document getDocument()
Returns:
the document

getDocumentBaseURI

public java.net.URI getDocumentBaseURI()
methods for baseURI

Specified by:
getDocumentBaseURI in interface AbsItfSchema<T extends AbsItfType,El extends AbsItfElement,A extends AbsItfAttribute,Incl extends AbsItfInclude,Impt extends AbsItfImport>
Returns:
the document base URI

setDocumentBaseURI

public void setDocumentBaseURI(java.net.URI documentBaseURI)
Description copied from interface: AbsItfSchema
Set the document base URI of this definition. Can be used to represent the origin of the Definition, and can be exploited when resolving relative URIs (e.g. in <import>s).

Specified by:
setDocumentBaseURI in interface AbsItfSchema<T extends AbsItfType,El extends AbsItfElement,A extends AbsItfAttribute,Incl extends AbsItfInclude,Impt extends AbsItfImport>
Parameters:
documentBaseURI - the document base URI of this definition

getSchemaLocation

public java.util.Map<java.lang.String,java.lang.String> getSchemaLocation()
Description copied from interface: AbsItfSchema
get the parent location

Specified by:
getSchemaLocation in interface AbsItfSchema<T extends AbsItfType,El extends AbsItfElement,A extends AbsItfAttribute,Incl extends AbsItfInclude,Impt extends AbsItfImport>
Returns:
the schemaLocations

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2008 eBM WebSourcing. All Rights Reserved.