|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jaxme.xs.impl.XSSchemaImpl
Implementation of an XML Schema, as defined by the
XSSchema
interface.
Constructor Summary | |
XSSchemaImpl(XSContext pContext,
XsESchema pSchema)
|
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(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. |
org.xml.sax.Locator |
getLocator()
Returns the objects location. |
XSObject |
getParentObject()
Returns either of the following: If the object is the schema itself, returns null. |
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)
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 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
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |