agg.xt_basis
Class TypeGraph

java.lang.Object
  extended by java.util.Observable
      extended by agg.util.ExtObservable
          extended by agg.xt_basis.Graph
              extended by agg.xt_basis.TypeGraph
All Implemented Interfaces:
Disposable, XMLObject, com.objectspace.jgl.UnaryFunction, java.io.Serializable, java.util.Observer

public class TypeGraph
extends Graph

See Also:
Serialized Form

Field Summary
 
Fields inherited from class agg.xt_basis.Graph
attributed, changed, comment, completeGraph, info, itsArcs, itsAttrContext, itsAttrManager, itsName, itsNodes, itsTypeObjectsMap, itsTypes, itsUsingMorphs, kind, observer
 
Fields inherited from interface com.objectspace.jgl.UnaryFunction
serialVersionUID
 
Constructor Summary
TypeGraph()
          Deprecated.  
TypeGraph(boolean completeGraph)
          Deprecated.  
TypeGraph(TypeSet aTypeSet)
          Creates an empty type graph for the specified type set.
TypeGraph(TypeSet aTypeSet, boolean completeGraph)
          Deprecated.  
 
Method Summary
 void addArc(Arc a)
          Adds the specified edge to my edges.
 boolean addCopyOfGraph(Graph g)
          Adds a copy of the specified Graph g.
 boolean addCopyOfGraph(Graph g, boolean disabledTypeGraphOnly)
          Deprecated. addCopyOfGraph(final Graph g) should be used
 void addNode(Node n)
          Adds the specified node to my nodes.
 boolean contains(Graph g)
           
 Graph copy()
          Copys a graph The method returns a flat copy (without references) of the graph.
 Graph copy(java.util.Hashtable<GraphObject,GraphObject> orig2copy)
          Makes a copy of this graph
 Graph copy(TypeSet types)
          Returns a copy of this type graph typed above the specified typeset.
 Arc copyArc(Arc orig, Node src, Node tar)
          Create a new Arc as a copy of orig.
 Graph copyLight(TypeSet typeSet)
           
 Node copyNode(Node orig)
          Create a new Node as a copy of orig.
 Arc createArc(Type type, Node src, Node tar)
          Create a new Arc with given Type, source and target objects.
 Node createNode(Node orig)
          Deprecated. use the method copyNode(Node orig)
 Node createNode(Type type)
          Create a new Node with given Type.
 void destroyArc(Arc arc, boolean checkFirst, boolean forceDestroy)
          The specified arc will be removed from this type graph.
 void destroyNode(Node node, boolean checkFirst, boolean forceDestroy)
          Delete a Node.
 void dispose()
          prepare this graph for garbage collection. so cut all connections to other objects and dispose all graph object contained.
 void finalize()
           
 java.util.Vector<OrdinaryMorphism> generateAllSubgraphs(int sizeOfInclusions, boolean union, boolean withIsomorphic)
          This method is not implemented for this class.
 java.util.Vector<OrdinaryMorphism> generateAllSubgraphsWithInclusionsOfSize(int i, java.util.Vector<GraphObject> itsGOSet, java.util.Vector<OrdinaryMorphism> inclusions, boolean withIsomorphic)
          This method is not implemented for this class.
 java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> getOverlappings(Graph g, boolean withIsomorphic)
          This method is not defined for this class.
 java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> getOverlappings(Graph g, boolean disjunion, boolean withIsomorphic)
          This method is not defined for this class.
 java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> getOverlappings(Graph g, int sizeOfInclusions, boolean withIsomorphic)
          This method is not defined for this class.
 java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> getOverlappings(Graph g, int sizeOfInclusions, boolean disjunion, boolean withIsomorphic)
          This method is not defined for this class.
 java.util.Vector<java.util.Hashtable<GraphObject,GraphObject>> getPartialMorphismIntoSet(java.util.Vector<GraphObject> set)
          This method is not defined for this class.
 java.util.Vector<VarMember> getSameVariablesOfAttributes()
          This method is not defined for this class.
 java.util.Vector<java.lang.String> getVariableNamesOfAttributes()
          This method is not defined for this class.
 boolean glue(GraphObject keep, GraphObject glue)
          This method is not defined for this class.
 Graph graphcopy()
          The method returnes a flat copy of the graph itself.
protected  Graph graphcopy(java.util.Hashtable<GraphObject,GraphObject> orig2copy)
          Makes a copy of this graph
 Graph graphcopy(TypeGraph g)
          THIS METHOD IS NOT IMPLEMENTED FOR THIS CLASS.
 int indexOf(Arc a)
           
 int indexOf(Node n)
           
 boolean isCompleteGraph()
          Returns false.
 boolean isNacGraph()
          Returns false.
 OrdinaryMorphism isomorphicCopy()
          This method is not defined for this class.
 OrdinaryMorphism isoToCopy()
          This method is not defined for this class.
 OrdinaryMorphism isoToCopy(int n)
          This method is not defined for this class.
 boolean isReadyForTransform()
          This method is not defined for this class.
 boolean isReadyForTransform(java.util.Vector<GraphObject> storeOfFailedObjs)
          This method is not defined for this class.
 boolean isTypeGraph()
          Returns true.
 boolean isUsingVariable(VarMember v)
          This method is not defined for this class.
 void moveTo(Arc a, int indx)
           
 void moveTo(Node n, int indx)
           
protected  Arc newArc(Type t, Node src, Node tar)
          Create a new Arc with given Type, source and target objects.
protected  Node newNode(Type t)
          Creates and adds a new node.
 java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> overlapSet(Graph g, int memoNumber, boolean withIsomorphic)
          This method is not defined for this class.
 java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> overlapSet(Graph g, int memoNumber, boolean union, boolean withIsomorphic)
          This method is not defined for this class.
 java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> overlapSet(Graph g, int sizeOfInclusions, int memoNumber, boolean union, boolean withIsomorphic)
          This method is not defined for this class.
protected  void removeArc(Arc a)
           
protected  void removeNode(Node n)
           
 OrdinaryMorphism reverseIsomorphicCopy()
          This method is not defined for this class.
 void tryToExtendByTypeNodes(java.util.Vector<Type> types)
          Only new type nodes are created for the node types inside of the specified types.
 void unsetCriticalObjects()
          This method is not defined for this class.
 void unsetTransientAttrValues()
          This method is not defined for this class.
 void XreadObject(XMLHelper h)
          Implements the interface of XMLObject
 void XwriteObject(XMLHelper h)
          Implements the interface of XMLObject
 
Methods inherited from class agg.xt_basis.Graph
addObserver, addUsingMorph, areAnyAttributesOfArcsSet, areAnyAttributesOfNodesSet, checkConnectValid, checkCreateGraphObject, checkCreateGraphObject, checkIsomorphicInclusions, clear, compareTo, contains, createType, deleteObserver, destroyArc, destroyArc, destroyNode, destroyNode, destroyObject, destroyObjectsOfType, destroyObjectsOfTypes, destroyType, execute, fillTypeObjectsMap, forceDestroyObject, getArcs, getArcs, getArcs, getArcsCount, getArcsList, getAttrContext, getAttrManager, getElements, getElementsOfType, getElementsOfType, getElementsOfType, getElementsOfType, getElementsOfTypeAsVector, getElementsOfTypeAsVector, getElementsOfTypeAsVector, getElementsOfTypeAsVector, getElementsOfTypeAsVector, getHelpInfo, getHelpInfoAboutNAC, getHelpInfoAboutPAC, getHelpInfoAboutVariableEquality, getIndexOf, getIndexOfArc, getIndexOfNode, getIsomorphicWith, getIsomorphicWith, getIsomorphicWith, getKind, getName, getNodes, getNodes, getNodesByCompareType, getNodesByParentType, getNodesCount, getNodesList, getObservers, getSize, getSizeOfArcs, getSizeOfNodes, getTextualComment, getTypeNamesOfGraphObjects, getTypeObjectsMap, getTypes, getTypeSet, getUsedAndInheritedTypes, getUsedTypes, graphcopy, graphcopy, graphDidChange, isArc, isArcAttributeSet, isAttributed, isElement, isEmpty, isGraph, isIsomorphicTo, isNode, isNodeAttributeSet, isNotificationRequired, isPacGraph, isUsingType, isUsingType, propagateChange, removeUsingMorph, setAttrContext, setCompleteGraph, setHelpInfo, setKind, setNacGraph, setName, setNotificationRequired, setObservers, setPacGraph, setTextualComment, setTypeSet, showArcs, showGraph, showNodes, toString, unsetAttributeValueWhereVariable, update, updateTypeObjectsMap
 
Methods inherited from class agg.util.ExtObservable
setChanged
 
Methods inherited from class java.util.Observable
clearChanged, countObservers, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypeGraph

public TypeGraph()
Deprecated. 


TypeGraph

public TypeGraph(boolean completeGraph)
Deprecated. 


TypeGraph

public TypeGraph(TypeSet aTypeSet,
                 boolean completeGraph)
Deprecated. 


TypeGraph

public TypeGraph(TypeSet aTypeSet)
Creates an empty type graph for the specified type set.

Method Detail

dispose

public void dispose()
prepare this graph for garbage collection. so cut all connections to other objects and dispose all graph object contained.

Specified by:
dispose in interface Disposable
Overrides:
dispose in class Graph
See Also:
Change_ObservableGone

finalize

public void finalize()
Overrides:
finalize in class Graph

indexOf

public int indexOf(Node n)

indexOf

public int indexOf(Arc a)

moveTo

public void moveTo(Node n,
                   int indx)

moveTo

public void moveTo(Arc a,
                   int indx)

tryToExtendByTypeNodes

public void tryToExtendByTypeNodes(java.util.Vector<Type> types)
Only new type nodes are created for the node types inside of the specified types. The types should be a subset of the type set of this type graph.

Parameters:
types - is a subset of my type set.

addCopyOfGraph

public boolean addCopyOfGraph(Graph g)
Adds a copy of the specified Graph g. The Graph g should be an instance of TypeGraph. The type graph check of this type graph should be disabled.

Parameters:
g - another TypeGraph instance
Returns:
true if a copy of the type graph g was added, otherwise false.

addCopyOfGraph

public boolean addCopyOfGraph(Graph g,
                              boolean disabledTypeGraphOnly)
Deprecated. addCopyOfGraph(final Graph g) should be used

Adds a copy of the specified Graph g. The Graph g should be an instance of TypeGraph. The type graph check of this type graph should be disabled.

Overrides:
addCopyOfGraph in class Graph
Parameters:
g - another TypeGraph instance
disabledTypeGraphOnly - is always true
Returns:
true if a copy of the type graph g was added, otherwise false.

copyLight

public Graph copyLight(TypeSet typeSet)
Overrides:
copyLight in class Graph

copy

public Graph copy(TypeSet types)
Returns a copy of this type graph typed above the specified typeset. The specified typeset should be compatible to its typeset.

Overrides:
copy in class Graph

copy

public Graph copy(java.util.Hashtable<GraphObject,GraphObject> orig2copy)
Makes a copy of this graph

Overrides:
copy in class Graph
Parameters:
orig2copy - this hashtable is used to store the pairs (original, copy), where an original is a node or edge of this graph and a copy is a copied node or edge of the graph copy.
Returns:
a copy of this graph or null if an error occured

graphcopy

protected Graph graphcopy(java.util.Hashtable<GraphObject,GraphObject> orig2copy)
Makes a copy of this graph

Parameters:
orig2copy - this hashtable is used to store the pairs (original, copy), where an original is a node or edge of this graph and a copy is a copied node or edge of the graph copy.
Returns:
a copy of this graph or null if an error occured

graphcopy

public Graph graphcopy()
The method returnes a flat copy of the graph itself.

Overrides:
graphcopy in class Graph

copy

public Graph copy()
Copys a graph The method returns a flat copy (without references) of the graph.

Overrides:
copy in class Graph

graphcopy

public Graph graphcopy(TypeGraph g)
THIS METHOD IS NOT IMPLEMENTED FOR THIS CLASS.

Returns:
null

addNode

public void addNode(Node n)
Adds the specified node to my nodes. The type of the specified node has to be in my type set.

Overrides:
addNode in class Graph

copyNode

public Node copyNode(Node orig)
              throws TypeException
Create a new Node as a copy of orig. Only the type and the * attributes are copied, the structural context (incoming/outgoing arcs) is not. *

Overrides:
copyNode in class Graph
Throws:
TypeException

removeNode

protected void removeNode(Node n)
Overrides:
removeNode in class Graph

addArc

public void addArc(Arc a)
Adds the specified edge to my edges. The type of the specified edge has to be in my type set.

Overrides:
addArc in class Graph

removeArc

protected void removeArc(Arc a)
Overrides:
removeArc in class Graph

newNode

protected Node newNode(Type t)
                throws TypeException
Description copied from class: Graph
Creates and adds a new node.

Overrides:
newNode in class Graph
Throws:
TypeException

createNode

public Node createNode(Type type)
                throws TypeException
Create a new Node with given Type.

Overrides:
createNode in class Graph
Throws:
TypeException

createNode

public Node createNode(Node orig)
                throws TypeException
Deprecated. use the method copyNode(Node orig)

Overrides:
createNode in class Graph
Throws:
TypeException

destroyNode

public void destroyNode(Node node,
                        boolean checkFirst,
                        boolean forceDestroy)
                 throws TypeException
Delete a Node. Dangling Arcs are deleted implicitly.

Overrides:
destroyNode in class Graph
Throws:
TypeException - If the parameter forceDestroy is false and there are objects of this node, the type exception will be thrown, otherwise not.

newArc

protected Arc newArc(Type t,
                     Node src,
                     Node tar)
              throws TypeException
Create a new Arc with given Type, source and target objects. Source and target object must be part of this graph.

Overrides:
newArc in class Graph
Throws:
TypeException

createArc

public Arc createArc(Type type,
                     Node src,
                     Node tar)
              throws TypeException
Create a new Arc with given Type, source and target objects. Source and target object must be part of this graph.

Overrides:
createArc in class Graph
Throws:
TypeException

copyArc

public Arc copyArc(Arc orig,
                   Node src,
                   Node tar)
            throws TypeException
Create a new Arc as a copy of orig. Only the type and the attributes are copied, the structural context (source, target) is not. Source and target object must be part of this graph.

Overrides:
copyArc in class Graph
Throws:
TypeException

destroyArc

public void destroyArc(Arc arc,
                       boolean checkFirst,
                       boolean forceDestroy)
                throws TypeException
The specified arc will be removed from this type graph.

Overrides:
destroyArc in class Graph
Throws:
TypeException - If the parameter forceDestroy is false and there are objects of this node, the type exception will be thrown, otherwise not.

contains

public boolean contains(Graph g)
Overrides:
contains in class Graph

isUsingVariable

public boolean isUsingVariable(VarMember v)
This method is not defined for this class.

Overrides:
isUsingVariable in class Graph

glue

public boolean glue(GraphObject keep,
                    GraphObject glue)
This method is not defined for this class.

Overrides:
glue in class Graph

isReadyForTransform

public boolean isReadyForTransform()
This method is not defined for this class.

Overrides:
isReadyForTransform in class Graph

isReadyForTransform

public boolean isReadyForTransform(java.util.Vector<GraphObject> storeOfFailedObjs)
This method is not defined for this class.

Overrides:
isReadyForTransform in class Graph

isomorphicCopy

public OrdinaryMorphism isomorphicCopy()
This method is not defined for this class.

Overrides:
isomorphicCopy in class Graph

isoToCopy

public OrdinaryMorphism isoToCopy()
This method is not defined for this class.

Overrides:
isoToCopy in class Graph

isoToCopy

public OrdinaryMorphism isoToCopy(int n)
This method is not defined for this class.

Overrides:
isoToCopy in class Graph

reverseIsomorphicCopy

public OrdinaryMorphism reverseIsomorphicCopy()
This method is not defined for this class.

Overrides:
reverseIsomorphicCopy in class Graph

overlapSet

public java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> overlapSet(Graph g,
                                                                                 int memoNumber,
                                                                                 boolean withIsomorphic)
This method is not defined for this class.

Overrides:
overlapSet in class Graph

overlapSet

public java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> overlapSet(Graph g,
                                                                                 int memoNumber,
                                                                                 boolean union,
                                                                                 boolean withIsomorphic)
This method is not defined for this class.

Overrides:
overlapSet in class Graph

overlapSet

public java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> overlapSet(Graph g,
                                                                                 int sizeOfInclusions,
                                                                                 int memoNumber,
                                                                                 boolean union,
                                                                                 boolean withIsomorphic)
This method is not defined for this class.

Overrides:
overlapSet in class Graph

getOverlappings

public java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> getOverlappings(Graph g,
                                                                                      boolean withIsomorphic)
This method is not defined for this class.

Overrides:
getOverlappings in class Graph
Parameters:
g - The graph to overlap with

getOverlappings

public java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> getOverlappings(Graph g,
                                                                                      boolean disjunion,
                                                                                      boolean withIsomorphic)
This method is not defined for this class.

Overrides:
getOverlappings in class Graph
Parameters:
g - The graph to overlap with
disjunion - true if disjoint union is wanted

getOverlappings

public java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> getOverlappings(Graph g,
                                                                                      int sizeOfInclusions,
                                                                                      boolean withIsomorphic)
This method is not defined for this class.

Overrides:
getOverlappings in class Graph
Parameters:
g - The graph to overlap with

getOverlappings

public java.util.Enumeration<Pair<OrdinaryMorphism,OrdinaryMorphism>> getOverlappings(Graph g,
                                                                                      int sizeOfInclusions,
                                                                                      boolean disjunion,
                                                                                      boolean withIsomorphic)
This method is not defined for this class.

Overrides:
getOverlappings in class Graph
Parameters:
g - The graph to overlap with
disjunion - true if disjoint union is wanted

XwriteObject

public void XwriteObject(XMLHelper h)
Description copied from class: Graph
Implements the interface of XMLObject

Specified by:
XwriteObject in interface XMLObject
Overrides:
XwriteObject in class Graph

XreadObject

public void XreadObject(XMLHelper h)
Description copied from class: Graph
Implements the interface of XMLObject

Specified by:
XreadObject in interface XMLObject
Overrides:
XreadObject in class Graph

generateAllSubgraphs

public java.util.Vector<OrdinaryMorphism> generateAllSubgraphs(int sizeOfInclusions,
                                                               boolean union,
                                                               boolean withIsomorphic)
This method is not implemented for this class.

Overrides:
generateAllSubgraphs in class Graph

generateAllSubgraphsWithInclusionsOfSize

public java.util.Vector<OrdinaryMorphism> generateAllSubgraphsWithInclusionsOfSize(int i,
                                                                                   java.util.Vector<GraphObject> itsGOSet,
                                                                                   java.util.Vector<OrdinaryMorphism> inclusions,
                                                                                   boolean withIsomorphic)
This method is not implemented for this class.

Overrides:
generateAllSubgraphsWithInclusionsOfSize in class Graph

isTypeGraph

public boolean isTypeGraph()
Returns true.

Overrides:
isTypeGraph in class Graph

isCompleteGraph

public boolean isCompleteGraph()
Returns false.

Overrides:
isCompleteGraph in class Graph

isNacGraph

public boolean isNacGraph()
Returns false.

Overrides:
isNacGraph in class Graph

getVariableNamesOfAttributes

public java.util.Vector<java.lang.String> getVariableNamesOfAttributes()
This method is not defined for this class.

Overrides:
getVariableNamesOfAttributes in class Graph

getSameVariablesOfAttributes

public java.util.Vector<VarMember> getSameVariablesOfAttributes()
This method is not defined for this class.

Overrides:
getSameVariablesOfAttributes in class Graph

unsetCriticalObjects

public void unsetCriticalObjects()
This method is not defined for this class.

Overrides:
unsetCriticalObjects in class Graph

unsetTransientAttrValues

public void unsetTransientAttrValues()
This method is not defined for this class.

Overrides:
unsetTransientAttrValues in class Graph

getPartialMorphismIntoSet

public java.util.Vector<java.util.Hashtable<GraphObject,GraphObject>> getPartialMorphismIntoSet(java.util.Vector<GraphObject> set)
This method is not defined for this class.

Overrides:
getPartialMorphismIntoSet in class Graph
Parameters:
set - is target of morphisms
Returns:
set of computed partial morphisms, where keys are objects of this graph, values - objects of the specified target set