Java 2 Platform
v1.3

edu.umich.visualsoar.graph
Class NamedEdge

java.lang.Object
  |
  +--edu.umich.visualsoar.graph.Edge
        |
        +--edu.umich.visualsoar.graph.NamedEdge
All Implemented Interfaces:
java.io.Serializable

public class NamedEdge
extends Edge

This represents an attribute in Working Memomry

See Also:
Serialized Form

Field Summary
private  java.lang.String comment
          Comments user attributes to this edge on the datamap
private  boolean generated
          Knowledge of whether generated by DataMap generator.
private  int lineNumber
           
protected  java.lang.String name
          The name of this named edge
private  edu.umich.visualsoar.operatorwindow.OperatorNode node
          These are used to hold the information of where in the rules that this NamedEdge was generated during the datamap generation.
 
Fields inherited from class edu.umich.visualsoar.graph.Edge
v0, v1
 
Constructor Summary
NamedEdge(edu.umich.visualsoar.graph.Vertex v0, edu.umich.visualsoar.graph.Vertex v1, java.lang.String _name)
          A named edge is logically a connection between two vertices, from v0 to v1, with a name
 
Method Summary
 boolean equals(java.lang.Object o)
          an edge is equal to another object if and only if the other object is an edge, not null and the starting ending vertexs are equal and the names are the same
 java.lang.String getComment()
           
 int getLine()
           
 java.lang.String getName()
          This method returns the name of the node, note if the return value of this string is changed so is the name of the node
 edu.umich.visualsoar.operatorwindow.OperatorNode getNode()
           
 boolean hasComment()
           
 boolean isGenerated()
           
 void rename(java.lang.String s)
          This method changes the name of the node from whatever it was to the parameter passed, note changes to s will change the name of the node
 boolean satisfies(edu.umich.visualsoar.parser.Triple triple)
          satisfies tests whether or not this edge could be used to satisfy the constraint passed in, if so, it returns true else false
 void setAsGenerated()
           
 void setComment(java.lang.String newComment)
           
 void setLineNumber(int number)
           
 void setNode(edu.umich.visualsoar.operatorwindow.OperatorNode newNode)
           
 java.lang.String toString()
          This presents a String representation of this class it is the name of the edge followed by representation of v1's toString() method
 void validate()
           
 void write(java.io.Writer w)
          This is the write method that writes out a representation of this edge to the Writer that can later be read back in to recreate this edge
 
Methods inherited from class edu.umich.visualsoar.graph.Edge
mate, V0, V1
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
The name of this named edge


comment

private java.lang.String comment
Comments user attributes to this edge on the datamap


generated

private boolean generated
Knowledge of whether generated by DataMap generator. If it is true, will show up as green on the datamap until validated by user.


node

private edu.umich.visualsoar.operatorwindow.OperatorNode node
These are used to hold the information of where in the rules that this NamedEdge was generated during the datamap generation.


lineNumber

private int lineNumber
Constructor Detail

NamedEdge

public NamedEdge(edu.umich.visualsoar.graph.Vertex v0,
                 edu.umich.visualsoar.graph.Vertex v1,
                 java.lang.String _name)
A named edge is logically a connection between two vertices, from v0 to v1, with a name

Parameters:
v0 - where the edge starts
v1 - where the edge ends
_name - the name that you want to name the string, note if you change this string you also change the name of the node
Method Detail

getName

public java.lang.String getName()
This method returns the name of the node, note if the return value of this string is changed so is the name of the node

Returns:
the name of this node

rename

public void rename(java.lang.String s)
This method changes the name of the node from whatever it was to the parameter passed, note changes to s will change the name of the node

Parameters:
s - what you want to rename the node to
Returns:
the name of this node

toString

public java.lang.String toString()
This presents a String representation of this class it is the name of the edge followed by representation of v1's toString() method

Overrides:
toString in class Edge
Returns:
a string just described

write

public void write(java.io.Writer w)
           throws java.io.IOException
This is the write method that writes out a representation of this edge to the Writer that can later be read back in to recreate this edge

Parameters:
w - the stream to write the representation to
Throws:
IOException - if an error writing to the stream occurs

equals

public boolean equals(java.lang.Object o)
an edge is equal to another object if and only if the other object is an edge, not null and the starting ending vertexs are equal and the names are the same

Overrides:
equals in class java.lang.Object
Parameters:
o - the object that you want to test equality
Returns:
whether the test was true or false like just described

satisfies

public boolean satisfies(edu.umich.visualsoar.parser.Triple triple)
satisfies tests whether or not this edge could be used to satisfy the constraint passed in, if so, it returns true else false

Parameters:
triple - the constraint to test satisfaction to
Returns:
whether or not this NamedEdge can satisfy that constraint

hasComment

public boolean hasComment()

setComment

public void setComment(java.lang.String newComment)

getComment

public java.lang.String getComment()

isGenerated

public boolean isGenerated()

setAsGenerated

public void setAsGenerated()

validate

public void validate()

getNode

public edu.umich.visualsoar.operatorwindow.OperatorNode getNode()

setNode

public void setNode(edu.umich.visualsoar.operatorwindow.OperatorNode newNode)

getLine

public int getLine()

setLineNumber

public void setLineNumber(int number)

Java 2 Platform
v1.3