infovis.graph.io
Class GraphMLReader
java.lang.Object
infovis.io.AbstractReader
infovis.io.AbstractXMLReader
infovis.graph.io.GraphMLReader
- All Implemented Interfaces:
- ContentHandler, EntityResolver
public class GraphMLReader
- extends AbstractXMLReader
GraphML format reader.
- Version:
- $Revision: 1.18 $
- Author:
- Jean-Daniel Fekete
- InfoVis factory arguments:
- GraphReaderFactory xml, GraphReaderFactory gml
GraphMLReader
public GraphMLReader(InputStream in,
String name,
Graph graph)
- Constructor for GraphMLReader.
- Parameters:
in
- the BufferedReadername
- the graph namegraph
- the graph.
declareKey
public void declareKey(String keyFor,
String ID,
String type)
- Declare a key.
- Parameters:
keyFor
- category the key is for, can be graph, edge or node.ID
- identificator for this key.type
- data type of this key.
findNode
public int findNode(String id)
- Returns a n ode given its unique id.
- Parameters:
id
- the unique id.
- Returns:
- a n ode given its unique id.
startDocument
public void startDocument()
throws SAXException
- Specified by:
startDocument
in interface ContentHandler
- Overrides:
startDocument
in class AbstractXMLReader
- Throws:
SAXException
- See Also:
ContentHandler.startDocument()
startElement
public void startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
throws SAXException
- Specified by:
startElement
in interface ContentHandler
- Overrides:
startElement
in class AbstractXMLReader
- Throws:
SAXException
- See Also:
ContentHandler.startElement(String, String, String, Attributes)
endElement
public void endElement(String namespaceURI,
String localName,
String qName)
throws SAXException
- Specified by:
endElement
in interface ContentHandler
- Overrides:
endElement
in class AbstractXMLReader
- Throws:
SAXException
- See Also:
ContentHandler.endElement(String, String, String)
characters
public void characters(char[] ch,
int start,
int length)
throws SAXException
- Specified by:
characters
in interface ContentHandler
- Overrides:
characters
in class AbstractXMLReader
- Throws:
SAXException
- See Also:
ContentHandler.characters(char[], int, int)
Copyright © 2005 by Jean-Daniel Fekete and INRIA, France All rights reserved.