agg.xt_basis
Class Arc

java.lang.Object
  extended by agg.xt_basis.GraphObject
      extended by agg.xt_basis.Arc
All Implemented Interfaces:
AttrObserver, XMLObject, java.io.Serializable

public class Arc
extends GraphObject
implements XMLObject

See Also:
Serialized Form

Field Summary
 
Fields inherited from class agg.xt_basis.GraphObject
critical, criticalKind, itsAttr, itsContext, itsContextUsage, itsIncomingArcs, itsOutgoingArcs, itsSource, itsTarget, itsType, selected, visible
 
Fields inherited from interface agg.attribute.AttrObserver
serialVersionUID
 
Constructor Summary
protected Arc(Arc orig, GraphObject src, GraphObject tar, Graph context)
           
  Arc(AttrInstance attr, Type type, GraphObject src, GraphObject tar, Graph context)
           
protected Arc(Type type, GraphObject src, GraphObject tar, Graph context)
           
 
Method Summary
 void attributeChanged(AttrEvent ev)
          Implements the AttrObserver.
 boolean compareTo(GraphObject o)
           
 java.lang.String convertToKey()
          Converts my type to a type key string that can be used for search operations.
 void dispose()
           
 void finalize()
           
 GraphObject getSource()
           
 Type getSourceType()
           
 GraphObject getTarget()
           
 Type getTargetType()
           
 java.lang.String getTypeMapKey()
          The edge type map key is the string: getSource().getType().convertToKey()+getType().convertToKey()+getTarget().getType().convertToKey() and is used to fill the type to objects map of a graph.
 boolean isAbstract()
           
 boolean isArc()
           
 boolean isDirected()
           
 boolean isInheritance()
           
 boolean isInherited()
          Deprecated. replaced by isInheritance()
 boolean isNode()
           
 void setDirected(boolean b)
           
protected  void setInheritance(boolean inherit)
           
protected  void setInherited(boolean inherit)
          Deprecated. replaced by setInheritance(boolean inherit)
 void setSource(Node n)
           
 void setTarget(Node n)
           
 java.lang.String toString()
           
 void XreadObject(XMLHelper h)
           
 void XwriteObject(XMLHelper h)
           
 
Methods inherited from class agg.xt_basis.GraphObject
addIn, addOut, attributeToString, copyAttributes, createAttributeInstance, getAttribute, getContext, getContextUsage, getIncomingArcs, getIncomingArcsVec, getNumberOfArcs, getNumberOfAttributes, getNumberOfIncomingArcs, getNumberOfIncomingArcs, getNumberOfIncomingArcs, getNumberOfInOutArcs, getNumberOfOutgoingArcs, getNumberOfOutgoingArcs, getNumberOfOutgoingArcs, getOutgoingArcs, getOutgoingArcsVec, getType, getVariableNamesOfAttribute, hasIncomingArcFrom, hasOutgoingArcTo, isCritical, isPersistentFor, isVisible, removeIn, removeOut, setContextUsage, setCritical, setType, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Arc

public Arc(AttrInstance attr,
           Type type,
           GraphObject src,
           GraphObject tar,
           Graph context)
Parameters:
context - The graph/subgraph context in which to consider incoming and outgoing arcs.

Arc

protected Arc(Type type,
              GraphObject src,
              GraphObject tar,
              Graph context)

Arc

protected Arc(Arc orig,
              GraphObject src,
              GraphObject tar,
              Graph context)
Method Detail

dispose

public void dispose()
Overrides:
dispose in class GraphObject

finalize

public void finalize()
Overrides:
finalize in class java.lang.Object

setInheritance

protected void setInheritance(boolean inherit)

setInherited

protected void setInherited(boolean inherit)
Deprecated. replaced by setInheritance(boolean inherit)


isInheritance

public boolean isInheritance()

isInherited

public boolean isInherited()
Deprecated. replaced by isInheritance()


isArc

public final boolean isArc()
Specified by:
isArc in class GraphObject

isNode

public final boolean isNode()
Specified by:
isNode in class GraphObject

isAbstract

public boolean isAbstract()

getSource

public final GraphObject getSource()

getTarget

public final GraphObject getTarget()

setSource

public void setSource(Node n)

setTarget

public void setTarget(Node n)

getSourceType

public Type getSourceType()

getTargetType

public Type getTargetType()

convertToKey

public java.lang.String convertToKey()
Description copied from class: GraphObject
Converts my type to a type key string that can be used for search operations. For a node it is similar to ((Node) this).getType().convertToKey() , for an edge to ((Arc) this).getSource().getType().convertToKey() + ((Arc) this).getType().convertToKey() + ((Arc) this).getTarget().getType().convertToKey()

Overrides:
convertToKey in class GraphObject

getTypeMapKey

public java.lang.String getTypeMapKey()
The edge type map key is the string: getSource().getType().convertToKey()+getType().convertToKey()+getTarget().getType().convertToKey() and is used to fill the type to objects map of a graph.

Returns:
String key

setDirected

public void setDirected(boolean b)

isDirected

public boolean isDirected()

compareTo

public boolean compareTo(GraphObject o)
Specified by:
compareTo in class GraphObject

XwriteObject

public void XwriteObject(XMLHelper h)
Specified by:
XwriteObject in interface XMLObject
Specified by:
XwriteObject in class GraphObject

XreadObject

public void XreadObject(XMLHelper h)
Specified by:
XreadObject in interface XMLObject
Specified by:
XreadObject in class GraphObject

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

attributeChanged

public void attributeChanged(AttrEvent ev)
Implements the AttrObserver. Propagates the change agg.util.Change.OBJECT_MODIFIED and object Pair (this, ev.getID()) to its Graph if the attributes are changed.

Specified by:
attributeChanged in interface AttrObserver
Overrides:
attributeChanged in class GraphObject