com.jaxfront.core.schema
Interface XMLSchema

All Known Implementing Classes:
XMLSchemaImpl

public interface XMLSchema

Represents a W3C XML Schema. Every schema is holding the root name, available code tables and all global entities.


Method Summary
 Type buildType(SchemaNode element)
          Returns the analysed JAXFront type according to my schema element children.
 Document createDocument()
          Returns a new JAXFront Document.
 Document createDocument(java.util.Hashtable params)
          Returns a new JAXFront Document.
 Type createTypeCopy(SchemaNode element)
          Creates a copy of the analysed JAXFront type for the passing element.
 CodeTables getCodeTables()
          Returns a loaded code tables for this XML Schema.
 CodeTables getCodeTables(XMLSchema schema, java.lang.String url, java.net.URL xuiURL)
          Returns all loaded code tables for a specific url (e.q. po.codes).
 CodeTables getCodeTables(XMLSchema schema, java.lang.String fileURL, java.net.URL xuiurl, org.apache.xerces.xni.parser.XMLEntityResolver entityResolver)
           
 java.lang.String getDefaultNamespace()
          Returns the default namespace of this schema.
 java.lang.String[] getDerivedTypeNames(java.lang.String abstractName)
          Returns all derived type names whith a specific name of a submitted abstract type.
 java.util.Set getDerivedTypes(java.lang.String abstractName, java.lang.String name)
          Returns all derived types whith a specific name of a submitted abstract type.
 java.util.Map getGlobalElements()
          Returns all global elements of this schema.
 java.util.Map getGlobalEntities()
          Returns all global entities of this schema.
 SchemaNode getGlobalEntity(SchemaNode node)
           
 SchemaNode getGlobalEntity(short type, java.lang.String name)
          Returns a global entity with a specific name.
 SchemaKey getKey(java.lang.String name)
          Returns a schema key.
 SchemaKeyRef getKeyRef(java.lang.String name)
          Returns a schema key ref.
 java.lang.String getLocationPath()
          Returns the absolute filepath that points to the schema.
 java.util.Vector getNamespaceDeclarations(java.lang.String schemaLocation)
          Gets all namespace declarations of this schema.
 java.util.Vector getNamespaceDeclarations(java.lang.String schemaLocation, boolean isXuiDom)
          Gets all namespace declarations of this schema.
 java.util.Hashtable getNamespaceMapping()
           
 java.lang.String getNamespacePrefix(java.lang.String nsURI)
          Gets the prefix of a namespace URI.
 org.apache.xerces.xs.StringList getNamespaceURIs()
          Gets all namespace URIs of this schema.
 SchemaNode getRootElement()
          Returns the root element of this XML schema.
 java.lang.String getRootName()
          Returns the logical XML Schema root name.
 Type getRootType()
          Returns the analysed JAXFront type of the root element.
 Document getSCDom()
           
 java.util.Map getSchemaRootNodeAttributes()
          Returns all attributes defined on schema node.
 java.lang.String getTargetNamespace()
          Returns the target namespace of this schema.
 Type getType(SchemaNode element)
          Get the analysed JAXFront Type from a Schema Element.
 Type getType(SchemaNode element, TreeWalkingElementAnalyser analyser)
           
 java.net.URL getURL()
          Returns the url location of this schema.
 boolean isDefaultNamespace(java.lang.String ns)
          Returns true if this schema is the xui.xsd.
 boolean isGlobalEntity(short type, java.lang.String name)
          Returns true if a global entity with the given name is registered.
 boolean isSynced()
           
 boolean isXUISchema()
           
 boolean keepInMemory()
          Returns true if this schema shouldnt be released.
 void registerKey(java.lang.String keyName, SchemaKey element)
          Register a key.
 void registerKeyRef(java.lang.String keyName, SchemaKeyRef element)
          Register a key reference.
 void release()
          Release all allocated global entities and derived types and any other resources added to this schema.
 void releaseGlobalXUIDefinitions()
          Get rid of the global xui definitions in the global schema type entities.
 void setBase(java.net.URL base)
          Set the base url of the XML schema.
 void setKeepInMemory(boolean keep)
           
 void setRootName(java.lang.String rootName)
          Sets the root name for this schema.
 void setSCDom(Document document)
           
 void setSynced(boolean b)
           
 

Method Detail

buildType

Type buildType(SchemaNode element)
Returns the analysed JAXFront type according to my schema element children.


createDocument

Document createDocument()
Returns a new JAXFront Document.


createDocument

Document createDocument(java.util.Hashtable params)
Returns a new JAXFront Document.


createTypeCopy

Type createTypeCopy(SchemaNode element)
Creates a copy of the analysed JAXFront type for the passing element.

Parameters:
element - SchemaNode to create a type copy from

getCodeTables

CodeTables getCodeTables()
Returns a loaded code tables for this XML Schema.


getCodeTables

CodeTables getCodeTables(XMLSchema schema,
                         java.lang.String url,
                         java.net.URL xuiURL)
Returns all loaded code tables for a specific url (e.q. po.codes).

Parameters:
url - location of the code table file (e.q. c:\temp\po.codes)

getCodeTables

CodeTables getCodeTables(XMLSchema schema,
                         java.lang.String fileURL,
                         java.net.URL xuiurl,
                         org.apache.xerces.xni.parser.XMLEntityResolver entityResolver)

getDefaultNamespace

java.lang.String getDefaultNamespace()
Returns the default namespace of this schema.


getDerivedTypeNames

java.lang.String[] getDerivedTypeNames(java.lang.String abstractName)
Returns all derived type names whith a specific name of a submitted abstract type.

Parameters:
abstractName - abstract element name

getDerivedTypes

java.util.Set getDerivedTypes(java.lang.String abstractName,
                              java.lang.String name)
Returns all derived types whith a specific name of a submitted abstract type.

Parameters:
abstractName - abstract element name
name - derived type name to look for

getGlobalElements

java.util.Map getGlobalElements()
Returns all global elements of this schema.


getGlobalEntities

java.util.Map getGlobalEntities()
Returns all global entities of this schema.


getGlobalEntity

SchemaNode getGlobalEntity(SchemaNode node)

getGlobalEntity

SchemaNode getGlobalEntity(short type,
                           java.lang.String name)
Returns a global entity with a specific name.

Parameters:
name - global entity name to look for

getKey

SchemaKey getKey(java.lang.String name)
Returns a schema key.


getKeyRef

SchemaKeyRef getKeyRef(java.lang.String name)
Returns a schema key ref.


getLocationPath

java.lang.String getLocationPath()
Returns the absolute filepath that points to the schema.

Returns:
the absolute filepath that points to the schema

getNamespaceDeclarations

java.util.Vector getNamespaceDeclarations(java.lang.String schemaLocation)
Gets all namespace declarations of this schema.

Returns:
all namespace declarations (e.g. xmlns:xsi="http://www.w3org/2001/XMLSchema-instance")

getNamespaceDeclarations

java.util.Vector getNamespaceDeclarations(java.lang.String schemaLocation,
                                          boolean isXuiDom)
Gets all namespace declarations of this schema.

Returns:
all namespace declarations (e.g. xmlns:xsi="http://www.w3org/2001/XMLSchema-instance")

getNamespaceMapping

java.util.Hashtable getNamespaceMapping()

getNamespacePrefix

java.lang.String getNamespacePrefix(java.lang.String nsURI)
Gets the prefix of a namespace URI.

Parameters:
nsURI - a namespace URI
Returns:
the associated prefix

getNamespaceURIs

org.apache.xerces.xs.StringList getNamespaceURIs()
Gets all namespace URIs of this schema.

Returns:
all namespace URIs

getRootElement

SchemaNode getRootElement()
Returns the root element of this XML schema.


getRootName

java.lang.String getRootName()
Returns the logical XML Schema root name.


getRootType

Type getRootType()
Returns the analysed JAXFront type of the root element.


getSCDom

Document getSCDom()

getSchemaRootNodeAttributes

java.util.Map getSchemaRootNodeAttributes()
Returns all attributes defined on schema node.


getTargetNamespace

java.lang.String getTargetNamespace()
Returns the target namespace of this schema.


getType

Type getType(SchemaNode element)
Get the analysed JAXFront Type from a Schema Element.

Parameters:
element - Schema Element to get the analysed JAXFront Type from

getType

Type getType(SchemaNode element,
             TreeWalkingElementAnalyser analyser)

getURL

java.net.URL getURL()
Returns the url location of this schema.


isDefaultNamespace

boolean isDefaultNamespace(java.lang.String ns)
Returns true if this schema is the xui.xsd.


isGlobalEntity

boolean isGlobalEntity(short type,
                       java.lang.String name)
Returns true if a global entity with the given name is registered.

Parameters:
name - global entity name to look for

isSynced

boolean isSynced()

isXUISchema

boolean isXUISchema()

keepInMemory

boolean keepInMemory()
Returns true if this schema shouldnt be released.


registerKey

void registerKey(java.lang.String keyName,
                 SchemaKey element)
Register a key.

Parameters:
keyName - name of the key
element - holding schema element

registerKeyRef

void registerKeyRef(java.lang.String keyName,
                    SchemaKeyRef element)
Register a key reference.

Parameters:
keyName - name of the key reference
element - holding schema element

release

void release()
Release all allocated global entities and derived types and any other resources added to this schema.


releaseGlobalXUIDefinitions

void releaseGlobalXUIDefinitions()
Get rid of the global xui definitions in the global schema type entities.


setBase

void setBase(java.net.URL base)
Set the base url of the XML schema.


setKeepInMemory

void setKeepInMemory(boolean keep)

setRootName

void setRootName(java.lang.String rootName)
Sets the root name for this schema.


setSCDom

void setSCDom(Document document)

setSynced

void setSynced(boolean b)