y.io.gml
Class HierarchyNodeParser
java.lang.Object
y.io.gml.ItemParser
y.io.gml.NodeParser
y.io.gml.HierarchyNodeParser
All Implemented Interfaces: GMLTokenizer.Callback
public class HierarchyNodeParser extends NodeParser
This class is capable of parsing nodes and nested graphs of a Hierarchic Graph from valid gml.
It is used by HierarchicGraphParser.
Your browser does not support SVG content.
Method Summary
void
begin ()
this method will be called as soon as
the parser enters the scope.
void
beginScope (java.lang.String scopeName)
Note: subclass implementers should make a super call, if they
want to overwrite this method.
void
end ()
this method will be called as soon as
the parser leaves the scope.
java.lang.Object
getItem ()
Returns the "product" of this scope.
Methods inherited from class y.io.gml.ItemParser
addAttribute , addChild , attribute , attribute , 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
parserFactory
protected ParserFactory parserFactory
folderNode
protected Node folderNode
parent
protected HierarchicGraphParser parent
HierarchyNodeParser
public HierarchyNodeParser (Graph2D graph,
java.util.Map id2Node,
HierarchicGraphParser parent,
ParserFactory pf)
begin
public void begin ()
Description copied from class: ItemParser
this method will be called as soon as
the parser enters the scope. This implementation will clear
the attribute map. Subclasses should therefore make a super call.
Overrides: begin
in class NodeParser
beginScope
public void beginScope (java.lang.String scopeName)
Description copied from class: ItemParser
Note: subclass implementers should make a super call, if they
want to overwrite this method.
Specified by: beginScope
in interface GMLTokenizer.Callback
Overrides: beginScope
in class ItemParser
Parameters: scopeName
- the name of the scope
end
public void end ()
Description copied from class: ItemParser
this method will be called as soon as
the parser leaves the scope. This implementation does nothing.
Subclasses should nevertheless make a super call.
Overrides: end
in class NodeParser
getItem
public java.lang.Object getItem ()
Description copied from class: ItemParser
Returns the "product" of this scope. This method should be
called after this parser has left the scope, i.e. after
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.
Overrides: getItem
in class NodeParser
Returns: the result of the parsing, in this case a Map