smacs.tree
Class NodeExtendedAttribute
java.lang.Object
org.dom4j.tree.AbstractNode
org.dom4j.tree.AbstractAttribute
org.dom4j.tree.FlyweightAttribute
org.dom4j.tree.DefaultAttribute
smacs.tree.NodeDefaultAttribute
smacs.tree.NodeExtendedAttribute
- All Implemented Interfaces:
- Attribute, Cloneable, Node, Serializable
- Direct Known Subclasses:
- NodeReferenceAttribute
- public class NodeExtendedAttribute
- extends NodeDefaultAttribute
structured attribute.
A normal dom4j attribute has only a string value. We do already have one scheme
to overcome this limitation with the NodeReferenceAttribute to some
NodeReferenceId linkage. In other words that earlier scheme would
require to store a node-tree and have it referenced indirectly. However the
scheme of "link=" to "id=" makes for a lot of confusion while reading the xml
representation of the information tree, and in many cases we have a hard time
to map additional information nodes into the tree so they are not lost unhappily.
The presented scheme here provides us with another tool that would be possible
in most modern compiler tree as well - the possibility to enhance a syntax tree
with additional information that can be used directly. The old way of cloning
via SimpleNodeClone has shown to perhaps kill too much
of actual linkages to other nodes in the input syntax, namely the breakage of
some of the established link/id pairs. Anyway, adding strucutred objects as an
attribute of a node is easier (hey, python would do that in the object model).
The real difference is that we want to not only have a standard XML representation
with attribute name/stringvalue but instead have atleast one textual format
that shows us all represented information of the given structured attribute.
And that's what the current interfaces is largely doing: providing a few more
possibilites for visualization of the attribute content.
- Author:
- Copyright (C) 2004, Guido Draheim. All rights reserved. Part of SMACS project.
- See Also:
- Serialized Form
| Fields inherited from interface org.dom4j.Node |
ANY_NODE, ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, MAX_NODE_TYPE, NAMESPACE_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE, UNKNOWN_NODE |
| Methods inherited from class org.dom4j.tree.AbstractAttribute |
accept, asXML, createXPathResult, getData, getName, getNamespace, getNamespacePrefix, getNamespaceURI, getNodeType, getPath, getQualifiedName, getText, getUniquePath, setData, setNamespace, setText, toString, write |
| Methods inherited from class org.dom4j.tree.AbstractNode |
asXPathResult, clone, createPattern, createXPath, createXPathFilter, detach, getDocument, getDocumentFactory, getNodeTypeName, getPath, getStringValue, getUniquePath, hasContent, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setDocument, valueOf |
| Methods inherited from interface org.dom4j.Node |
asXPathResult, clone, createXPath, detach, getDocument, getNodeTypeName, getPath, getStringValue, getUniquePath, hasContent, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setDocument, valueOf |
NodeExtendedAttribute
public NodeExtendedAttribute(QName qname)
NodeExtendedAttribute
public NodeExtendedAttribute(QName qname,
String value)
NodeExtendedAttribute
public NodeExtendedAttribute(Element parent,
QName qname,
String value)
NodeExtendedAttribute
public NodeExtendedAttribute(String name,
String value)
NodeExtendedAttribute
public NodeExtendedAttribute(String name,
String value,
Namespace namespace)
NodeExtendedAttribute
public NodeExtendedAttribute(Element parent,
String name,
String value,
Namespace namespace)
toAttrXML
public String toAttrXML(String prefix)
- currently: nothing