|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ws.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(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. |
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()
XSSchemaReturns the schemas context.
getContext in interface XSSchemapublic boolean isTopLevelObject()
XSObjectReturns 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 XSObjectpublic XSObject getParentObject()
XSObjectReturns either of the following:
getParentObject in interface XSObjectpublic XSObjectFactory getXSObjectFactory()
XSSchemaReturns the schemas object factory.
getXSObjectFactory in interface XSSchemapublic org.xml.sax.Locator getLocator()
XSObjectReturns the objects location.
getLocator in interface XSObjectpublic XSSchema getXSSchema()
XSObjectReturns the objects schema.
getXSSchema in interface XSObjectprotected 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()
XSSchemaReturns the array of annotations.
getAnnotations in interface XSSchemapublic XSType[] getTypes()
XSSchemaReturns the array of global types. This includes simple and complex types. The builtin types are not included.
getTypes in interface XSSchemaXSSchema.getType(XsQName)public XSType[] getBuiltinTypes()
XSSchemaReturns the array of builtin types. This includes simple and complex types.
getBuiltinTypes in interface XSSchemaXSSchema.getTypes()public XSType getType(XsQName pName)
XSSchemaReturns the type with the given name. This may be a builtin type or a type defined by the schema.
getType in interface XSSchemapublic XSGroup[] getGroups()
XSSchemaReturns the array of global groups.
getGroups in interface XSSchemapublic XSGroup getGroup(XsQName pName)
XSSchemaReturns the group with the given name.
getGroup in interface XSSchemapublic XSAttributeGroup[] getAttributeGroups()
XSSchemaReturns the array of global attribute groups.
getAttributeGroups in interface XSSchemapublic XSAttributeGroup getAttributeGroup(XsQName pName)
XSSchemaReturns the attribute group with the given name.
getAttributeGroup in interface XSSchemapublic XSElement[] getElements()
XSSchemaReturns the array of global elements.
getElements in interface XSSchemapublic XSElement getElement(XsQName pName)
XSSchemaReturns the element with the given name.
getElement in interface XSSchemapublic java.util.Map getIdentityConstraints()
XSSchemaReturns a map of XSIdentityConstraint objects. The key is the constraints name. The map is immutable.
getIdentityConstraints in interface XSSchemapublic java.util.Map getKeyRefs()
XSSchemaReturns 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
XSSchemaAdds a new identity constraint to the schema.
add in interface XSSchemaorg.xml.sax.SAXException
public void add(XSKeyRef rf)
throws org.xml.sax.SAXException
XSSchemaAdds a new key ref to the schema.
add in interface XSSchemaorg.xml.sax.SAXExceptionpublic XSAttribute[] getAttributes()
XSSchemaReturns the array of global attributes.
getAttributes in interface XSSchemapublic XSAttribute getAttribute(XsQName pQName)
XSSchemaReturns the attribute with the given name.
getAttribute in interface XSSchemapublic void add(XSAnnotation pAnnotation)
XSSchemaAdds a new annotation to the schema.
add in interface XSSchema
public void add(XSType pType)
throws org.xml.sax.SAXException
XSSchemaAdds a new type to the schema.
add in interface XSSchemaorg.xml.sax.SAXException
public void redefine(XSType pType)
throws org.xml.sax.SAXException
XSSchemaRedefines an existing type in the schema.
redefine in interface XSSchemaorg.xml.sax.SAXException
public void add(XSGroup pGroup)
throws org.xml.sax.SAXException
XSSchemaAdds a new group to the schema.
add in interface XSSchemaorg.xml.sax.SAXException
public void redefine(XSGroup pGroup)
throws org.xml.sax.SAXException
XSSchemaRedefines an existing group in the schema.
redefine in interface XSSchemaorg.xml.sax.SAXException
public void add(XSAttributeGroup pGroup)
throws org.xml.sax.SAXException
XSSchemaAdds a new attribute group to the schema.
add in interface XSSchemaorg.xml.sax.SAXException
public void redefine(XSAttributeGroup pGroup)
throws org.xml.sax.SAXException
XSSchemaRedefines an existing attribute group in the schema.
redefine in interface XSSchemaorg.xml.sax.SAXException
public void add(XSAttribute pAttribute)
throws org.xml.sax.SAXException
XSSchemaAdds a new attribute to the schema.
add in interface XSSchemaorg.xml.sax.SAXException
public void add(XSElement pElement)
throws org.xml.sax.SAXException
XSSchemaAdds a new element to the schema.
add in interface XSSchemaorg.xml.sax.SAXExceptionpublic void add(XSNotation pNotation)
XSSchemaAdds a new notation to the schema.
add in interface XSSchemapublic java.lang.Object[] getChilds()
XSSchemaReturns 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.SAXExceptionprotected boolean isValidated()
public void validate()
throws org.xml.sax.SAXException
XSObjectValidates the objects internal state.
validate in interface XSObjectorg.xml.sax.SAXExceptionpublic org.xml.sax.Attributes getOpenAttributes()
XSOpenAttrsReturns the additional attributes, if any, or null.
getOpenAttributes in interface XSOpenAttrs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||