prefuse.data.io
Class GraphMLReader.GraphMLHandler

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by prefuse.data.io.GraphMLReader.GraphMLHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, GraphMLReader.Tokens
Enclosing class:
GraphMLReader

public static class GraphMLReader.GraphMLHandler
extends org.xml.sax.helpers.DefaultHandler
implements GraphMLReader.Tokens

A SAX Parser for GraphML data files.


Field Summary
protected  java.lang.String m_dflt
           
protected  Table m_edges
           
protected  Schema m_esch
           
protected  java.lang.String m_for
           
protected  Graph m_graph
           
protected  java.lang.String m_graphid
           
protected  java.lang.String m_id
           
protected  java.util.HashMap m_idMap
           
protected  java.lang.String m_name
           
protected  java.util.HashMap m_nodeMap
           
protected  Table m_nodes
           
protected  Schema m_nsch
           
protected  ParserFactory m_pf
           
protected  java.lang.StringBuffer m_sbuf
           
protected  java.lang.String m_type
           
protected static java.lang.String SRC
           
protected static java.lang.String SRCID
           
protected static java.lang.String TRG
           
protected static java.lang.String TRGID
           
 
Fields inherited from interface prefuse.data.io.GraphMLReader.Tokens
ALL, ATTRNAME, ATTRTYPE, BOOLEAN, DATA, DATE, DEFAULT, DIRECTED, DOUBLE, EDGE, EDGEDEF, FLOAT, FOR, GRAPH, ID, INT, INTEGER, KEY, LONG, NODE, REAL, SOURCE, STRING, TARGET, TYPE, UNDIRECTED
 
Constructor Summary
GraphMLReader.GraphMLHandler()
           
 
Method Summary
protected  void addToSchema()
           
 void characters(char[] ch, int start, int length)
           
 void endDocument()
           
 void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
           
protected  void error(java.lang.Exception e)
           
protected  void error(java.lang.String s)
           
 Graph getGraph()
           
protected  java.lang.Object parse(java.lang.String s, java.lang.Class type)
           
protected  java.lang.Class parseType(java.lang.String type)
           
protected  void schemaCheck()
           
 void startDocument()
           
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_pf

protected ParserFactory m_pf

SRC

protected static final java.lang.String SRC

TRG

protected static final java.lang.String TRG

SRCID

protected static final java.lang.String SRCID

TRGID

protected static final java.lang.String TRGID

m_nsch

protected Schema m_nsch

m_esch

protected Schema m_esch

m_graphid

protected java.lang.String m_graphid

m_graph

protected Graph m_graph

m_nodes

protected Table m_nodes

m_edges

protected Table m_edges

m_id

protected java.lang.String m_id

m_for

protected java.lang.String m_for

m_name

protected java.lang.String m_name

m_type

protected java.lang.String m_type

m_dflt

protected java.lang.String m_dflt

m_sbuf

protected java.lang.StringBuffer m_sbuf

m_nodeMap

protected java.util.HashMap m_nodeMap

m_idMap

protected java.util.HashMap m_idMap
Constructor Detail

GraphMLReader.GraphMLHandler

public GraphMLReader.GraphMLHandler()
Method Detail

startDocument

public void startDocument()
Specified by:
startDocument in interface org.xml.sax.ContentHandler
Overrides:
startDocument in class org.xml.sax.helpers.DefaultHandler

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
Specified by:
endDocument in interface org.xml.sax.ContentHandler
Overrides:
endDocument in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String localName,
                       java.lang.String qName)
Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
Throws:
org.xml.sax.SAXException

schemaCheck

protected void schemaCheck()

addToSchema

protected void addToSchema()

parseType

protected java.lang.Class parseType(java.lang.String type)

parse

protected java.lang.Object parse(java.lang.String s,
                                 java.lang.Class type)
                          throws DataParseException
Throws:
DataParseException

getGraph

public Graph getGraph()

error

protected void error(java.lang.String s)

error

protected void error(java.lang.Exception e)


Copyright © 2007 Regents of the University of California