|
||||||||||
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.GraphParser
This class works together with NodeParser and EdgeParser instances. It can parse the .graph scope It will store the mapping between element ids (Integer) to element instances in the graph.
Field Summary | |
protected Graph2D |
graph
|
protected Map |
id2Edge
|
protected Map |
id2Node
|
Fields inherited from class y.io.gml.ItemParser |
attributes, childMap, delegate, level |
Constructor Summary | |
GraphParser(Graph2D graph)
|
Method Summary | |
void |
addAttribute(String key,
Object value)
Puts the key value pair into the local attribute map |
void |
end()
this method will be called as soon as the parser leaves the scope. |
Map |
getId2Edge()
Getter for property id2Edge. |
Map |
getId2Node()
Getter for property id2Node. |
Object |
getItem()
Returns the "product" of this scope. |
Methods inherited from class y.io.gml.ItemParser |
addChild, attribute, attribute, begin, beginScope, childFinished, 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 |
Field Detail |
protected Graph2D graph
protected Map id2Node
protected Map id2Edge
Constructor Detail |
public GraphParser(Graph2D graph)
Method Detail |
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
public Map getId2Edge()
public Map getId2Node()
public void addAttribute(String key, Object value)
ItemParser
addAttribute
in class ItemParser
key
- the keyvalue
- the valuepublic void end()
ItemParser
end
in class ItemParser
|
© 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 |