org.graphdrawing.graphml.reader.dom
Class DOMGraphMLParseContext

java.lang.Object
  extended byorg.graphdrawing.graphml.reader.GraphMLParseContext
      extended byorg.graphdrawing.graphml.reader.dom.DOMGraphMLParseContext
All Implemented Interfaces:
Lookup

public class DOMGraphMLParseContext
extends GraphMLParseContext

Specialized implementation of GraphMLParseContext for DOM based parsing


Nested Class Summary
 
Nested classes inherited from class org.graphdrawing.graphml.reader.GraphMLParseContext
GraphMLParseContext.ResourceDecoder, GraphMLParseContext.ResourceHandler
 
Field Summary
 
Fields inherited from class org.graphdrawing.graphml.reader.GraphMLParseContext
PROPERTY_GRAPHML_CORE_NS, PROPERTY_YWORKS_EXT_NS
 
Constructor Summary
DOMGraphMLParseContext()
           
 
Method Summary
 NamedNodeMap getAttributes()
          Returns the XML attributes of the currently processed element.
 String getAttributeValue(String attrName)
          Return the value of an XML attribute in the current parse state
 GraphMLParseErrorHandler getErrorHandler()
          Return a reference to an error handler that can be used to handle error conditions
 Object lookup(Class c)
          Retrieve an object that is indexed by class c.
 void setLookup(Class c, Object o)
          Store a new value in the lookup map
 
Methods inherited from class org.graphdrawing.graphml.reader.GraphMLParseContext
getContainers, getCurrentContainer, getProperty, getSecondToCurrentContainer, popGraphMLElement, pushGraphMLElement, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMGraphMLParseContext

public DOMGraphMLParseContext()
Method Detail

getAttributes

public NamedNodeMap getAttributes()
Returns the XML attributes of the currently processed element.


getErrorHandler

public GraphMLParseErrorHandler getErrorHandler()
Description copied from class: GraphMLParseContext
Return a reference to an error handler that can be used to handle error conditions

Specified by:
getErrorHandler in class GraphMLParseContext
Returns:
a reference to an error handler

getAttributeValue

public String getAttributeValue(String attrName)
Description copied from class: GraphMLParseContext
Return the value of an XML attribute in the current parse state

Specified by:
getAttributeValue in class GraphMLParseContext
Parameters:
attrName - the name of the attribute
Returns:
the value of the XML attribute attrName in the current parse state

lookup

public Object lookup(Class c)
Description copied from interface: Lookup
Retrieve an object that is indexed by class c. The return value should be an instance of class c or a subclass.

Specified by:
lookup in interface Lookup
Overrides:
lookup in class GraphMLParseContext

setLookup

public void setLookup(Class c,
                      Object o)
Description copied from class: GraphMLParseContext
Store a new value in the lookup map

Overrides:
setLookup in class GraphMLParseContext
Parameters:
c - the class that is used as lookup key
o - an object that should be an implementation of c


Copyright ©2000-2009, yWorks GmbH. All rights reserved.