org.gcube.contentmanagement.contentmanager.stubs.model.trees
Class Edge

java.lang.Object
  extended by org.gcube.contentmanagement.contentmanager.stubs.model.trees.Edge

public final class Edge
extends java.lang.Object

An labelled edge that connects two Nodes.

Author:
Fabio Simeoni (University of Strathclyde)

Constructor Summary
Edge(Edge e)
          Copy constructor, creates a clone of a given node.
Edge(javax.xml.namespace.QName l, Node n)
          Creates an instance with a label and a node.
Edge(java.lang.String ln, Node n)
          Creates an instance with a label and a node.
Edge(java.lang.String ns, java.lang.String ln, Node n)
          Creates an instance with a label and a node.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 javax.xml.namespace.QName label()
          Returns the label.
 Node target()
          Returns the target node.
 void target(Node n)
          Sets the target node.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Edge

public Edge(Edge e)
Copy constructor, creates a clone of a given node.

Parameters:
n - the node.

Edge

public Edge(javax.xml.namespace.QName l,
            Node n)
Creates an instance with a label and a node.

Parameters:
l - the label.
n - the node.

Edge

public Edge(java.lang.String ln,
            Node n)
Creates an instance with a label and a node.

Parameters:
ln - the label's local name.
n - the node.

Edge

public Edge(java.lang.String ns,
            java.lang.String ln,
            Node n)
Creates an instance with a label and a node.

Parameters:
ln - the labels' namespace.
ln - the label's local name.
n - the node.
Method Detail

label

public javax.xml.namespace.QName label()
Returns the label.

Returns:
the label.

target

public Node target()
Returns the target node.

Returns:
the node.

target

public void target(Node n)
Sets the target node.

Parameters:
n - node.

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object