com.ebmwebsourcing.commons.schema.api.abstractElmt
Class AbstractSchema<E>

java.lang.Object
  extended by com.ebmwebsourcing.commons.schema.api.abstractElmt.AbstractSchemaElement<E>
      extended by com.ebmwebsourcing.commons.schema.api.abstractElmt.AbstractSchema<E>
All Implemented Interfaces:
Schema, SchemaElement, java.io.Serializable
Direct Known Subclasses:
Schema

public abstract class AbstractSchema<E>
extends AbstractSchemaElement<E>
implements Schema

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

Field Summary
 java.util.List<Attribute> attributes
          the list of attributes
protected  java.net.URI baseURI
          the baseUri
protected  org.jdom.Document document
          the jdom document
 java.util.List<Element> elements
          the list of elements
protected  java.util.Map<SchemaReader.FeatureConstants,java.lang.Object> features
          Features
protected  java.util.List<Import> imports
          list of imports
protected  java.util.List<Include> includes
          list of includes
protected  javax.xml.namespace.NamespaceContext namespaceContext
          the namespace context
protected  java.util.Map<java.lang.String,java.lang.String> schemaLocations
          schema location
 java.util.List<Type> types
          the list of types
 
Fields inherited from class com.ebmwebsourcing.commons.schema.api.abstractElmt.AbstractSchemaElement
documentation, model
 
Constructor Summary
AbstractSchema(java.net.URI baseURI, Schema schema, org.jdom.Document doc)
           
 
Method Summary
 void addAttribute(Attribute elmt)
           
 void addElement(Element elmt)
           
 void addImport(Import impt)
          Import operation
protected  void addImportElementsInAllList()
           
 void addInclude(Include incl)
          Include operation
protected  void addIncludeElementsInAllList()
           
 void addType(Type type)
           
 javax.xml.namespace.NamespaceContext getAllNamespaces()
           
 Attribute getAttribute(javax.xml.namespace.QName element)
           
 java.util.List<Attribute> getAttributes()
           
 org.jdom.Document getDocument()
           
 java.net.URI getDocumentBaseURI()
          methods for baseURI
 Element getElement(javax.xml.namespace.QName element)
           
 java.util.List<Element> getElements()
           
 java.util.Map<SchemaReader.FeatureConstants,java.lang.Object> getFeatures()
           
 java.util.List<Import> getImports()
          Get a map of lists containing all the imports defined here.
 java.util.List<Import> getImports(java.lang.String namespaceUri)
          Get the list of imports for the specified namespaceURI.
 java.util.List<Include> getIncludes()
          Get a map of lists containing all the includes defined here.
 java.util.List<Include> 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 schema location
 Type getType(javax.xml.namespace.QName type)
           
 java.util.List<Type> 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 com.ebmwebsourcing.commons.schema.api.abstractElmt.AbstractSchemaElement
createDocumentation, getDocumentation, getModel, setDocumentation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ebmwebsourcing.commons.schema.api.Schema
getTargetNamespace, removeImport, removeInclude
 
Methods inherited from interface com.ebmwebsourcing.commons.schema.api.SchemaElement
createDocumentation, getDocumentation, 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<Import> imports
list of imports


includes

protected java.util.List<Include> includes
list of includes


types

public java.util.List<Type> types
the list of types


elements

public java.util.List<Element> elements
the list of elements


attributes

public java.util.List<Attribute> 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
schema location

Constructor Detail

AbstractSchema

public AbstractSchema(java.net.URI baseURI,
                      Schema schema,
                      org.jdom.Document doc)
Parameters:
schema -
doc -
Method Detail

addImportElementsInAllList

protected void addImportElementsInAllList()

addIncludeElementsInAllList

protected void addIncludeElementsInAllList()

addImport

public void addImport(Import impt)
Import operation

Specified by:
addImport in interface Schema
Parameters:
impt - the import to be added

getImports

public java.util.List<Import> getImports()
Description copied from interface: Schema
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 Schema

getImports

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

Specified by:
getImports in interface Schema
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(Include incl)
                throws SchemaException
Include operation

Specified by:
addInclude in interface Schema
Parameters:
incl - the include to be added
Throws:
WSDLException
SchemaException

getIncludes

public java.util.List<Include> getIncludes()
Description copied from interface: Schema
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 Schema

getIncludes

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

Specified by:
getIncludes in interface Schema
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<Type> getTypes()
Specified by:
getTypes in interface Schema
Returns:

getType

public Type getType(javax.xml.namespace.QName type)
Specified by:
getType in interface Schema

addType

public void addType(Type type)
Specified by:
addType in interface Schema

getAttributes

public java.util.List<Attribute> getAttributes()
Specified by:
getAttributes in interface Schema

getAttribute

public Attribute getAttribute(javax.xml.namespace.QName element)
Specified by:
getAttribute in interface Schema

addAttribute

public void addAttribute(Attribute elmt)
Specified by:
addAttribute in interface Schema

getElements

public java.util.List<Element> getElements()
Specified by:
getElements in interface Schema

getElement

public Element getElement(javax.xml.namespace.QName element)
Specified by:
getElement in interface Schema

addElement

public void addElement(Element elmt)
Specified by:
addElement in interface Schema

getAllNamespaces

public javax.xml.namespace.NamespaceContext getAllNamespaces()
Specified by:
getAllNamespaces in interface Schema

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 Schema
Returns:
the document base URI

setDocumentBaseURI

public void setDocumentBaseURI(java.net.URI documentBaseURI)
Description copied from interface: Schema
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 Schema
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: Schema
get the schema location

Specified by:
getSchemaLocation in interface Schema
Returns:
the schemaLocations

toString

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


Copyright © 2008 eBM WebSourcing. All Rights Reserved.