|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectagg.xt_basis.TypeError
public class TypeError
This object stand for an error while type checking. The
TypeSet.checkTypeGraph()
and TypeSet.checkType(agg.xt_basis.Graph)
methods will
return a Enumeration with such objects, if an error occured.
From the object you can get some information about the kind of error and the
wrong typed graph objects. This object will also provide a number for the
error occured.
Field Summary | |
---|---|
static int |
NO_SUCH_TYPE
Error number if a graph object was found which type is not defined in the type graph (but defined in the TypeSet). |
static int |
NO_TYPE_GRAPH
Error number if no type graph was defined. |
static int |
NOT_COMPATIBLE_TYPE
|
static int |
NOT_DEFINED
Error number for undefined errors. |
static int |
PARENT_NOT_ALLOWED
|
static int |
TO_LESS_ARCS
Error number if there were not as many arcs of a type as allowed by the type graph. |
static int |
TO_LESS_NODES
|
static int |
TO_MUCH_ARCS
Error number if there were more arcs of a type as allowed by the type graph. |
static int |
TO_MUCH_NODES
|
static int |
TYPE_ALREADY_DEFINED
Error number if a type is already defined in the type graph (Two nodes of the same type or two edges of the same type between the same nodes). |
static int |
TYPE_IS_IN_USE
Error number you tried to remove a graph object from the type graph, but there are graph objects in the other graphs of this type. |
static int |
TYPE_UNDEFINED
Error number if a type is not present in the type graph. |
static int |
TYPE_UNKNOWN_HERE
Error number if you tried to merge two type sets and there are used types unknown (The merging will happening, if you use another TypeSet to check a graph). |
static int |
UNKNOWN_ERROR
|
Constructor Summary | |
---|---|
TypeError(int errorNumber,
java.lang.String message)
creates an error object. |
|
TypeError(int errorNumber,
java.lang.String message,
Graph containingGraph)
creates an error object. |
|
TypeError(int errorNumber,
java.lang.String message,
GraphObject wrongObject,
Type wrongType)
creates an error object. |
|
TypeError(int errorNumber,
java.lang.String message,
GraphObject wrongObject,
Type wrongType,
Graph containingGraph)
creates an error object. |
|
TypeError(int errorNumber,
java.lang.String message,
Type wrongType)
creates an error object. |
|
TypeError(int errorNumber,
java.lang.String message,
Type wrongType,
Graph containingGraph)
creates an error object. |
Method Summary | |
---|---|
Graph |
getContainingGraph()
returns the graph which was checked and which contains the errors. |
int |
getErrorNumber()
returns a code for the error occured. |
GraphObject |
getGraphObject()
retuns the GraphObject of error. |
java.lang.String |
getMessage()
returns a short english describtion of the error. |
Type |
getType()
retuns the Type of error. |
void |
setContainingGraph(Graph containingGraph)
sets the graph containing the error. |
java.lang.String |
toString()
returns a short string with error number and message for testing purposes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int NOT_DEFINED
public static final int NO_TYPE_GRAPH
public static final int TYPE_UNDEFINED
getType()
will return the missing type and
getContainingGraph()
will return the used
type graph.
public static final int TYPE_ALREADY_DEFINED
getType()
will return the missing type,
getGraphObject()
will return the last
found graph object with this type and
getContainingGraph()
will return the used
type graph.
public static final int TYPE_IS_IN_USE
getType()
will return the type,
getGraphObject()
will return the graph
object you tried to remove or if you tried to remove the type,
getType()
will return the type.
getContainingGraph()
will return the used
type graph.
public static final int TYPE_UNKNOWN_HERE
getType()
will return the
missing type, getGraphObject()
will return
the graph object using this type and
getContainingGraph()
will return the
checked graph.
public static final int NO_SUCH_TYPE
getType()
will return the type,
getGraphObject()
will return the graph
object with the wrong type and
getContainingGraph()
will return the
checked graph.
public static final int TO_MUCH_ARCS
getType()
will return the type,
getGraphObject()
will return the last
found graph object with this type and
getContainingGraph()
will return the
checked graph. It is possible that more than one error object will be
produced for one occurence of this mismatch (f.e. one for each arc).
public static final int TO_LESS_ARCS
getType()
will return the type
and getContainingGraph()
will return the
checked graph.
public static final int TO_LESS_NODES
public static final int TO_MUCH_NODES
public static final int PARENT_NOT_ALLOWED
public static final int NOT_COMPATIBLE_TYPE
public static final int UNKNOWN_ERROR
Constructor Detail |
---|
public TypeError(int errorNumber, java.lang.String message)
errorNumber
- a code for the error occured. As described above (see
NOT_DEFINED
) the code also
defines which other parameters are set.message
- a short english describtion of the error. The describtion
should not contain more informations as given by the
errorNumber and the other parameter.setContainingGraph(Graph)
,
NOT_DEFINED
,
NO_TYPE_GRAPH
public TypeError(int errorNumber, java.lang.String message, Type wrongType)
errorNumber
- a code for the error occured. As described above (see
NOT_DEFINED
) the code also
defines which other parameters are set.message
- a short english describtion of the error. The describtion
should not contain more informations as given by the
errorNumber and the other parameter.wrongType
- the invalid Type
. Which role the Type
plays is described in the comment of the error number.setContainingGraph(Graph)
,
NOT_DEFINED
,
TYPE_UNDEFINED
public TypeError(int errorNumber, java.lang.String message, GraphObject wrongObject, Type wrongType)
errorNumber
- a code for the error occured. As described above (see
NOT_DEFINED
) the code also
defines which other parameters are set.message
- a short english describtion of the error. The describtion
should not contain more informations as given by the
errorNumber and the other parameter.wrongObject
- the invalid GraphObject
.wrongType
- the invalid Type
. Which role the
GraphObject and the Type plays is described in the comment of
the error number.setContainingGraph(Graph)
,
NOT_DEFINED
,
NO_TYPE_GRAPH
,
TYPE_UNDEFINED
,
TYPE_ALREADY_DEFINED
,
TYPE_UNKNOWN_HERE
,
NO_SUCH_TYPE
,
TO_MUCH_ARCS
,
TO_LESS_ARCS
public TypeError(int errorNumber, java.lang.String message, Graph containingGraph)
errorNumber
- a code for the error occured. As described above (see
NOT_DEFINED
) the code also
defines which other parameters are set.message
- a short english describtion of the error. The describtion
should not contain more informations as given by the
errorNumber and the other parameter.containingGraph
- the graph which contains the wrong objects.NOT_DEFINED
,
NO_TYPE_GRAPH
public TypeError(int errorNumber, java.lang.String message, Type wrongType, Graph containingGraph)
errorNumber
- a code for the error occured. As described above (see
NOT_DEFINED
) the code also
defines which other parameters are set.message
- a short english describtion of the error. The describtion
should not contain more informations as given by the
errorNumber and the other parameter.wrongType
- the invalid Type
. Which role the Type
plays is described in the comment of the error number.containingGraph
- the graph which contains the wrong objects.NOT_DEFINED
,
TYPE_UNDEFINED
public TypeError(int errorNumber, java.lang.String message, GraphObject wrongObject, Type wrongType, Graph containingGraph)
errorNumber
- a code for the error occured. As described above (see
NOT_DEFINED
) the code also
defines which other parameters are set.message
- a short english describtion of the error. The describtion
should not contain more informations as given by the
errorNumber and the other parameter.wrongObject
- the invalid GraphObject
.wrongType
- the invalid Type
. Which role the
GraphObject and the Type plays is described in the comment of
the error number.containingGraph
- the graph which contains the wrong objects.NOT_DEFINED
,
NO_TYPE_GRAPH
,
TYPE_UNDEFINED
,
TYPE_ALREADY_DEFINED
,
TYPE_UNKNOWN_HERE
,
NO_SUCH_TYPE
,
TO_MUCH_ARCS
,
TO_LESS_ARCS
Method Detail |
---|
public int getErrorNumber()
NOT_DEFINED
) the code also defines which
other parameters are set.
NOT_DEFINED
,
NO_TYPE_GRAPH
,
TYPE_UNDEFINED
,
TYPE_ALREADY_DEFINED
,
TYPE_UNKNOWN_HERE
,
NO_SUCH_TYPE
,
TO_MUCH_ARCS
,
TO_LESS_ARCS
public java.lang.String getMessage()
getErrorNumber()
public GraphObject getGraphObject()
NOT_DEFINED
).
public Type getType()
NOT_DEFINED
).
public Graph getContainingGraph()
public void setContainingGraph(Graph containingGraph)
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |