com.ebmwebsourcing.commons.schema.api
Interface Schema

All Superinterfaces:
SchemaElement, java.io.Serializable
All Known Implementing Classes:
AbstractSchema, Schema

public interface Schema
extends SchemaElement

Author:
Nicolas Salatge - eBM WebSourcing

Method Summary
 void addAttribute(Attribute attr)
           
 void addElement(Element elmt)
           
 void addImport(Import importDef)
          Add an import to this schema.
 void addInclude(Include includeDef)
          Add an include to this schema.
 void addType(Type type)
           
 javax.xml.namespace.NamespaceContext getAllNamespaces()
           
 Attribute getAttribute(javax.xml.namespace.QName attr)
           
 java.util.List<Attribute> getAttributes()
           
 java.net.URI getDocumentBaseURI()
          Get the document base URI of this definition.
 Element getElement(javax.xml.namespace.QName element)
           
 java.util.List<Element> getElements()
           
 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
 java.lang.String getTargetNamespace()
           
 Type getType(javax.xml.namespace.QName type)
           
 java.util.List<Type> getTypes()
           
 Import removeImport(Import importDef)
          Remove an import from this schema.
 Include removeInclude(Include includeDef)
          Remove an include from this schema.
 void setDocumentBaseURI(java.net.URI documentBaseURI)
          Set the document base URI of this definition.
 
Methods inherited from interface com.ebmwebsourcing.commons.schema.api.SchemaElement
createDocumentation, getDocumentation, setDocumentation
 

Method Detail

getTypes

java.util.List<Type> getTypes()
Returns:

addType

void addType(Type type)

getType

Type getType(javax.xml.namespace.QName type)

getElements

java.util.List<Element> getElements()

addElement

void addElement(Element elmt)

getElement

Element getElement(javax.xml.namespace.QName element)

getAttributes

java.util.List<Attribute> getAttributes()

addAttribute

void addAttribute(Attribute attr)

getAttribute

Attribute getAttribute(javax.xml.namespace.QName attr)

getTargetNamespace

java.lang.String getTargetNamespace()

getAllNamespaces

javax.xml.namespace.NamespaceContext getAllNamespaces()

addImport

void addImport(Import importDef)
Add an import to this schema.

Parameters:
importDef - the import to be added

removeImport

Import removeImport(Import importDef)
Remove an import from this schema.

Parameters:
importDef - the import to be removed
Returns:
the removed Import

getImports

java.util.List<Import> getImports(java.lang.String namespaceURI)
Get the list of imports for the specified namespaceURI.

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

getImports

java.util.List<Import> getImports()
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.


addInclude

void addInclude(Include includeDef)
                throws SchemaException
Add an include to this schema.

Parameters:
includeDef - the include to be added
Throws:
SchemaException

removeInclude

Include removeInclude(Include includeDef)
                      throws SchemaException
Remove an include from this schema.

Parameters:
includeDef - the include to be removed
Returns:
the removed include
Throws:
SchemaException

getIncludes

java.util.List<Include> getIncludes(java.lang.String locationURI)
Get the list of includes for the specified locationURI.

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

getIncludes

java.util.List<Include> getIncludes()
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.


setDocumentBaseURI

void setDocumentBaseURI(java.net.URI documentBaseURI)
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).

Parameters:
documentBaseURI - the document base URI of this definition

getDocumentBaseURI

java.net.URI getDocumentBaseURI()
Get the document base URI of this definition.

Returns:
the document base URI

getSchemaLocation

java.util.Map<java.lang.String,java.lang.String> getSchemaLocation()
get the schema location

Returns:


Copyright © 2008 eBM WebSourcing. All Rights Reserved.