|
VdexReload 1.1.3 API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.reload.moonunit.schema.ReloadSchemaNode
uk.ac.reload.moonunit.schema.ReloadSchemaElement
An Element node that represents an Element in the Schema. Essentially - this is a wrapper for an ElementDecl type
Field Summary | |
protected java.util.Vector |
_attributes
Any Attributes |
protected java.util.Vector |
_children
Any child ReloadSchemaElement objects |
protected org.exolab.castor.xml.schema.ElementDecl |
_elementDecl
The wrapped Castor ElementDecl that we will interrogate |
Fields inherited from class uk.ac.reload.moonunit.schema.ReloadSchemaNode |
_parent |
Fields inherited from interface uk.ac.reload.moonunit.MoonUnitConstants |
DEBUG |
Constructor Summary | |
ReloadSchemaElement(org.exolab.castor.xml.schema.ElementDecl elementDecl)
Constructor to wrap ElementDecl. |
Method Summary | |
protected void |
addAttributes()
Add any ReloadSchemaAttribute objects |
protected void |
addChildElementDecl(org.exolab.castor.xml.schema.ElementDecl childElementDecl)
Add another ElementDecl child |
protected void |
buildChildGroup(org.exolab.castor.xml.schema.Group group)
Build a Group type - this can contain more Elements and Groups |
protected java.util.Vector |
buildChildren()
Recurse and build up all child Elements and Attributes of ElementDecl |
java.lang.String |
getAtomicBaseTypeName()
Get the Atomic Base type name of this Element. |
ReloadSchemaAttribute |
getAttribute(java.lang.String attName)
Get a ReloadSchemaAttribute by its name |
ReloadSchemaAttribute |
getAttribute(java.lang.String attName,
org.jdom.Namespace ns)
Get a ReloadSchemaAttribute by its name and Namespace |
ReloadSchemaAttribute |
getAttributeAtIndex(int index)
Return a ReloadSchemaAttribute by its index position |
ReloadSchemaAttribute[] |
getAttributes()
Get an array of ReloadSchemaAttribute objects |
java.lang.String |
getBaseTypeName()
Get the Base type name of this Element. |
ReloadSchemaElement |
getChild(java.lang.String childName)
Get a child schema element by name |
ReloadSchemaElement |
getChild(java.lang.String childName,
org.jdom.Namespace ns)
Get a child schema element by name with given namespace |
ReloadSchemaElement |
getChildAt(int index)
Get the child ReloadSchemaElement at index position |
int |
getChildCount()
Get the child count of ReloadSchemaElement child objects. |
java.lang.String[] |
getChildNames()
Return a String array of child names |
ReloadSchemaElement[] |
getChildren()
Get the Children Elements of this Element. |
ReloadSchemaElement[] |
getChildren(org.jdom.Namespace ns)
Get the Children Elements of this Element with a given Namespace. |
java.lang.String |
getDefaultValue()
Returns the default value of this element definition if it is an ElementDecl. |
DomPath |
getDomPath()
Get the path to this Element. |
java.lang.String |
getFacetValue(java.lang.String facetName)
Get a facet value |
int |
getMaxOccurs()
Get the maximum amount of times this element can occur - -1 means unbounded. |
int |
getMinOccurs()
Get the minimum amount of times this element can occur - 0 means optional |
java.lang.String |
getName()
Get the name of the ElementDecl |
org.jdom.Namespace |
getNamespace()
Get the Namespace of this Schema Element |
java.lang.String |
getNamespacePrefix()
Get the Prefix of this Element, or "" if no prefix |
java.lang.String |
getTypeName()
Get the type name of this Element. |
ReloadVocabularyList |
getVocabularyList()
Get the inbuilt vocabulary list for this Element. |
protected org.exolab.castor.xml.schema.XMLType |
getXMLType()
Get the xml type of the ElementDecl - this is either ComplexType or SimpleType. |
boolean |
hasAncestor(ReloadSchemaElement schemaElement)
Determine if a schemaElement has an ancestor of the same name |
boolean |
hasAttribute(java.lang.String attName)
Return whether this Element has an Attribute by Name |
boolean |
hasAttributes()
Return whether this Element has Attributes |
boolean |
hasChild(java.lang.String childName)
Return whether this ReloadSchemaElement has a child Element by name. |
boolean |
hasChildren()
Return whether this Element has Child Elements. |
int |
indexofAttribute(ReloadSchemaAttribute att)
Return the index of an Attribute |
int |
indexofAttribute(java.lang.String attName)
Return the index of an Attribute by name |
int |
indexofChild(ReloadSchemaElement child)
Get the index of the child element |
int |
indexofChild(java.lang.String childName)
Return the index of a child by name |
boolean |
isComplexType()
Return whether this Element is made up of other Elements. |
boolean |
isRoot()
Return whether we are the Root Element, i.e our parent is null |
boolean |
isStringType()
Determine whether this element's base type name is a String type |
boolean |
isValue()
|
ReloadSchemaElement |
setReloadSchema(ReloadSchema reloadSchema)
Set the parent owning ReloadSchema |
java.lang.String |
toString()
A String representation of this Element. |
Methods inherited from class uk.ac.reload.moonunit.schema.ReloadSchemaNode |
getParent, getReloadSchema, isExternalNamespace, setParent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected org.exolab.castor.xml.schema.ElementDecl _elementDecl
protected java.util.Vector _children
protected java.util.Vector _attributes
Constructor Detail |
public ReloadSchemaElement(org.exolab.castor.xml.schema.ElementDecl elementDecl)
elementDecl
- The wrapped Castor ElementDeclMethod Detail |
protected void addAttributes()
public ReloadSchemaElement setReloadSchema(ReloadSchema reloadSchema)
reloadSchema
- The parent owning ReloadSchema
public java.lang.String getName()
getName
in class ReloadSchemaNode
public java.lang.String getNamespacePrefix()
getNamespacePrefix
in class ReloadSchemaNode
public org.jdom.Namespace getNamespace()
getNamespace
in class ReloadSchemaNode
public boolean isRoot()
public DomPath getDomPath()
getDomPath
in class ReloadSchemaNode
public ReloadVocabularyList getVocabularyList()
public java.lang.String getTypeName()
getTypeName
in class ReloadSchemaNode
public java.lang.String getBaseTypeName()
getBaseTypeName
in class ReloadSchemaNode
public java.lang.String getAtomicBaseTypeName()
public boolean isValue()
public boolean isStringType()
public int getMinOccurs()
public int getMaxOccurs()
public java.lang.String getDefaultValue()
getDefaultValue
in class ReloadSchemaNode
protected org.exolab.castor.xml.schema.XMLType getXMLType()
public boolean isComplexType()
public java.lang.String getFacetValue(java.lang.String facetName)
getFacetValue
in class ReloadSchemaNode
facetName
- the facet name
public ReloadSchemaAttribute[] getAttributes()
public ReloadSchemaAttribute getAttribute(java.lang.String attName)
attName
- the attribute name
public ReloadSchemaAttribute getAttribute(java.lang.String attName, org.jdom.Namespace ns)
attName
- the attribute namens
- the attribute namespace
public ReloadSchemaAttribute getAttributeAtIndex(int index)
index
- the index position of the Attribute
public boolean hasAttributes()
public boolean hasAttribute(java.lang.String attName)
attName
- the attribute name
public int indexofAttribute(ReloadSchemaAttribute att)
att
- the ReloadSchemaAttribute concerned
public int indexofAttribute(java.lang.String attName)
attName
- the attribute name
public java.lang.String toString()
public ReloadSchemaElement[] getChildren()
public ReloadSchemaElement[] getChildren(org.jdom.Namespace ns)
ns
- the given namespace
public int getChildCount()
public boolean hasChildren()
public boolean hasChild(java.lang.String childName)
childName
- the name of the child element
public ReloadSchemaElement getChild(java.lang.String childName)
childName
- the name of the child element
public ReloadSchemaElement getChild(java.lang.String childName, org.jdom.Namespace ns)
childName
- the name of the child elementns
- the namespace of the child element
public ReloadSchemaElement getChildAt(int index)
index
- the index position of the child element
public int indexofChild(ReloadSchemaElement child)
public int indexofChild(java.lang.String childName)
childName
- the name of the child element
public java.lang.String[] getChildNames()
protected java.util.Vector buildChildren()
protected void buildChildGroup(org.exolab.castor.xml.schema.Group group)
group
- protected void addChildElementDecl(org.exolab.castor.xml.schema.ElementDecl childElementDecl)
childElementDecl
- the child ElementDecl to addpublic boolean hasAncestor(ReloadSchemaElement schemaElement)
|
VdexReload 1.1.3 API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |