Class GraphMLReader<G extends Hypergraph<V,E>,V,E>

java.lang.Object
org.xml.sax.helpers.DefaultHandler
edu.uci.ics.jung.io.GraphMLReader<G,V,E>
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

public class GraphMLReader<G extends Hypergraph<V,E>,V,E> extends DefaultHandler
Reads in data from a GraphML-formatted file and generates graphs based on that data. Currently supports the following parts of the GraphML specification:
  • graphs and hypergraphs
  • directed and undirected edges
  • graph, vertex, edge data
  • graph, vertex, edge descriptions and data descriptions
  • vertex and edge IDs
Each of these is exposed via appropriate get methods. Does not currently support nested graphs or ports.

Note that the user is responsible for supplying a graph Factory that can support the edge types in the supplied GraphML file. If the graph generated by the Factory is not compatible (for example: if the graph does not accept directed edges, and the GraphML file contains a directed edge) then the results are graph-implementation-dependent.

See Also:
  • "http://graphml.graphdrawing.org/specification.html"