|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Type
Instances of this class are used for dynamic typing of graphobjects. Each type is associated with a name (also called "string representation"). Note that two types with the same name need not be equal.
Field Summary | |
---|---|
static int |
UNDEFINED
|
Method Summary | |
---|---|
void |
addParent(Type t)
|
boolean |
addTypeGraphObject(GraphObject nodeOrArc)
Add the given GraphObject 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 context)
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 |
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(GraphObject graphObject,
int level)
returns if the given GraphObject is valid typed as defined in the type graph. |
TypeError |
checkIfNodeCreatable(Graph basisGraph,
int levelOfTypeGraphCheck)
|
TypeError |
checkIfRemovable(Node node,
int level)
returns if the given node could be removed. |
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. |
boolean |
compareTo(Type t)
compares the given type with this object. |
java.lang.String |
convertToKey()
returns a string containing the name, all attributes and the additional string seperated by ":". |
java.lang.String |
getAdditionalRepr()
returns the additional string |
java.util.Vector<Type> |
getAllChildren()
returns a list with all the children of the current type and itself as first element |
java.util.Vector<Type> |
getAllParents()
returns a list with all the parents of the current type and itself as first element |
AttrType |
getAttrType()
Returns the associated attribute type. |
java.util.Vector<Type> |
getChildren()
Returns its direct children only. |
java.util.List<Type> |
getCommonParentWith(Type t)
|
java.lang.String |
getImageFilename()
|
java.lang.String |
getName()
Returns the name of the type. |
Type |
getParent()
Returns the parent. |
java.util.Vector<Type> |
getParents()
|
int |
getSourceMax()
|
int |
getSourceMax(Type sourceType,
Type targetType)
|
int |
getSourceMin()
|
int |
getSourceMin(Type sourceType,
Type targetType)
|
java.lang.String |
getStringRepr()
Returns the string representation. |
int |
getTargetMax(Type sourceType,
Type targetType)
|
int |
getTargetMin(Type sourceType,
Type targetType)
|
java.lang.String |
getTextualComment()
|
Arc |
getTypeGraphArcObject(Type sourceType,
Type targetType)
returns a type graph edge, if it is defined. |
Node |
getTypeGraphNodeObject()
returns a type graph node, if it is defined. |
java.util.Vector<GraphObject> |
getTypeUsers()
|
boolean |
hasTypeGraphArc()
|
boolean |
hasTypeGraphNode()
|
boolean |
isAbstract()
|
boolean |
isArcType()
|
boolean |
isChildOf(Type t)
compares the given type with this object and its ancestors |
boolean |
isNodeType()
|
boolean |
isObjectOfTypeGraphArcVisible(Type sourceType,
Type targetType)
|
boolean |
isObjectOfTypeGraphNodeVisible()
|
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 |
isTypeGraphObjectDefined()
returns true, if there is at least one object in the type graph for this type. |
void |
removeAllTypeGraphObjects()
remove type graph objects from this type. |
void |
removeParent(Type t)
|
boolean |
removeTypeGraphObject(GraphObject nodeOrArc)
Remove the given GraphObject of the type graph from this type. |
boolean |
removeTypeGraphObject(GraphObject nodeOrArc,
boolean forceToRemove)
|
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. |
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 |
setImageFilename(java.lang.String imageFilename)
|
void |
setParent(Type t)
Sets the parent. |
void |
setSourceMax(int value)
|
void |
setSourceMax(Type sourceType,
Type targetType,
int value)
|
void |
setSourceMin(int value)
|
void |
setSourceMin(Type sourceType,
Type targetType,
int value)
|
void |
setStringRepr(java.lang.String n)
Sets the string representation. |
void |
setTargetMax(Type sourceType,
Type targetType,
int value)
|
void |
setTargetMin(Type sourceType,
Type targetType,
int value)
|
void |
setTextualComment(java.lang.String comment)
|
void |
setVisibilityOfObjectsOfTypeGraphNode(boolean vis)
|
void |
setVisibityOfObjectsOfTypeGraphArc(Type sourceType,
Type targetType,
boolean vis)
|
Methods inherited from interface agg.util.XMLObject |
---|
XreadObject, XwriteObject |
Field Detail |
---|
static final int UNDEFINED
Method Detail |
---|
java.lang.String getStringRepr()
Type getParent()
java.util.Vector<Type> getParents()
java.lang.String getName()
void setStringRepr(java.lang.String n)
void setParent(Type t)
void addParent(Type t)
void removeParent(Type t)
java.util.Vector<Type> getChildren()
AttrType getAttrType()
boolean compareTo(Type t)
void setAdditionalRepr(java.lang.String repr)
java.lang.String getAdditionalRepr()
setAdditionalRepr(java.lang.String)
void setImageFilename(java.lang.String imageFilename)
java.lang.String getImageFilename()
void setTextualComment(java.lang.String comment)
java.lang.String getTextualComment()
boolean isArcType()
boolean isNodeType()
void setAbstract(boolean b)
boolean isAbstract()
boolean isChildOf(Type t)
boolean isParentOf(Type t)
boolean isRelatedTo(Type t)
java.util.Vector<Type> getAllParents()
java.util.List<Type> getCommonParentWith(Type t)
java.util.Vector<Type> getAllChildren()
java.lang.String convertToKey()
TypeError check(GraphObject graphObject, int level)
graphObject
- the object to testlevel
- a type graph check level, as defined in
TypeSet.setLevelOfTypeGraphCheck(int)
TypeError
if there was a mismatchTypeError checkIfRemovable(Node node, int level)
node
- the node which will be removed.level
- the actual level. If not set to
TypeSet.ENABLED_MAX_MIN
this method will do nothing.
TypeError
containing the possible fault.TypeError checkIfRemovableFromSource(GraphObject node, Arc arc, int level)
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 removedlevel
- the actual level. If not set to
TypeSet.ENABLED_MAX_MIN
this method will do nothing.
TypeError
containing the possible fault.TypeError checkIfRemovableFromTarget(GraphObject node, Arc arc, int level)
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 removedlevel
- the actual level. If not set to
TypeSet.ENABLED_MAX_MIN
this method will do nothing.
TypeError
containing the possible fault.boolean addTypeGraphObject(GraphObject nodeOrArc)
boolean removeTypeGraphObject(GraphObject nodeOrArc)
boolean removeTypeGraphObject(GraphObject nodeOrArc, boolean forceToRemove)
boolean isTypeGraphObjectDefined()
Node getTypeGraphNodeObject()
boolean hasTypeGraphNode()
void setVisibilityOfObjectsOfTypeGraphNode(boolean vis)
void setVisibityOfObjectsOfTypeGraphArc(Type sourceType, Type targetType, boolean vis)
boolean isObjectOfTypeGraphNodeVisible()
boolean isObjectOfTypeGraphArcVisible(Type sourceType, Type targetType)
Arc getTypeGraphArcObject(Type sourceType, Type targetType)
boolean hasTypeGraphArc()
void removeAllTypeGraphObjects()
void addTypeUser(GraphObject nodeOrArc)
nodeOrArc
- void addTypeUser(GraphObject nodeOrArc, Graph context)
nodeOrArc
- a node resp. arc of the context graphcontext
- the context graph of the node resp. arcvoid addUsingGraphObject(GraphObject nodeOrArc)
void addUsingGraphObject(GraphObject nodeOrArc, Graph g)
java.util.Vector<GraphObject> getTypeUsers()
void removeUsingGraphObject(GraphObject nodeOrArc)
void removeTypeUser(GraphObject nodeOrArc)
nodeOrArc
- void setSourceMin(Type sourceType, Type targetType, int value)
void setSourceMax(Type sourceType, Type targetType, int value)
void setTargetMin(Type sourceType, Type targetType, int value)
void setTargetMax(Type sourceType, Type targetType, int value)
int getSourceMin(Type sourceType, Type targetType)
int getSourceMax(Type sourceType, Type targetType)
int getTargetMin(Type sourceType, Type targetType)
int getTargetMax(Type sourceType, Type targetType)
void setSourceMin(int value)
void setSourceMax(int value)
int getSourceMin()
int getSourceMax()
TypeError checkIfNodeCreatable(Graph basisGraph, int levelOfTypeGraphCheck)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |