y.io.gml
Class DefaultParserFactory

java.lang.Object
  |
  +--y.io.gml.DefaultParserFactory
All Implemented Interfaces:
ParserFactory

public class DefaultParserFactory
extends 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
DefaultParserFactory()
           
 
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 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

DefaultParserFactory

public DefaultParserFactory()
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

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-2003,
yWorks GmbH.
All rights reserved.

2003