dk.brics.xmlgraph
Class AttributeNode

java.lang.Object
  extended by dk.brics.xmlgraph.Node
      extended by dk.brics.xmlgraph.SingleContentNode
          extended by dk.brics.xmlgraph.AttributeNode
All Implemented Interfaces:
ConcreteNode, Serializable, Cloneable

public class AttributeNode
extends SingleContentNode
implements ConcreteNode

Attribute node.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class dk.brics.xmlgraph.SingleContentNode
content
 
Fields inherited from class dk.brics.xmlgraph.Node
index, origin
 
Constructor Summary
AttributeNode(Automaton name, int content, Origin origin)
          Constructs a new attribute node.
 
Method Summary
protected  AttributeNode clone()
          Clones this node.
 Automaton getName()
          Returns possible attribute names.
<T> T
process(NodeProcessor<T> v)
          Applies the given node processor on this node.
 void setName(Automaton name, XMLGraph xg)
          Sets the possible names.
 
Methods inherited from class dk.brics.xmlgraph.SingleContentNode
getContent, setContent
 
Methods inherited from class dk.brics.xmlgraph.Node
getIndex, getOrigin, setOrigin
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface dk.brics.xmlgraph.ConcreteNode
getIndex
 

Constructor Detail

AttributeNode

public AttributeNode(Automaton name,
                     int content,
                     Origin origin)
Constructs a new attribute node.

Parameters:
name - possible names
content - index of node representing attribute value
origin - source information (null if not applicable)
Method Detail

clone

protected AttributeNode clone()
Description copied from class: Node
Clones this node.

Specified by:
clone in class SingleContentNode

getName

public Automaton getName()
Returns possible attribute names.

Returns:
automaton representing possible names

process

public <T> T process(NodeProcessor<T> v)
Description copied from class: Node
Applies the given node processor on this node.

Specified by:
process in class Node
Type Parameters:
T - return type
Parameters:
v - node processor
Returns:
result from processor

setName

public void setName(Automaton name,
                    XMLGraph xg)
Sets the possible names. This operation replaces the node in the XML graph.

Parameters:
name - possible names
xg - the current XML graph


Copyright © 2005-2010 Anders Møller.