|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.ws.jaxme.xs.impl.XSSchemaImpl
public class XSSchemaImpl
Implementation of an XML Schema, as defined by the
XSSchema
interface.
Constructor Summary | |
---|---|
XSSchemaImpl(XSContext pContext,
XsESchema pSchema)
Creates a new logical schema by loading data, which represents the given syntactical schema pSchema and uses the given context
pContext for acquiring additional
information. |
Method Summary | |
---|---|
void |
add(XSAnnotation pAnnotation)
Adds a new annotation to the schema. |
void |
add(XSAttribute pAttribute)
Adds a new attribute to the schema. |
void |
add(XSAttributeGroup pGroup)
Adds a new attribute group to the schema. |
void |
add(XSElement pElement)
Adds a new element to the schema. |
void |
add(XSGroup pGroup)
Adds a new group to the schema. |
void |
add(XSIdentityConstraint ic)
Adds a new identity constraint to the schema. |
void |
add(XSKeyRef rf)
Adds a new key ref to the schema. |
void |
add(XSNotation pNotation)
Adds a new notation to the schema. |
void |
add(XSType pType)
Adds a new type to the schema. |
protected void |
addChild(java.lang.Object pChild)
Adds a new child to the array returned by getChilds() . |
XSAnnotation[] |
getAnnotations()
Returns the array of annotations. |
XSAttribute |
getAttribute(XsQName pQName)
Returns the attribute with the given name. |
XSAttributeGroup |
getAttributeGroup(XsQName pName)
Returns the attribute group with the given name. |
XSAttributeGroup[] |
getAttributeGroups()
Returns the array of global attribute groups. |
XSAttribute[] |
getAttributes()
Returns the array of global attributes. |
XSType[] |
getBuiltinTypes()
Returns the array of builtin types. |
java.lang.Object[] |
getChilds()
Returns all the schema annotations, types, groups, attribute groups, elements, and attributes, in the order of declaration. |
XSContext |
getContext()
Returns the schemas context. |
XSElement |
getElement(XsQName pName)
Returns the element with the given name. |
XSElement[] |
getElements()
Returns the array of global elements. |
XSGroup |
getGroup(XsQName pName)
Returns the group with the given name. |
XSGroup[] |
getGroups()
Returns the array of global groups. |
java.util.Map |
getIdentityConstraints()
Returns a map of XSIdentityConstraint objects. |
java.util.Map |
getKeyRefs()
Returns a map of XSKeyRef objects. |
org.xml.sax.Locator |
getLocator()
Returns the objects location. |
org.xml.sax.Attributes |
getOpenAttributes()
Returns the additional attributes, if any, or null. |
XSObject |
getParentObject()
Returns either of the following: If the object is the schema itself, returns null. |
XsAnyURI |
getTargetNamespace()
Returns the schemas target namespace. |
XSType |
getType(XsQName pName)
Returns the type with the given name. |
XSType[] |
getTypes()
Returns the array of global types. |
protected XsESchema |
getXsESchema()
|
XSObjectFactory |
getXSObjectFactory()
Returns the schemas object factory. |
XSSchema |
getXSSchema()
Returns the objects schema. |
boolean |
isTopLevelObject()
Returns whether the object is a top-level object. |
protected boolean |
isValidated()
|
void |
redefine(XSAttributeGroup pGroup)
Redefines an existing attribute group in the schema. |
void |
redefine(XSGroup pGroup)
Redefines an existing group in the schema. |
void |
redefine(XSType pType)
Redefines an existing type in the schema. |
protected void |
replace(java.lang.Object pOldChild,
java.lang.Object pNewChild)
Replaces the existing child pOldChild with
the replacement object pNewChild . |
void |
validate()
Validates the objects internal state. |
protected void |
validate(java.lang.Object pChild)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XSSchemaImpl(XSContext pContext, XsESchema pSchema)
Creates a new logical schema by loading data,
which represents the given syntactical schema
pSchema
and uses the given context
pContext
for acquiring additional
information.
Method Detail |
---|
public XSContext getContext()
XSSchema
Returns the schemas context.
getContext
in interface XSSchema
public boolean isTopLevelObject()
XSObject
Returns whether the object is a top-level object. This is the case for the XsESchema itself and for all its childs only.
isTopLevelObject
in interface XSObject
public XSObject getParentObject()
XSObject
Returns either of the following:
getParentObject
in interface XSObject
public XSObjectFactory getXSObjectFactory()
XSSchema
Returns the schemas object factory.
getXSObjectFactory
in interface XSSchema
public org.xml.sax.Locator getLocator()
XSObject
Returns the objects location.
getLocator
in interface XSObject
public XSSchema getXSSchema()
XSObject
Returns the objects schema.
getXSSchema
in interface XSObject
protected XsESchema getXsESchema()
protected void addChild(java.lang.Object pChild)
Adds a new child to the array returned by getChilds()
.
protected void replace(java.lang.Object pOldChild, java.lang.Object pNewChild)
Replaces the existing child pOldChild
with
the replacement object pNewChild
. This method
is used from within the various redefine()
methods.
public XSAnnotation[] getAnnotations()
XSSchema
Returns the array of annotations.
getAnnotations
in interface XSSchema
public XSType[] getTypes()
XSSchema
Returns the array of global types. This includes simple and complex types. The builtin types are not included.
getTypes
in interface XSSchema
XSSchema.getType(XsQName)
public XSType[] getBuiltinTypes()
XSSchema
Returns the array of builtin types. This includes simple and complex types.
getBuiltinTypes
in interface XSSchema
XSSchema.getTypes()
public XSType getType(XsQName pName)
XSSchema
Returns the type with the given name. This may be a builtin type or a type defined by the schema.
getType
in interface XSSchema
public XSGroup[] getGroups()
XSSchema
Returns the array of global groups.
getGroups
in interface XSSchema
public XSGroup getGroup(XsQName pName)
XSSchema
Returns the group with the given name.
getGroup
in interface XSSchema
public XSAttributeGroup[] getAttributeGroups()
XSSchema
Returns the array of global attribute groups.
getAttributeGroups
in interface XSSchema
public XSAttributeGroup getAttributeGroup(XsQName pName)
XSSchema
Returns the attribute group with the given name.
getAttributeGroup
in interface XSSchema
public XSElement[] getElements()
XSSchema
Returns the array of global elements.
getElements
in interface XSSchema
public XSElement getElement(XsQName pName)
XSSchema
Returns the element with the given name.
getElement
in interface XSSchema
public java.util.Map getIdentityConstraints()
XSSchema
Returns a map of XSIdentityConstraint objects. The key is the constraints name. The map is immutable.
getIdentityConstraints
in interface XSSchema
public java.util.Map getKeyRefs()
XSSchema
Returns a map of XSKeyRef objects. The key is the key refs name. The map is immutable.
getKeyRefs
in interface XSSchema
public void add(XSIdentityConstraint ic) throws org.xml.sax.SAXException
XSSchema
Adds a new identity constraint to the schema.
add
in interface XSSchema
org.xml.sax.SAXException
public void add(XSKeyRef rf) throws org.xml.sax.SAXException
XSSchema
Adds a new key ref to the schema.
add
in interface XSSchema
org.xml.sax.SAXException
public XSAttribute[] getAttributes()
XSSchema
Returns the array of global attributes.
getAttributes
in interface XSSchema
public XSAttribute getAttribute(XsQName pQName)
XSSchema
Returns the attribute with the given name.
getAttribute
in interface XSSchema
public void add(XSAnnotation pAnnotation)
XSSchema
Adds a new annotation to the schema.
add
in interface XSSchema
public void add(XSType pType) throws org.xml.sax.SAXException
XSSchema
Adds a new type to the schema.
add
in interface XSSchema
org.xml.sax.SAXException
public void redefine(XSType pType) throws org.xml.sax.SAXException
XSSchema
Redefines an existing type in the schema.
redefine
in interface XSSchema
org.xml.sax.SAXException
public void add(XSGroup pGroup) throws org.xml.sax.SAXException
XSSchema
Adds a new group to the schema.
add
in interface XSSchema
org.xml.sax.SAXException
public void redefine(XSGroup pGroup) throws org.xml.sax.SAXException
XSSchema
Redefines an existing group in the schema.
redefine
in interface XSSchema
org.xml.sax.SAXException
public void add(XSAttributeGroup pGroup) throws org.xml.sax.SAXException
XSSchema
Adds a new attribute group to the schema.
add
in interface XSSchema
org.xml.sax.SAXException
public void redefine(XSAttributeGroup pGroup) throws org.xml.sax.SAXException
XSSchema
Redefines an existing attribute group in the schema.
redefine
in interface XSSchema
org.xml.sax.SAXException
public void add(XSAttribute pAttribute) throws org.xml.sax.SAXException
XSSchema
Adds a new attribute to the schema.
add
in interface XSSchema
org.xml.sax.SAXException
public void add(XSElement pElement) throws org.xml.sax.SAXException
XSSchema
Adds a new element to the schema.
add
in interface XSSchema
org.xml.sax.SAXException
public void add(XSNotation pNotation)
XSSchema
Adds a new notation to the schema.
add
in interface XSSchema
public java.lang.Object[] getChilds()
XSSchema
Returns all the schema annotations, types, groups, attribute groups, elements, and attributes, in the order of declaration.
getChilds
in interface XSSchema
protected void validate(java.lang.Object pChild) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected boolean isValidated()
public void validate() throws org.xml.sax.SAXException
XSObject
Validates the objects internal state.
validate
in interface XSObject
org.xml.sax.SAXException
public org.xml.sax.Attributes getOpenAttributes()
XSOpenAttrs
Returns the additional attributes, if any, or null.
getOpenAttributes
in interface XSOpenAttrs
public XsAnyURI getTargetNamespace()
XSSchema
Returns the schemas target namespace. Note, that a
logical schema
can combine elements,
attributes, groups, and types of various namespaces by
importing other syntactical schemas
with different namespaces. Thus
the logical schemas target namespace is in fact the
target namespace of the outermost syntactical schema.
getTargetNamespace
in interface XSSchema
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |