|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.apache.xerces.dom.NodeImpl | +--org.enhydra.apache.xerces.dom.ChildNode | +--org.enhydra.apache.xerces.dom.ParentNode | +--org.enhydra.apache.xerces.dom.ElementImpl | +--org.enhydra.xml.xmlc.metadata.MetaDataElement
Base DOM class for all XMLC metadata element classes. This provides methods to implement attribute and child lookup
Fields inherited from class org.enhydra.apache.xerces.dom.ElementImpl |
attributes, name, serialVersionUID |
Fields inherited from class org.enhydra.apache.xerces.dom.ParentNode |
fCachedChild, fCachedChildIndex, fCachedLength, firstChild, ownerDocument |
Fields inherited from class org.enhydra.apache.xerces.dom.ChildNode |
nextSibling, previousSibling |
Fields inherited from class org.enhydra.apache.xerces.dom.NodeImpl |
ELEMENT_DEFINITION_NODE, FIRSTCHILD, flags, HASSTRING, IGNORABLEWS, OWNED, ownerNode, READONLY, SPECIFIED, SYNCCHILDREN, SYNCDATA, UNNORMALIZED |
Constructor Summary | |
protected |
MetaDataElement(Document ownerDoc,
String name)
Constructor. |
Method Summary | |
protected void |
addStringArrayAttribute(String attrName,
String value)
Add a addtribute to a String array attribute. |
protected void |
completeModifications()
Complete modifications to DOM. |
protected void |
deleteChild(Class elementClass)
Delete a child element given its class. |
protected String |
getAttributeNull(String attrName)
Get the value of a string attribute, or null if its not defined. |
protected boolean |
getBooleanAttribute(String attrName)
Get the value of a boolean primitive attribute, with the default being false. |
protected boolean |
getBooleanAttribute(String attrName,
boolean defaultValue)
Get the value of a boolean primitive attribute. |
protected Boolean |
getBooleanObjectAttribute(String attrName)
Get the value of a boolean object attribute. |
protected MetaDataElement |
getChild(Class elementClass)
Locate a child element given its class, creating if if it doesn't exist. |
protected Node[] |
getChildren(Class elementClass)
Get all children of the specified class. |
protected MetaDataElement |
getCreateChild(Class elementClass)
Locate a child element given its class. |
MetaDataDocument |
getDocument()
Get the metadata document object. |
MetaData |
getMetaData()
Get the metadata root element object. |
protected String[] |
getStringArrayAttribute(String attrName)
Get the value of a String array attribute. |
protected boolean |
isAttributeSpecified(String attrName)
Determine if an attribute is specified. |
protected void |
mergeAttributes(Element srcElement)
Merge attributes from another element into this element, with the other element overriding current attributes. |
protected void |
mergeElement(MetaDataElement srcElement)
Merge another element into this element. |
protected void |
mergeSingletonChild(Class childClass,
MetaDataElement srcElement)
Merge a specified singleton child node, if it exists, otherwise clone it (if it exists). |
protected void |
setBooleanAttribute(String attrName,
boolean value)
Set the value of a boolean primitive attribute, with a default of false. |
protected void |
setBooleanAttribute(String attrName,
boolean value,
boolean defaultValue)
Set the value of a boolean primitive attribute. |
protected void |
setBooleanObjectAttribute(String attrName,
Boolean value)
Set or delete the value of a boolean object attribute. |
protected void |
setChild(MetaDataElement element)
Add or replace a child element. |
protected void |
setRemoveAttribute(String attrName,
String value)
Set or remove a string attribute. |
protected void |
setRemoveStringArrayAttribute(String attrName,
String[] values)
Set or remove a String array attribute. |
Methods inherited from class org.enhydra.apache.xerces.dom.ElementImpl |
cloneNode, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getDefaultAttributes, getElementsByTagName, getElementsByTagNameNS, getNodeName, getNodeType, getSchemaTypeInfo, getTagName, hasAttribute, hasAttributeNS, hasAttributes, normalize, reconcileDefaultAttributes, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setOwnerDocument, setReadOnly, setupDefaultAttributes, synchronizeData |
Methods inherited from class org.enhydra.apache.xerces.dom.ParentNode |
checkNormalizationAfterInsert, checkNormalizationAfterRemove, getChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, getOwnerDocument, hasChildNodes, insertBefore, internalInsertBefore, internalRemoveChild, item, lastChild, lastChild, ownerDocument, removeChild, replaceChild, synchronizeChildren |
Methods inherited from class org.enhydra.apache.xerces.dom.ChildNode |
getNextSibling, getParentNode, getPreviousSibling, parentNode, previousSibling |
Methods inherited from class org.enhydra.apache.xerces.dom.NodeImpl |
addEventListener, appendChild, changed, changes, compareDocumentPosition, dispatchEvent, getBaseURI, getFeature, getLocalName, getNamespaceURI, getNodeValue, getPrefix, getReadOnly, getTextContent, getUserData, getUserData, hasStringValue, hasStringValue, internalIsIgnorableWhitespace, isDefaultNamespace, isEqualNode, isFirstChild, isFirstChild, isIgnorableWhitespace, isNormalized, isNormalized, isOwned, isOwned, isReadOnly, isReadOnly, isSameNode, isSpecified, isSpecified, isSupported, lookupNamespaceURI, lookupPrefix, needsSyncChildren, needsSyncChildren, needsSyncData, needsSyncData, removeEventListener, setNodeValue, setPrefix, setTextContent, setUserData, setUserData, toString |
Methods inherited from class java.lang.Object |
|
Methods inherited from interface org.w3c.dom.Node |
appendChild, compareDocumentPosition, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
Constructor Detail |
protected MetaDataElement(Document ownerDoc, String name)
Method Detail |
public MetaDataDocument getDocument()
public MetaData getMetaData()
protected MetaDataElement getCreateChild(Class elementClass)
protected MetaDataElement getChild(Class elementClass)
protected void setChild(MetaDataElement element)
protected void deleteChild(Class elementClass)
protected Node[] getChildren(Class elementClass)
protected boolean isAttributeSpecified(String attrName)
protected Boolean getBooleanObjectAttribute(String attrName)
attrName
- The name of the attribute.protected void setBooleanObjectAttribute(String attrName, Boolean value)
attrName
- The name of the attribute.value
- The value of the attribute, or null to delete.protected boolean getBooleanAttribute(String attrName, boolean defaultValue)
attrName
- The name of the attribute.defaultValue
- Value to return if attribute doesn't exist.protected boolean getBooleanAttribute(String attrName)
attrName
- The name of the attribute.protected void setBooleanAttribute(String attrName, boolean value, boolean defaultValue)
attrName
- The name of the attribute.value
- The value of the attribute.defaultValue
- The default value for the attribute.
If the value matches the default value, the attribute
is removed rather than set. This must match the default
passed to get.protected void setBooleanAttribute(String attrName, boolean value)
attrName
- The name of the attribute.value
- The value of the attribute.protected String getAttributeNull(String attrName)
protected void setRemoveAttribute(String attrName, String value)
protected String[] getStringArrayAttribute(String attrName)
protected void setRemoveStringArrayAttribute(String attrName, String[] values)
protected void addStringArrayAttribute(String attrName, String value)
protected void completeModifications() throws XMLCException
protected void mergeAttributes(Element srcElement)
protected void mergeSingletonChild(Class childClass, MetaDataElement srcElement)
protected void mergeElement(MetaDataElement srcElement)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |