org.apache.ode.utils.xsd
Class SchemaModelImpl

java.lang.Object
  extended by org.apache.ode.utils.xsd.SchemaModelImpl
All Implemented Interfaces:
SchemaModel

public class SchemaModelImpl
extends java.lang.Object
implements SchemaModel

Xerces based schema model.


Nested Class Summary
static class SchemaModelImpl.InternalSchemaResolver
           
 
Method Summary
 boolean isCompatible(javax.xml.namespace.QName type1, javax.xml.namespace.QName type2)
           Determines if two types are compatible using the following logic:
 boolean isSimpleType(javax.xml.namespace.QName type)
          Checks if type is a simple type.
 boolean knowsElementType(javax.xml.namespace.QName elementType)
          Checks if model knows the type as an element type.
 boolean knowsSchemaType(javax.xml.namespace.QName schemaType)
          Checks if the model know the type as a schema type.
static SchemaModel newModel(java.util.Map<java.net.URI,byte[]> schemas)
          Generate a schema model from a collection of schemas.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newModel

public static final SchemaModel newModel(java.util.Map<java.net.URI,byte[]> schemas)
Generate a schema model from a collection of schemas.

Parameters:
schemas - collection of schemas (indexed by systemId)
Returns:
a SchemaModel

isCompatible

public boolean isCompatible(javax.xml.namespace.QName type1,
                            javax.xml.namespace.QName type2)
Description copied from interface: SchemaModel

Determines if two types are compatible using the following logic:

Specified by:
isCompatible in interface SchemaModel
Returns:
See Also:
SchemaModel.isCompatible(javax.xml.namespace.QName, javax.xml.namespace.QName)

isSimpleType

public boolean isSimpleType(javax.xml.namespace.QName type)
Description copied from interface: SchemaModel
Checks if type is a simple type.

Specified by:
isSimpleType in interface SchemaModel
Returns:
DOCUMENTME
See Also:
SchemaModel.isSimpleType(javax.xml.namespace.QName)

knowsElementType

public boolean knowsElementType(javax.xml.namespace.QName elementType)
Description copied from interface: SchemaModel
Checks if model knows the type as an element type.

Specified by:
knowsElementType in interface SchemaModel
Returns:
DOCUMENTME
See Also:
SchemaModel.knowsElementType(javax.xml.namespace.QName)

knowsSchemaType

public boolean knowsSchemaType(javax.xml.namespace.QName schemaType)
Description copied from interface: SchemaModel
Checks if the model know the type as a schema type.

Specified by:
knowsSchemaType in interface SchemaModel
Returns:
DOCUMENTME
See Also:
SchemaModel.knowsSchemaType(javax.xml.namespace.QName)