infovis.graph.io
Class GraphMLReader

java.lang.Object
  extended by infovis.io.AbstractReader
      extended by infovis.io.AbstractXMLReader
          extended by 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

Constructor Summary
GraphMLReader(InputStream in, String name, Graph graph)
          Constructor for GraphMLReader.
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void declareKey(String keyFor, String ID, String type)
          Declare a key.
 void endElement(String namespaceURI, String localName, String qName)
           
 int findNode(String id)
          Returns a n ode given its unique id.
 void startDocument()
           
 void startElement(String namespaceURI, String localName, String qName, Attributes atts)
           
 
Methods inherited from class infovis.io.AbstractXMLReader
endDocument, endPrefixMapping, ignorableWhitespace, load, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping
 
Methods inherited from class infovis.io.AbstractReader
close, createColumn, getBufferedReader, getEncoding, getIn, getName, guessFieldType, setEncoding, setIn, setName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphMLReader

public GraphMLReader(InputStream in,
                     String name,
                     Graph graph)
Constructor for GraphMLReader.

Parameters:
in - the BufferedReader
name - the graph name
graph - the graph.
Method Detail

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.