GraphLab Project

graphlab.plugins.main.saveload.xmlparser
Class GraphmlHandlerImpl

java.lang.Object
  extended by graphlab.plugins.main.saveload.xmlparser.GraphmlHandlerImpl
All Implemented Interfaces:
GraphmlHandler

public class GraphmlHandlerImpl
extends java.lang.Object
implements GraphmlHandler


Field Summary
 BlackBoard bb
           
static boolean DEBUG
           
 GraphModel g
           
static java.util.HashMap<java.lang.String,java.lang.String> graphMLEdgeKeys
           
static java.util.HashMap<java.lang.String,java.lang.String> graphMLGraphKeys
           
static java.util.HashMap<java.lang.String,java.lang.String> graphMLVertexKeys
           
 java.util.HashMap<java.lang.String,VertexModel> vByID
           
 
Constructor Summary
GraphmlHandlerImpl()
           
GraphmlHandlerImpl(BlackBoard blackBoard)
           
GraphmlHandlerImpl(GraphModel graph)
           
 
Method Summary
 void end_edge()
          A container element end event handling method.
 void end_endpoint()
          A container element end event handling method.
 void end_graph()
          A container element end event handling method.
 void end_graphml()
          A container element end event handling method.
 void end_hyperedge()
          A container element end event handling method.
 void end_node()
          A container element end event handling method.
 void end_port()
          A container element end event handling method.
 GraphModel getGraph()
           
 void handle_data(java.lang.String data, org.xml.sax.Attributes meta)
          A data element event handling method.
 void handle_desc(java.lang.String data, org.xml.sax.Attributes meta)
          A data element event handling method.
 void handle_key(java.lang.String data, org.xml.sax.Attributes meta)
          A data element event handling method.
 void handle_locator(org.xml.sax.Attributes meta)
          An empty element event handling method.
 void start_edge(org.xml.sax.Attributes meta)
          A container element start event handling method.
 void start_endpoint(org.xml.sax.Attributes meta)
          A container element start event handling method.
 void start_graph(org.xml.sax.Attributes meta)
          A container element start event handling method.
 void start_graphml(org.xml.sax.Attributes meta)
          A container element start event handling method.
 void start_hyperedge(org.xml.sax.Attributes meta)
          A container element start event handling method.
 void start_node(org.xml.sax.Attributes meta)
          A container element start event handling method.
 void start_port(org.xml.sax.Attributes meta)
          A container element start event handling method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG
See Also:
Constant Field Values

vByID

public java.util.HashMap<java.lang.String,VertexModel> vByID

g

public GraphModel g

bb

public BlackBoard bb

graphMLGraphKeys

public static java.util.HashMap<java.lang.String,java.lang.String> graphMLGraphKeys

graphMLVertexKeys

public static java.util.HashMap<java.lang.String,java.lang.String> graphMLVertexKeys

graphMLEdgeKeys

public static java.util.HashMap<java.lang.String,java.lang.String> graphMLEdgeKeys
Constructor Detail

GraphmlHandlerImpl

public GraphmlHandlerImpl(GraphModel graph)
Parameters:
graph - if graph is null a new graph will be generated which can be get by getGraph() , otherwise the loaded graph will be added to the given graph

GraphmlHandlerImpl

public GraphmlHandlerImpl()
See Also:
GraphmlHandlerImpl(GraphModel graph)

GraphmlHandlerImpl

public GraphmlHandlerImpl(BlackBoard blackBoard)
Method Detail

getGraph

public GraphModel getGraph()

handle_key

public void handle_key(java.lang.String data,
                       org.xml.sax.Attributes meta)
                throws org.xml.sax.SAXException
Description copied from interface: GraphmlHandler
A data element event handling method.

Specified by:
handle_key in interface GraphmlHandler
Parameters:
data - value or null
meta - attributes
Throws:
org.xml.sax.SAXException

start_edge

public void start_edge(org.xml.sax.Attributes meta)
                throws org.xml.sax.SAXException
Description copied from interface: GraphmlHandler
A container element start event handling method.

Specified by:
start_edge in interface GraphmlHandler
Parameters:
meta - attributes
Throws:
org.xml.sax.SAXException

end_edge

public void end_edge()
              throws org.xml.sax.SAXException
Description copied from interface: GraphmlHandler
A container element end event handling method.

Specified by:
end_edge in interface GraphmlHandler
Throws:
org.xml.sax.SAXException

handle_locator

public void handle_locator(org.xml.sax.Attributes meta)
                    throws org.xml.sax.SAXException
Description copied from interface: GraphmlHandler
An empty element event handling method.

Specified by:
handle_locator in interface GraphmlHandler
Throws:
org.xml.sax.SAXException

handle_data

public void handle_data(java.lang.String data,
                        org.xml.sax.Attributes meta)
                 throws org.xml.sax.SAXException
Description copied from interface: GraphmlHandler
A data element event handling method.

Specified by:
handle_data in interface GraphmlHandler
Parameters:
data - value or null
meta - attributes
Throws:
org.xml.sax.SAXException

start_node

public void start_node(org.xml.sax.Attributes meta)
                throws org.xml.sax.SAXException
Description copied from interface: GraphmlHandler
A container element start event handling method.

Specified by:
start_node in interface GraphmlHandler
Parameters:
meta - attributes
Throws:
org.xml.sax.SAXException

end_node

public void end_node()
              throws org.xml.sax.SAXException
Description copied from interface: GraphmlHandler
A container element end event handling method.

Specified by:
end_node in interface GraphmlHandler
Throws:
org.xml.sax.SAXException

start_graph

public void start_graph(org.xml.sax.Attributes meta)
                 throws org.xml.sax.SAXException
Description copied from interface: GraphmlHandler
A container element start event handling method.

Specified by:
start_graph in interface GraphmlHandler
Parameters:
meta - attributes
Throws:
org.xml.sax.SAXException

end_graph

public void end_graph()
               throws org.xml.sax.SAXException
Description copied from interface: GraphmlHandler
A container element end event handling method.

Specified by:
end_graph in interface GraphmlHandler
Throws:
org.xml.sax.SAXException

start_endpoint

public void start_endpoint(org.xml.sax.Attributes meta)
                    throws org.xml.sax.SAXException
Description copied from interface: GraphmlHandler
A container element start event handling method.

Specified by:
start_endpoint in interface GraphmlHandler
Parameters:
meta - attributes
Throws:
org.xml.sax.SAXException

end_endpoint

public void end_endpoint()
                  throws org.xml.sax.SAXException
Description copied from interface: GraphmlHandler
A container element end event handling method.

Specified by:
end_endpoint in interface GraphmlHandler
Throws:
org.xml.sax.SAXException

start_graphml

public void start_graphml(org.xml.sax.Attributes meta)
                   throws org.xml.sax.SAXException
Description copied from interface: GraphmlHandler
A container element start event handling method.

Specified by:
start_graphml in interface GraphmlHandler
Parameters:
meta - attributes
Throws:
org.xml.sax.SAXException

end_graphml

public void end_graphml()
                 throws org.xml.sax.SAXException
Description copied from interface: GraphmlHandler
A container element end event handling method.

Specified by:
end_graphml in interface GraphmlHandler
Throws:
org.xml.sax.SAXException

start_hyperedge

public void start_hyperedge(org.xml.sax.Attributes meta)
                     throws org.xml.sax.SAXException
Description copied from interface: GraphmlHandler
A container element start event handling method.

Specified by:
start_hyperedge in interface GraphmlHandler
Parameters:
meta - attributes
Throws:
org.xml.sax.SAXException

end_hyperedge

public void end_hyperedge()
                   throws org.xml.sax.SAXException
Description copied from interface: GraphmlHandler
A container element end event handling method.

Specified by:
end_hyperedge in interface GraphmlHandler
Throws:
org.xml.sax.SAXException

start_port

public void start_port(org.xml.sax.Attributes meta)
                throws org.xml.sax.SAXException
Description copied from interface: GraphmlHandler
A container element start event handling method.

Specified by:
start_port in interface GraphmlHandler
Parameters:
meta - attributes
Throws:
org.xml.sax.SAXException

end_port

public void end_port()
              throws org.xml.sax.SAXException
Description copied from interface: GraphmlHandler
A container element end event handling method.

Specified by:
end_port in interface GraphmlHandler
Throws:
org.xml.sax.SAXException

handle_desc

public void handle_desc(java.lang.String data,
                        org.xml.sax.Attributes meta)
                 throws org.xml.sax.SAXException
Description copied from interface: GraphmlHandler
A data element event handling method.

Specified by:
handle_desc in interface GraphmlHandler
Parameters:
data - value or null
meta - attributes
Throws:
org.xml.sax.SAXException

GraphLab Project