|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.io.gml.ItemParser | +--y.io.gml.EdgeParser
This class is used by GraphParser. It can parse the .edge scope It will create an Edge in a graph for each run.
Field Summary |
Fields inherited from class y.io.gml.ItemParser |
attributes, childMap, delegate, level |
Constructor Summary | |
EdgeParser(Graph2D graph,
Map id2Node,
Map id2Edge)
Creates an edge parser, which is capable of parsing the top level attributes of the .graph.edge scope. |
Method Summary | |
void |
begin()
this method will be called as soon as the parser enters the scope. |
void |
childFinished(ItemParser child)
this method will be called, as soon as the a child ItemParser finished and returned from its end() method. |
void |
end()
this method will be called as soon as the parser leaves the scope. |
Object |
getItem()
Returns the "product" of this scope. |
protected void |
handleLabels()
Applies the parsed edge label attributes to the edge labels of this edges. |
Methods inherited from class y.io.gml.ItemParser |
addAttribute, addChild, attribute, attribute, beginScope, endScope, getAttributes, getBoolean, getDouble, getDouble, getInt, getInt, getLevel, getString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EdgeParser(Graph2D graph, Map id2Node, Map id2Edge)
graph
- the graph, for which an edge will be parsedid2Node
- a map, which contains mappings between node ids (Integer)
and Node instancesid2Edge
- a map, that will be filled by this class with mappings
between edge ids (Integer) to edge instancesMethod Detail |
public void begin()
ItemParser
begin
in class ItemParser
public void childFinished(ItemParser child)
ItemParser
childFinished
in class ItemParser
child
- the child ItemParser, which just finishedprotected void handleLabels()
public void end()
ItemParser
end
in class ItemParser
public Object getItem()
ItemParser
ItemParser.end()
has been called. The latter should construct
the resulting item from the collected data and this item
should be returned by this method. By default, this method
return the map of the attributes.
getItem
in class ItemParser
Map
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |