|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface defines a factory for the creation of graphs and
graph elements.
It contains a factory method for each graph element defined in
the GraphML format.
The factory methods are called along the parsing process of the input
data and are supposed to return the corresponding user objects
for each graph or graph element.
| Field Summary | |
static int |
EDGEDEFAULT_DIRECTED
Flag for the value directed of the
edgedefault attribute of the graph element. |
static int |
EDGEDEFAULT_UNDIRECTED
Flag for the value undirected of the
edgedefault attribute of the graph element. |
static int |
HYPEREDGE_TYPE_INT
Flag for the value in of the
type attribute of the hyperedge element. |
static int |
HYPEREDGE_TYPE_OUT
Flag for the value out of the
type attribute of the hyperedge element. |
static int |
HYPEREDGE_TYPE_UNDIR
Flag for the value undir of the
type attribute of the hyperedge element. |
| Method Summary | |
Object |
createEdge(GraphMLParseContext context,
String id,
Object source,
Object target,
Object sourceport,
Object targetport,
boolean directed)
Returns a user object which represents an edge. |
Object |
createEndPoint(GraphMLParseContext context,
String id,
Object node,
Object port,
int type)
Returns a user object which represents the endpoint of a hyperedge. |
Object |
createGraph(GraphMLParseContext context,
String id,
int edgedefault)
Returns a user object which represents a graph. |
Object |
createGraphML(GraphMLParseContext context)
Returns the the top-level container of all data. |
Object |
createHyperEdge(GraphMLParseContext context,
String id)
Returns a user object which represents a hyperedge. |
Object |
createNode(GraphMLParseContext context,
String id)
Returns a user object which represents a node. |
Object |
createPort(GraphMLParseContext context,
Object owner,
String name)
Returns a user object which represents a port. |
| Field Detail |
public static final int EDGEDEFAULT_DIRECTED
directed of the
edgedefault attribute of the graph element.
public static final int EDGEDEFAULT_UNDIRECTED
undirected of the
edgedefault attribute of the graph element.
public static final int HYPEREDGE_TYPE_INT
in of the
type attribute of the hyperedge element.
public static final int HYPEREDGE_TYPE_OUT
out of the
type attribute of the hyperedge element.
public static final int HYPEREDGE_TYPE_UNDIR
undir of the
type attribute of the hyperedge element.
| Method Detail |
public Object createGraphML(GraphMLParseContext context)
graphml element is parsed.
The return value of this method will be returned by
parse() method of the parser.
context - the current parse context.
public Object createGraph(GraphMLParseContext context,
String id,
int edgedefault)
context - the current parse context.id - the identifier of the graph as defined in the
input data. May be null if no
id has been specified.edgedefault - indicating if edges are per default directed
or undirected.
public Object createNode(GraphMLParseContext context,
String id)
context - the current parse context.id - the identifier of the node as defined in the
input data.
public Object createPort(GraphMLParseContext context,
Object owner,
String name)
context - the current parse context.owner - the owner of the port (a node or another port)name - the identifier of the port as defined in the
input data.
public Object createEdge(GraphMLParseContext context,
String id,
Object source,
Object target,
Object sourceport,
Object targetport,
boolean directed)
context - the current parse context.id - the identifier of the edge as defined in the
input data. May be null if no
id has been specified.source - the user object representing the source node
of the edge.target - the user object representing the target node
of the edge.sourceport - the user object representing the source port
of the edge.targetport - the user object representing the target port
of the edge.directed - indicates whether the edge is directed or not.
public Object createHyperEdge(GraphMLParseContext context,
String id)
context - the current parse context.id - the identifier of the hyperedge as defined in the
input data. May be null if no
id has been specified.
public Object createEndPoint(GraphMLParseContext context,
String id,
Object node,
Object port,
int type)
context - the current parse context.id - the identifier of the endpoint as defined in the
input data. May be null if no
id has been specified.node - the user object representing the associated
node of the endpoint.type - the direction type of the endpoint.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||