SMACS

smacs.tree
Class NodeExtendedAttribute

java.lang.Object
  extended byorg.dom4j.tree.AbstractNode
      extended byorg.dom4j.tree.AbstractAttribute
          extended byorg.dom4j.tree.FlyweightAttribute
              extended byorg.dom4j.tree.DefaultAttribute
                  extended bysmacs.tree.NodeDefaultAttribute
                      extended bysmacs.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

Field Summary
 
Fields inherited from class smacs.tree.NodeDefaultAttribute
_qname
 
Fields inherited from class org.dom4j.tree.FlyweightAttribute
value
 
Fields inherited from class org.dom4j.tree.AbstractNode
NODE_TYPE_NAMES
 
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
 
Constructor Summary
NodeExtendedAttribute(Element parent, QName qname, String value)
           
NodeExtendedAttribute(Element parent, String name, String value, Namespace namespace)
           
NodeExtendedAttribute(QName qname)
           
NodeExtendedAttribute(QName qname, String value)
           
NodeExtendedAttribute(String name, String value)
           
NodeExtendedAttribute(String name, String value, Namespace namespace)
           
 
Method Summary
 String toAttrXML(String prefix)
          currently: nothing
 
Methods inherited from class smacs.tree.NodeDefaultAttribute
getQName, newQName, newQName, setName, setQName
 
Methods inherited from class org.dom4j.tree.DefaultAttribute
getParent, isReadOnly, setParent, setValue, supportsParent
 
Methods inherited from class org.dom4j.tree.FlyweightAttribute
getValue
 
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 class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
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
 

Constructor Detail

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)
Method Detail

toAttrXML

public String toAttrXML(String prefix)
currently: nothing


SMACS