org.ozoneDB.xml.dom4j.o3impl
Class FlyweightAttribute

java.lang.Object
  extended byorg.ozoneDB.OzoneObject
      extended byorg.ozoneDB.xml.dom4j.o3impl.AbstractNode
          extended byorg.ozoneDB.xml.dom4j.o3impl.AbstractAttribute
              extended byorg.ozoneDB.xml.dom4j.o3impl.FlyweightAttribute
All Implemented Interfaces:
Attribute, java.lang.Cloneable, Node, org.ozoneDB.OzoneCompatible, org.ozoneDB.OzoneCompatibleOrProxy, java.io.Serializable
Direct Known Subclasses:
DefaultAttribute

public class FlyweightAttribute
extends AbstractAttribute

FlyweightAttribute is a Flyweight pattern implementation of a singly linked, read-only XML Attribute.

This node could be shared across documents and elements though it does not support the parent relationship.

Version:
$Revision: 1.1 $
Author:
James Strachan
See Also:
Serialized Form

Field Summary
protected  java.lang.String value
          The value of the Attribute
 
Fields inherited from class org.ozoneDB.xml.dom4j.o3impl.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
FlyweightAttribute(NodeFactory nodeFactory, java.lang.String name, java.lang.String value)
          Creates the Attribute with the specified local name and value.
FlyweightAttribute(NodeFactory nodeFactory, java.lang.String name, java.lang.String value, Namespace namespace)
          Creates the Attribute with the specified local name, value and AbstractNamespace.
FlyweightAttribute(QName qname)
           
FlyweightAttribute(QName qname, java.lang.String value)
           
 
Method Summary
 QName getQName()
          Returns the QName of this attribute which represents the local name, the qualified name and the Namespace.
 java.lang.String getValue()
          Returns the value of the attribute.
 
Methods inherited from class org.ozoneDB.xml.dom4j.o3impl.AbstractAttribute
accept, asXML, createXPathResult, getData, getName, getNamespace, getNamespacePrefix, getNamespaceURI, getNodeType, getPath, getQualifiedName, getText, getUniquePath, setData, setNamespace, setText, setValue, toString, write
 
Methods inherited from class org.ozoneDB.xml.dom4j.o3impl.AbstractNode
asXPathResult, clone, createPattern, createXPath, createXPathFilter, detach, getDocument, getDocumentFactory, getNodeFactory, getNodeTypeName, getParent, getPath, getStringValue, getUniquePath, getXPathFactory, hasContent, isReadOnly, matches, numberValueOf, onCreate, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setDocument, setDocumentFactory, setName, setNodeFactory, setParent, setXPathFactory, supportsParent, valueOf
 
Methods inherited from class org.ozoneDB.OzoneObject
container, database, deleteRecursive, equals, getHandle, getObjectID, handle, hashCode, onActivate, onDelete, onPassivate, requireWriteLocking, self, setContainer, toXML
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.dom4j.Node
asXPathResult, clone, createXPath, detach, getDocument, getNodeTypeName, getParent, getPath, getStringValue, getUniquePath, hasContent, isReadOnly, matches, numberValueOf, selectNodes, selectNodes, selectNodes, selectObject, selectSingleNode, setDocument, setName, setParent, supportsParent, valueOf
 

Field Detail

value

protected java.lang.String value
The value of the Attribute

Constructor Detail

FlyweightAttribute

public FlyweightAttribute(QName qname)

FlyweightAttribute

public FlyweightAttribute(QName qname,
                          java.lang.String value)

FlyweightAttribute

public FlyweightAttribute(NodeFactory nodeFactory,
                          java.lang.String name,
                          java.lang.String value)
Creates the Attribute with the specified local name and value.

Parameters:
nodeFactory - is the Nodefactury used to create a QName from the name
name - is the name of the attribute
value - is the value of the attribute

FlyweightAttribute

public FlyweightAttribute(NodeFactory nodeFactory,
                          java.lang.String name,
                          java.lang.String value,
                          Namespace namespace)
Creates the Attribute with the specified local name, value and AbstractNamespace.

Parameters:
nodeFactory - is the Nodefactury used to create a QName from the name
name - is the name of the attribute
value - is the value of the attribute
namespace - is the namespace of the attribute
Method Detail

getValue

public java.lang.String getValue()
Description copied from interface: Attribute

Returns the value of the attribute. This method returns the same value as the Node.getText() method.

Returns:
the value of the attribute.

getQName

public QName getQName()
Description copied from interface: Attribute

Returns the QName of this attribute which represents the local name, the qualified name and the Namespace.

Returns:
the QName associated with this attribute


Copyright © 2004 The Ozone Database Project - www.ozone-db.org. All Rights Reserved.