agg.xt_basis
Class NodeTypeImpl

java.lang.Object
  extended by agg.xt_basis.TypeImpl
      extended by agg.xt_basis.NodeTypeImpl
All Implemented Interfaces:
XMLObject, Type

public class NodeTypeImpl
extends TypeImpl
implements Type

This new class still not used! The type of a node object is here defined.


Field Summary
 
Fields inherited from interface agg.xt_basis.Type
UNDEFINED
 
Constructor Summary
protected NodeTypeImpl()
          holds additional infos about a node of type graph
protected NodeTypeImpl(AttrType at)
          creates a new type with the given attributes and an empty name.
protected NodeTypeImpl(AttrType at, java.lang.String stringRepr)
          Creates a new type with the given attributes and the given name.
protected NodeTypeImpl(java.lang.String stringRepr)
          Creates a new type with the given name.
 
Method Summary
protected  void adaptTypeAttribute(Type type)
          Adds those attribute members of the specified Type type which are not found in this type.
protected  void addChild(NodeTypeImpl t)
           
 void addParent(Type t)
          Adds a new parent to my parent list.
 boolean addTypeGraphObject(GraphObject nodeOrArc)
          Add the given GraphObject of a type graph to this type.
 void addTypeUser(GraphObject nodeOrArc)
          Add the specified GraphObject nodeOrArc: in case of Node - to my TypeGraphNode and in case of Arc - to my TypeGraphArc of a TypeGraph, if it exists.
 void addTypeUser(GraphObject nodeOrArc, Graph g)
          Add the specified GraphObject nodeOrArc: in case of Node - to my TypeGraphNode and in case of Arc - to my TypeGraphArc of a TypeGraph, if it exists.
protected  void addUser(Arc arc)
          Add the specified arc to my container of graph objects.
protected  void addUser(Node node)
          Add the specified node to my container of graph objects.
 void addUsingGraphObject(GraphObject nodeOrArc)
          Deprecated. replaced by addTypeUser(GraphObject nodeOrArc)
 void addUsingGraphObject(GraphObject nodeOrArc, Graph g)
          Deprecated. replaced by addTypeUser(GraphObject nodeOrArc, Graph g)
 TypeError check(Arc arc, int level)
          Returns null, if the specified arc is valid typed as defined in the type graph.
 TypeError check(GraphObject nodeOrArc, int level)
          returns if the given GraphObject is valid typed as defined in the type graph.
 TypeError check(Node node, int level)
          returns if the given Node is valid typed as defined in the type graph.
 java.util.Vector<java.lang.String> checkDoubleAttributeName(Type otherType)
           
protected  void checkDoubleAttributeType()
           
 TypeError checkIfEdgeCreatable(Graph g, Node src, Node tar, int level)
           
 TypeError checkIfEdgeCreatable(Node src, Node tar, int level)
           
 TypeError checkIfRemovable(Node node, int level)
          The spcified node must be an instance of my.
 TypeError checkIfRemovableFromSource(GraphObject node, Arc arc, int level)
          returns if the given arc could be removed from the given node so the node would be valid typed.
 TypeError checkIfRemovableFromTarget(GraphObject node, Arc arc, int level)
          returns if the given arc could be removed from the given node so the node would be valid typed.
protected  TypeError checkSourceMax(Graph g, Node src, Node tar)
           
protected  TypeError checkTargetMax(Graph g, Node src, Node tar)
           
 TypeError checkTargetMin(GraphObject tarnode, Arc arc)
           
 boolean compareTo(Type t)
          Returns TRUE if this type is equal to the type t.
 boolean compareTypeGraphArcs(Type t)
           
 boolean compareTypeGraphArcsMultiplicity(Type t)
           
 java.lang.String convertToKey()
          Returns result string of this.getStringRepr()+this.getAdditionalRepr()
 void createAttributeType()
           
 boolean differentTo(Type t, java.util.Vector<java.lang.String> difference)
          Returns TRUE if this type is different to the type t.
 java.util.Vector<Type> getAllChildren()
          returns a list with all the children of the current type and itself as the first element
 java.util.Vector<Type> getAllParents()
          returns a list with all the parents of the current type and itself as the first element
protected  java.util.HashMap<Type,java.util.HashMap<Type,agg.xt_basis.TypeGraphArc>> getArcTypeGraphObjects()
           
 java.util.Vector<Type> getChildren()
          Returns its direct children only.
 java.util.Vector<Arc> getIncomingArcs()
          Returns all incoming arcs (of my own and of my parents) on condition that a type graph is defined, otherwise returns an empty vector.
 java.util.Vector<Type> getIncomingArcTypes()
          Returns all incoming arc types (of my own and of my parents) on condition that a type graph is defined, otherwise returns an empty vector.
 int getMaxMultiplicityOfAllChildren()
           
 int getMinMultiplicityOfAllChildren()
           
 java.lang.String getName()
          internal function to convert a type into a string.
 java.util.Vector<Arc> getOutgoingArcs()
          Returns all outgoing arcs (of my own and of my parents) on condition that a type graph is defined, otherwise returns an empty vector.
 java.util.Vector<Type> getOutgoingArcTypes()
          Returns all outgoing arc types (of my own and of my parents) on condition that a type graph is defined, otherwise returns an empty vector.
 java.util.Vector<Arc> getOwnIncomingArcs()
          Returns my own incoming arcs on condition that a type graph is defined, otherwise returns an empty vector.
 java.util.Vector<Type> getOwnIncomingArcTypes()
          Returns my own incoming arc types on condition that a type graph is defined, otherwise returns an empty vector.
 java.util.Vector<Arc> getOwnOutgoingArcs()
          Returns my own outgoing arcs on condition that a type graph is defined, otherwise returns an empty vector.
 java.util.Vector<Type> getOwnOutgoingArcTypes()
          Returns my own outgoing arc types on condition that a type graph is defined, otherwise returns an empty vector.
 Type getParent()
          Returns my last direct parent.
 java.util.Vector<Type> getParents()
          Returns my all direct parents.
protected  agg.xt_basis.TypeGraphArc getSimilarTypeGraphArc(Type sourceType, Type targetType)
           
 int getSourceMax()
          Return the max of the multiplicity of a node type.
 int getSourceMax(Type sourceType, Type targetType)
          Return the max of the source multiplicity of an edge type.
 int getSourceMin()
          Return the min of the multiplicity of a node type.
 int getSourceMin(Type sourceType, Type targetType)
          Return the min of the source multiplicity of an edge type.
 int getTargetMax(Type sourceType, Type targetType)
          Return the max of the target multiplicity of an edge type.
 int getTargetMin(Type sourceType, Type targetType)
          Return the min of the target multiplicity of an edge type.
 java.util.Vector<Type> getTargetsOfArc(Type sourceType)
          Searchs for a type that is the target type of this edge type with the specified source type.
protected  agg.xt_basis.TypeGraphArc getTypeGraphArc(Type sourceType, Type targetType)
          Returns the subtype object for this source and target combination.
 Arc getTypeGraphArcObject(Type sourceType, Type targetType)
          returns a type graph edge, if it is defined.
protected  agg.xt_basis.TypeGraphNode getTypeGraphNode()
          Returns the subtype object for this node type.
 Node getTypeGraphNodeObject()
          returns the type graph node, if it is defined.
 java.util.Vector<GraphObject> getTypeUsers()
           
 java.util.Vector<GraphObject> getUsingGraphObjects()
          Deprecated. replaced by getTypeUsers()
 boolean hasInheritedAttribute()
           
 boolean hasTypeGraphArc()
           
 boolean hasTypeGraphArc(GraphObject sourceType, GraphObject targetType)
           
 boolean hasTypeGraphArc(Type sourceType)
          Returns true if at least one edge exists from the specified source type to any other type, otherwise false.
 boolean hasTypeGraphArc(Type sourceType, Type targetType)
           
 boolean hasTypeGraphNode()
          returns true, if there is an object in the type graph for this type.
 boolean isAbstract()
           
 boolean isArcType()
           
 boolean isChildOf(Type t)
          compares the specified type with parents of this object
 boolean isChildTypeGraphNodeUsed()
           
 boolean isChildTypeUsed()
           
 boolean isEdgeCreatable(Type sourceType, Type targetType, int level)
           
 boolean isNodeType()
           
 boolean isParentOf(Type t)
          compares the given type and its ancestors with this object
 boolean isRelatedTo(Type t)
          Finds out if there is any relation between this type and the given one.
 boolean isTypeGraphArcUsed(Arc arc)
           
 boolean isTypeGraphNodeUsed()
           
 boolean isTypeGraphObjectDefined()
          returns true, if there is at least one object in the type graph for this type.
 boolean isTypeUsed()
           
 void removeAllTypeGraphObjects()
          Remove type graph objects from this type.
protected  void removeChild(Type t)
           
 void removeParent(Type t)
          Removes this parent from my parent list.
 boolean removeTypeGraphObject(GraphObject nodeOrArc)
          Remove the given GraphObject from the type graph and from this type.
 void removeTypeUser(GraphObject nodeOrArc)
          Remove the specified GraphObject nodeOrArc: in case of Node - from my TypeGraphNode and in case of Arc - from my TypeGraphArc of a TypeGraph, if it exists.
protected  void removeUser(Arc arc)
          Remove the specified arc from my container of graph objects.
protected  void removeUser(Node node)
          Remove the specified node from my container of graph objects.
 void removeUsingGraphObject(GraphObject nodeOrArc)
          Deprecated. replaced by removeTypeUser(GraphObject nodeOrArc)
 void setAbstract(boolean b)
           
 void setAdditionalRepr(java.lang.String repr)
          set an additional graphical string, which is saved together with the name string representation.
 void setAttributeType(AttrType at)
           
 void setParent(Type t)
          Remove my direct parent and set it to a new parent t.
 void setSourceMax(int value)
          Set the max of the multiplicity of a node type to the value.
 void setSourceMax(Type sourceType, Type targetType, int value)
          Set the max of the source multiplicity of an edge type to the value.
 void setSourceMin(int value)
          Set the min of the multiplicity of a node type to the value.
 void setSourceMin(Type sourceType, Type targetType, int value)
          Set the min of the source multiplicity of an edge type to the value.
 void setTargetMax(Type sourceType, Type targetType, int value)
          Set the max of the target multiplicity of an edge type to the value.
 void setTargetMin(Type sourceType, Type targetType, int value)
          Set the min of the target multiplicity of an edge type to the value.
 void showAllRelatives()
           
 void showRelatives()
           
 void XreadObject(XMLHelper h)
           
 void XwriteObject(XMLHelper h)
           
 
Methods inherited from class agg.xt_basis.TypeImpl
addChild, checkIfNodeCreatable, dispose, finalize, getAdditionalRepr, getAttrType, getCommonParentWith, getImageFilename, getStringRepr, getTextualComment, isObjectOfTypeGraphArcVisible, isObjectOfTypeGraphNodeVisible, removeTypeGraphObject, removeTypeUser, removeTypeUser, setImageFilename, setStringRepr, setTextualComment, setVisibilityOfObjectsOfTypeGraphNode, setVisibityOfObjectsOfTypeGraphArc
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface agg.xt_basis.Type
checkIfNodeCreatable, getAdditionalRepr, getAttrType, getCommonParentWith, getImageFilename, getStringRepr, getTextualComment, isObjectOfTypeGraphArcVisible, isObjectOfTypeGraphNodeVisible, removeTypeGraphObject, setImageFilename, setStringRepr, setTextualComment, setVisibilityOfObjectsOfTypeGraphNode, setVisibityOfObjectsOfTypeGraphArc
 

Constructor Detail

NodeTypeImpl

protected NodeTypeImpl()
holds additional infos about a node of type graph


NodeTypeImpl

protected NodeTypeImpl(java.lang.String stringRepr)
Creates a new type with the given name. There is non-attributable type.

Parameters:
stringRepr - the name of the type

NodeTypeImpl

protected NodeTypeImpl(AttrType at,
                       java.lang.String stringRepr)
Creates a new type with the given attributes and the given name.

Parameters:
at - the declaration of the attributes
stringRepr - the name of the type

NodeTypeImpl

protected NodeTypeImpl(AttrType at)
creates a new type with the given attributes and an empty name.

Parameters:
at - the declaration of the attributes
Method Detail

createAttributeType

public void createAttributeType()
Overrides:
createAttributeType in class TypeImpl

setAttributeType

public void setAttributeType(AttrType at)
Overrides:
setAttributeType in class TypeImpl

isNodeType

public boolean isNodeType()
Specified by:
isNodeType in interface Type
Overrides:
isNodeType in class TypeImpl

isArcType

public boolean isArcType()
Specified by:
isArcType in interface Type
Overrides:
isArcType in class TypeImpl

convertToKey

public java.lang.String convertToKey()
Description copied from class: TypeImpl
Returns result string of this.getStringRepr()+this.getAdditionalRepr()

Specified by:
convertToKey in interface Type
Overrides:
convertToKey in class TypeImpl
See Also:
getStringRepr() and getAdditionalRepr()

adaptTypeAttribute

protected void adaptTypeAttribute(Type type)
Adds those attribute members of the specified Type type which are not found in this type. A conflict can arise when a new member and an existing member have equal names but different types. In this case the name of the existing attribute member will be extended by "?" and then the new attribute member will be added.

Overrides:
adaptTypeAttribute in class TypeImpl

checkDoubleAttributeType

protected void checkDoubleAttributeType()
Overrides:
checkDoubleAttributeType in class TypeImpl

compareTo

public boolean compareTo(Type t)
Returns TRUE if this type is equal to the type t.

Specified by:
compareTo in interface Type
Overrides:
compareTo in class TypeImpl
Returns:
true, if the given type has the same name, attributes and additional string

differentTo

public boolean differentTo(Type t,
                           java.util.Vector<java.lang.String> difference)
Returns TRUE if this type is different to the type t. The Vector difference will contain all found differences between the types, otherwise it is empty. This method should be used sooner for information about differences of types.

Overrides:
differentTo in class TypeImpl

setAbstract

public void setAbstract(boolean b)
Specified by:
setAbstract in interface Type
Overrides:
setAbstract in class TypeImpl

isAbstract

public boolean isAbstract()
Specified by:
isAbstract in interface Type
Overrides:
isAbstract in class TypeImpl

isChildOf

public boolean isChildOf(Type t)
compares the specified type with parents of this object

Specified by:
isChildOf in interface Type
Overrides:
isChildOf in class TypeImpl
Returns:
true, if the specified type has the same name, attributes and additional string representation like a parent of this object

isParentOf

public boolean isParentOf(Type t)
compares the given type and its ancestors with this object

Specified by:
isParentOf in interface Type
Overrides:
isParentOf in class TypeImpl
Returns:
true, if this type has the same name, attributes and additional representation as the specified type t or one of its ancestors.

isRelatedTo

public boolean isRelatedTo(Type t)
Finds out if there is any relation between this type and the given one. Two types are related if they have one common ancestor.

Specified by:
isRelatedTo in interface Type
Overrides:
isRelatedTo in class TypeImpl

getAllParents

public java.util.Vector<Type> getAllParents()
returns a list with all the parents of the current type and itself as the first element

Specified by:
getAllParents in interface Type
Overrides:
getAllParents in class TypeImpl
Returns:
list of all parents

getAllChildren

public java.util.Vector<Type> getAllChildren()
returns a list with all the children of the current type and itself as the first element

Specified by:
getAllChildren in interface Type
Overrides:
getAllChildren in class TypeImpl
Returns:
list of all children

getMaxMultiplicityOfAllChildren

public int getMaxMultiplicityOfAllChildren()
Overrides:
getMaxMultiplicityOfAllChildren in class TypeImpl

getMinMultiplicityOfAllChildren

public int getMinMultiplicityOfAllChildren()
Overrides:
getMinMultiplicityOfAllChildren in class TypeImpl

showRelatives

public void showRelatives()
Overrides:
showRelatives in class TypeImpl

showAllRelatives

public void showAllRelatives()
Overrides:
showAllRelatives in class TypeImpl

getParent

public final Type getParent()
Returns my last direct parent.

Specified by:
getParent in interface Type
Overrides:
getParent in class TypeImpl

getParents

public final java.util.Vector<Type> getParents()
Returns my all direct parents.

Specified by:
getParents in interface Type
Overrides:
getParents in class TypeImpl

setParent

public final void setParent(Type t)
Remove my direct parent and set it to a new parent t. Due to this method I can have only one direct parent.

Specified by:
setParent in interface Type
Overrides:
setParent in class TypeImpl

addParent

public final void addParent(Type t)
Adds a new parent to my parent list.

Specified by:
addParent in interface Type
Overrides:
addParent in class TypeImpl

addChild

protected final void addChild(NodeTypeImpl t)

getChildren

public final java.util.Vector<Type> getChildren()
Returns its direct children only.

Specified by:
getChildren in interface Type
Overrides:
getChildren in class TypeImpl

checkDoubleAttributeName

public java.util.Vector<java.lang.String> checkDoubleAttributeName(Type otherType)
Overrides:
checkDoubleAttributeName in class TypeImpl

removeParent

public final void removeParent(Type t)
Removes this parent from my parent list.

Specified by:
removeParent in interface Type
Overrides:
removeParent in class TypeImpl

removeChild

protected final void removeChild(Type t)
Overrides:
removeChild in class TypeImpl

hasInheritedAttribute

public boolean hasInheritedAttribute()
Overrides:
hasInheritedAttribute in class TypeImpl

setAdditionalRepr

public void setAdditionalRepr(java.lang.String repr)
set an additional graphical string, which is saved together with the name string representation. Here you can save additional information used in another layer. Predefined additional string: if the specified String repr is "NODE" or "[NODE]", then additionalRepr = ":RECT:java.awt.Color[r=0,g=0,b=0]::[NODE]:". This format of additional type information is used for the graphical layout information of nodes.

Specified by:
setAdditionalRepr in interface Type
Overrides:
setAdditionalRepr in class TypeImpl

XwriteObject

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

XreadObject

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

getName

public java.lang.String getName()
internal function to convert a type into a string. If the type contains an empty string representation, this function will return "unnamed" otherwise the string representation of the type (TypeImpl.getStringRepr())

Specified by:
getName in interface Type
Overrides:
getName in class TypeImpl

check

public TypeError check(GraphObject nodeOrArc,
                       int level)
returns if the given GraphObject is valid typed as defined in the type graph. Before this can be checked, all edges and nodes of the type graph must be added to theire types. The given object will not tested if this is its type.

Specified by:
check in interface Type
Overrides:
check in class TypeImpl
Parameters:
nodeOrArc - the object to test
level - a type graph check level, as defined in TypeSet.setLevelOfTypeGraphCheck(int)
Returns:
null, if the graphobject is valid typed otherwise a TypeError if there was a mismatch

check

public TypeError check(Node node,
                       int level)
returns if the given Node is valid typed as defined in the type graph. Before this can be checked, all edges and nodes of the type graph must be added to theire types. The given object will not tested if this is its type.

Overrides:
check in class TypeImpl
Returns:
null, if the graphobject is valid typed otherwise a TypeError if there was a mismatch

hasTypeGraphArc

public boolean hasTypeGraphArc(Type sourceType)
Returns true if at least one edge exists from the specified source type to any other type, otherwise false.

Overrides:
hasTypeGraphArc in class TypeImpl

getTargetsOfArc

public java.util.Vector<Type> getTargetsOfArc(Type sourceType)
Searchs for a type that is the target type of this edge type with the specified source type. Returns a vector with all found target types, otherwise empty vector.

Overrides:
getTargetsOfArc in class TypeImpl

isEdgeCreatable

public boolean isEdgeCreatable(Type sourceType,
                               Type targetType,
                               int level)
Overrides:
isEdgeCreatable in class TypeImpl

check

public TypeError check(Arc arc,
                       int level)
Returns null, if the specified arc is valid typed as defined in the type graph. Before this can be checked, all edges and nodes of the type graph must be added to theire types.

Overrides:
check in class TypeImpl
Returns:
null, if the graphobject is valid typed otherwise a TypeError if there was a mismatch

checkIfEdgeCreatable

public TypeError checkIfEdgeCreatable(Node src,
                                      Node tar,
                                      int level)
Overrides:
checkIfEdgeCreatable in class TypeImpl

checkIfEdgeCreatable

public TypeError checkIfEdgeCreatable(Graph g,
                                      Node src,
                                      Node tar,
                                      int level)
Overrides:
checkIfEdgeCreatable in class TypeImpl

checkSourceMax

protected TypeError checkSourceMax(Graph g,
                                   Node src,
                                   Node tar)
Overrides:
checkSourceMax in class TypeImpl

checkTargetMax

protected TypeError checkTargetMax(Graph g,
                                   Node src,
                                   Node tar)
Overrides:
checkTargetMax in class TypeImpl

addTypeGraphObject

public boolean addTypeGraphObject(GraphObject nodeOrArc)
Add the given GraphObject of a type graph to this type. The GraphObject nodeOrArc must be of this type: it is a Node if this is a node type, it is an Arc if this is an edge type. In case of it is a node type and a node object inside of a type graph is already exist, it should to be removed first.

Specified by:
addTypeGraphObject in interface Type
Overrides:
addTypeGraphObject in class TypeImpl
Returns:
true, if the graph object could be added.

removeTypeGraphObject

public boolean removeTypeGraphObject(GraphObject nodeOrArc)
Remove the given GraphObject from the type graph and from this type. Returns true if remove is done, othewise false. To remove an GraphObject is not possible when the type graph check is activated.

Specified by:
removeTypeGraphObject in interface Type
Overrides:
removeTypeGraphObject in class TypeImpl

removeAllTypeGraphObjects

public void removeAllTypeGraphObjects()
Remove type graph objects from this type.

Specified by:
removeAllTypeGraphObjects in interface Type
Overrides:
removeAllTypeGraphObjects in class TypeImpl

getUsingGraphObjects

public java.util.Vector<GraphObject> getUsingGraphObjects()
Deprecated. replaced by getTypeUsers()

Overrides:
getUsingGraphObjects in class TypeImpl

getTypeUsers

public java.util.Vector<GraphObject> getTypeUsers()
Specified by:
getTypeUsers in interface Type
Overrides:
getTypeUsers in class TypeImpl

addUsingGraphObject

public void addUsingGraphObject(GraphObject nodeOrArc)
Deprecated. replaced by addTypeUser(GraphObject nodeOrArc)

Specified by:
addUsingGraphObject in interface Type
Overrides:
addUsingGraphObject in class TypeImpl

addTypeUser

public void addTypeUser(GraphObject nodeOrArc)
Add the specified GraphObject nodeOrArc: in case of Node - to my TypeGraphNode and in case of Arc - to my TypeGraphArc of a TypeGraph, if it exists.

Specified by:
addTypeUser in interface Type
Overrides:
addTypeUser in class TypeImpl
Parameters:
nodeOrArc -

addUsingGraphObject

public void addUsingGraphObject(GraphObject nodeOrArc,
                                Graph g)
Deprecated. replaced by addTypeUser(GraphObject nodeOrArc, Graph g)

Specified by:
addUsingGraphObject in interface Type
Overrides:
addUsingGraphObject in class TypeImpl

addUser

protected void addUser(Node node)
Add the specified node to my container of graph objects.

Overrides:
addUser in class TypeImpl
Parameters:
node -

removeUser

protected void removeUser(Node node)
Remove the specified node from my container of graph objects.

Overrides:
removeUser in class TypeImpl
Parameters:
node -

addUser

protected void addUser(Arc arc)
Add the specified arc to my container of graph objects.

Overrides:
addUser in class TypeImpl
Parameters:
arc -

removeUser

protected void removeUser(Arc arc)
Remove the specified arc from my container of graph objects.

Overrides:
removeUser in class TypeImpl
Parameters:
arc -

addTypeUser

public void addTypeUser(GraphObject nodeOrArc,
                        Graph g)
Add the specified GraphObject nodeOrArc: in case of Node - to my TypeGraphNode and in case of Arc - to my TypeGraphArc of a TypeGraph, if it exists.

Specified by:
addTypeUser in interface Type
Overrides:
addTypeUser in class TypeImpl
Parameters:
nodeOrArc -
g - is the context graph of the nodeOrArc

removeUsingGraphObject

public void removeUsingGraphObject(GraphObject nodeOrArc)
Deprecated. replaced by removeTypeUser(GraphObject nodeOrArc)

Specified by:
removeUsingGraphObject in interface Type
Overrides:
removeUsingGraphObject in class TypeImpl

removeTypeUser

public void removeTypeUser(GraphObject nodeOrArc)
Remove the specified GraphObject nodeOrArc: in case of Node - from my TypeGraphNode and in case of Arc - from my TypeGraphArc of a TypeGraph, if it exists.

Specified by:
removeTypeUser in interface Type
Overrides:
removeTypeUser in class TypeImpl
Parameters:
nodeOrArc -

setSourceMin

public void setSourceMin(Type sourceType,
                         Type targetType,
                         int value)
Set the min of the source multiplicity of an edge type to the value. The edge type is defined throught the node type sourceType and the node type targetType.

Specified by:
setSourceMin in interface Type
Overrides:
setSourceMin in class TypeImpl

setSourceMax

public void setSourceMax(Type sourceType,
                         Type targetType,
                         int value)
Set the max of the source multiplicity of an edge type to the value. The edge type is defined throught the node type sourceType and the node type targetType.

Specified by:
setSourceMax in interface Type
Overrides:
setSourceMax in class TypeImpl

setTargetMin

public void setTargetMin(Type sourceType,
                         Type targetType,
                         int value)
Set the min of the target multiplicity of an edge type to the value. The edge type is defined throught the node type sourceType and the node type targetType.

Specified by:
setTargetMin in interface Type
Overrides:
setTargetMin in class TypeImpl

setTargetMax

public void setTargetMax(Type sourceType,
                         Type targetType,
                         int value)
Set the max of the target multiplicity of an edge type to the value. The edge type is defined throught the node type sourceType and the node type targetType.

Specified by:
setTargetMax in interface Type
Overrides:
setTargetMax in class TypeImpl

getSourceMin

public int getSourceMin(Type sourceType,
                        Type targetType)
Return the min of the source multiplicity of an edge type. The edge type is defined throught the node type sourceType and the node type targetType.

Specified by:
getSourceMin in interface Type
Overrides:
getSourceMin in class TypeImpl

getSourceMax

public int getSourceMax(Type sourceType,
                        Type targetType)
Return the max of the source multiplicity of an edge type. The edge type is defined throught the node type sourceType and the node type targetType.

Specified by:
getSourceMax in interface Type
Overrides:
getSourceMax in class TypeImpl

getTargetMin

public int getTargetMin(Type sourceType,
                        Type targetType)
Return the min of the target multiplicity of an edge type. The edge type is defined throught the node type sourceType and the node type targetType.

Specified by:
getTargetMin in interface Type
Overrides:
getTargetMin in class TypeImpl

getTargetMax

public int getTargetMax(Type sourceType,
                        Type targetType)
Return the max of the target multiplicity of an edge type. The edge type is defined throught the node type sourceType and the node type targetType.

Specified by:
getTargetMax in interface Type
Overrides:
getTargetMax in class TypeImpl

setSourceMin

public void setSourceMin(int value)
Set the min of the multiplicity of a node type to the value. The node type is defined throught the sourceType .

Specified by:
setSourceMin in interface Type
Overrides:
setSourceMin in class TypeImpl

setSourceMax

public void setSourceMax(int value)
Set the max of the multiplicity of a node type to the value. The node type is defined throught the sourceType .

Specified by:
setSourceMax in interface Type
Overrides:
setSourceMax in class TypeImpl

getSourceMin

public int getSourceMin()
Return the min of the multiplicity of a node type. The node type is defined throught the sourceType.

Specified by:
getSourceMin in interface Type
Overrides:
getSourceMin in class TypeImpl

getSourceMax

public int getSourceMax()
Return the max of the multiplicity of a node type. The node type is defined throught the sourceType.

Specified by:
getSourceMax in interface Type
Overrides:
getSourceMax in class TypeImpl

getTypeGraphArcObject

public Arc getTypeGraphArcObject(Type sourceType,
                                 Type targetType)
Description copied from interface: Type
returns a type graph edge, if it is defined.

Specified by:
getTypeGraphArcObject in interface Type
Overrides:
getTypeGraphArcObject in class TypeImpl

getTypeGraphArc

protected agg.xt_basis.TypeGraphArc getTypeGraphArc(Type sourceType,
                                                    Type targetType)
Returns the subtype object for this source and target combination. The subtype will be created, if it not exists.

Overrides:
getTypeGraphArc in class TypeImpl

getSimilarTypeGraphArc

protected agg.xt_basis.TypeGraphArc getSimilarTypeGraphArc(Type sourceType,
                                                           Type targetType)
Overrides:
getSimilarTypeGraphArc in class TypeImpl

hasTypeGraphArc

public boolean hasTypeGraphArc()
Specified by:
hasTypeGraphArc in interface Type
Overrides:
hasTypeGraphArc in class TypeImpl

hasTypeGraphArc

public boolean hasTypeGraphArc(Type sourceType,
                               Type targetType)
Overrides:
hasTypeGraphArc in class TypeImpl

hasTypeGraphArc

public boolean hasTypeGraphArc(GraphObject sourceType,
                               GraphObject targetType)
Overrides:
hasTypeGraphArc in class TypeImpl

getArcTypeGraphObjects

protected java.util.HashMap<Type,java.util.HashMap<Type,agg.xt_basis.TypeGraphArc>> getArcTypeGraphObjects()
Overrides:
getArcTypeGraphObjects in class TypeImpl

compareTypeGraphArcs

public boolean compareTypeGraphArcs(Type t)
Overrides:
compareTypeGraphArcs in class TypeImpl

compareTypeGraphArcsMultiplicity

public boolean compareTypeGraphArcsMultiplicity(Type t)
Overrides:
compareTypeGraphArcsMultiplicity in class TypeImpl

getTypeGraphNode

protected agg.xt_basis.TypeGraphNode getTypeGraphNode()
Returns the subtype object for this node type.

Overrides:
getTypeGraphNode in class TypeImpl

hasTypeGraphNode

public boolean hasTypeGraphNode()
returns true, if there is an object in the type graph for this type.

Specified by:
hasTypeGraphNode in interface Type
Overrides:
hasTypeGraphNode in class TypeImpl

isTypeGraphNodeUsed

public boolean isTypeGraphNodeUsed()
Overrides:
isTypeGraphNodeUsed in class TypeImpl

isChildTypeGraphNodeUsed

public boolean isChildTypeGraphNodeUsed()
Overrides:
isChildTypeGraphNodeUsed in class TypeImpl

isTypeGraphArcUsed

public boolean isTypeGraphArcUsed(Arc arc)
Overrides:
isTypeGraphArcUsed in class TypeImpl

isTypeUsed

public boolean isTypeUsed()
Overrides:
isTypeUsed in class TypeImpl

isChildTypeUsed

public boolean isChildTypeUsed()
Overrides:
isChildTypeUsed in class TypeImpl

getTypeGraphNodeObject

public Node getTypeGraphNodeObject()
returns the type graph node, if it is defined.

Specified by:
getTypeGraphNodeObject in interface Type
Overrides:
getTypeGraphNodeObject in class TypeImpl

getOwnOutgoingArcTypes

public java.util.Vector<Type> getOwnOutgoingArcTypes()
Returns my own outgoing arc types on condition that a type graph is defined, otherwise returns an empty vector.

Overrides:
getOwnOutgoingArcTypes in class TypeImpl

getOutgoingArcTypes

public java.util.Vector<Type> getOutgoingArcTypes()
Returns all outgoing arc types (of my own and of my parents) on condition that a type graph is defined, otherwise returns an empty vector.

Overrides:
getOutgoingArcTypes in class TypeImpl

getOwnOutgoingArcs

public java.util.Vector<Arc> getOwnOutgoingArcs()
Returns my own outgoing arcs on condition that a type graph is defined, otherwise returns an empty vector.

Overrides:
getOwnOutgoingArcs in class TypeImpl

getOutgoingArcs

public java.util.Vector<Arc> getOutgoingArcs()
Returns all outgoing arcs (of my own and of my parents) on condition that a type graph is defined, otherwise returns an empty vector.

Overrides:
getOutgoingArcs in class TypeImpl

getOwnIncomingArcTypes

public java.util.Vector<Type> getOwnIncomingArcTypes()
Returns my own incoming arc types on condition that a type graph is defined, otherwise returns an empty vector.

Overrides:
getOwnIncomingArcTypes in class TypeImpl

getIncomingArcTypes

public java.util.Vector<Type> getIncomingArcTypes()
Returns all incoming arc types (of my own and of my parents) on condition that a type graph is defined, otherwise returns an empty vector.

Overrides:
getIncomingArcTypes in class TypeImpl

getOwnIncomingArcs

public java.util.Vector<Arc> getOwnIncomingArcs()
Returns my own incoming arcs on condition that a type graph is defined, otherwise returns an empty vector.

Overrides:
getOwnIncomingArcs in class TypeImpl

getIncomingArcs

public java.util.Vector<Arc> getIncomingArcs()
Returns all incoming arcs (of my own and of my parents) on condition that a type graph is defined, otherwise returns an empty vector.

Overrides:
getIncomingArcs in class TypeImpl

isTypeGraphObjectDefined

public boolean isTypeGraphObjectDefined()
returns true, if there is at least one object in the type graph for this type.

Specified by:
isTypeGraphObjectDefined in interface Type
Overrides:
isTypeGraphObjectDefined in class TypeImpl

checkIfRemovableFromSource

public TypeError checkIfRemovableFromSource(GraphObject node,
                                            Arc arc,
                                            int level)
Description copied from interface: Type
returns if the given arc could be removed from the given node so the node would be valid typed. This check makes only sense, if the minimum multiplicity check is activated.

Specified by:
checkIfRemovableFromSource in interface Type
Overrides:
checkIfRemovableFromSource in class TypeImpl
Parameters:
node - the node which will be modified. This node has to be the source of the arc and has to have this type.
arc - the arc which will be removed
level - the actual level. If not set to TypeSet.ENABLED_MAX_MIN this method will do nothing.
Returns:
null, if the node will be valid typed even after removing the arc otherwise a TypeError containing the possible fault.

checkIfRemovableFromTarget

public TypeError checkIfRemovableFromTarget(GraphObject node,
                                            Arc arc,
                                            int level)
Description copied from interface: Type
returns if the given arc could be removed from the given node so the node would be valid typed. This check makes only sense, if the minimum multiplicity check is activated.

Specified by:
checkIfRemovableFromTarget in interface Type
Overrides:
checkIfRemovableFromTarget in class TypeImpl
Parameters:
node - the node which will be modified. This node has to be the target of the arc and has to have this type.
arc - the arc which will be removed
level - the actual level. If not set to TypeSet.ENABLED_MAX_MIN this method will do nothing.
Returns:
null, if the node will be valid typed even after removing the arc otherwise a TypeError containing the possible fault.

checkTargetMin

public TypeError checkTargetMin(GraphObject tarnode,
                                Arc arc)

checkIfRemovable

public TypeError checkIfRemovable(Node node,
                                  int level)
The spcified node must be an instance of my.

Specified by:
checkIfRemovable in interface Type
Overrides:
checkIfRemovable in class TypeImpl
Parameters:
node - the node which will be removed.
level - the actual level. If not set to TypeSet.ENABLED_MAX_MIN this method will do nothing.
Returns:
null, if the node will be valid typed even after removing the arc otherwise a TypeError containing the possible fault.