Search this API

y.io.gml
Class DefaultHierarchicParserFactory

java.lang.Object
  extended by y.io.gml.DefaultHierarchicParserFactory
All Implemented Interfaces:
ParserFactory

public class DefaultHierarchicParserFactory
extends java.lang.Object
implements ParserFactory

This class is an implementation of the ParserFactory interface. This implementation is capable of parsing the basic gml features. The work is delegated to instances of GraphParser, NodeParser and EdgeParser

 

Constructor Summary
DefaultHierarchicParserFactory()
           
 
Method Summary
 GMLTokenizer.Callback createEdgeParser(Graph2D graph, GMLTokenizer.Callback graphParser)
          return a parser which is capable of parsing the graph.edge scope and putting the result into a graph
 GMLTokenizer.Callback createGMLParser(Graph2D graph)
          return a parser which is capable of parsing a gml stream and putting the result into a graph
 GMLTokenizer.Callback createGraphParser(Graph2D graph, GMLTokenizer.Callback gmlParser)
          return a parser which is capable of parsing the graph scope and putting the result into a graph
 GMLTokenizer.Callback createInterEdgeParser(Graph2D graph, HierarchicGraphParser parent)
          Creates the parser instance that will be used for parsing inter edges.
 GMLTokenizer.Callback createNodeParser(Graph2D graph, GMLTokenizer.Callback graphParser)
          return a parser which is capable of parsing the graph.node scope and putting the result into a graph
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultHierarchicParserFactory

public DefaultHierarchicParserFactory()
Method Detail

createEdgeParser

public GMLTokenizer.Callback createEdgeParser(Graph2D graph,
                                              GMLTokenizer.Callback graphParser)
Description copied from interface: ParserFactory
return a parser which is capable of parsing the graph.edge scope and putting the result into a graph

Specified by:
createEdgeParser in interface ParserFactory
Parameters:
graph - the graph which will be modified by this parser
Returns:
a parser

createGMLParser

public GMLTokenizer.Callback createGMLParser(Graph2D graph)
Description copied from interface: ParserFactory
return a parser which is capable of parsing a gml stream and putting the result into a graph

Specified by:
createGMLParser in interface ParserFactory
Parameters:
graph - the graph which will be modified by this parser
Returns:
a parser

createGraphParser

public GMLTokenizer.Callback createGraphParser(Graph2D graph,
                                               GMLTokenizer.Callback gmlParser)
Description copied from interface: ParserFactory
return a parser which is capable of parsing the graph scope and putting the result into a graph

Specified by:
createGraphParser in interface ParserFactory
Parameters:
graph - the graph which will be modified by this parser
Returns:
a parser

createInterEdgeParser

public GMLTokenizer.Callback createInterEdgeParser(Graph2D graph,
                                                   HierarchicGraphParser parent)
Creates the parser instance that will be used for parsing inter edges.


createNodeParser

public GMLTokenizer.Callback createNodeParser(Graph2D graph,
                                              GMLTokenizer.Callback graphParser)
Description copied from interface: ParserFactory
return a parser which is capable of parsing the graph.node scope and putting the result into a graph

Specified by:
createNodeParser in interface ParserFactory
Parameters:
graph - the graph which will be modified by this parser
Returns:
a parser

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.