yext.graphml.processor
Class PostprocessorInputHandler

java.lang.Object
  extended byyext.graphml.reader.AbstractDOMInputHandler
      extended byyext.graphml.processor.PostprocessorInputHandler
All Implemented Interfaces:
DOMInputHandler, Precedence

public class PostprocessorInputHandler
extends AbstractDOMInputHandler
implements Precedence

This input handler parses end executes postprocessor instructions specified in GraphML files at graph scope.


Field Summary
 
Fields inherited from interface org.graphdrawing.graphml.reader.dom.Precedence
GRAPHML_PRECEDENCE
 
Constructor Summary
PostprocessorInputHandler()
           
 
Method Summary
 boolean acceptKey(NamedNodeMap map, int scopeType)
          Accepts keys at graph scope whose attribute yfiles.type has the value postprocessors.
protected  void applyDefault(DOMGraphMLParseContext context, Graph graph, Object nodeedge)
          Does nothing yet.
 int getPrecedence()
          Has precedence Precedence.GRAPHML_PRECEDENCE + 1.
protected  void invokePostProcessor(Graph graph, Object postprocessor)
          Invokes the given postprocessor on the given graph.
protected  void parseData(DOMGraphMLParseContext context, Graph graph, Object nodeedge, boolean defaultMode, Node domNode)
          Parses and executes postprocessing instructions.
 
Methods inherited from class yext.graphml.reader.AbstractDOMInputHandler
applyDefault, parseData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostprocessorInputHandler

public PostprocessorInputHandler()
Method Detail

acceptKey

public boolean acceptKey(NamedNodeMap map,
                         int scopeType)
Accepts keys at graph scope whose attribute yfiles.type has the value postprocessors.

Specified by:
acceptKey in interface DOMInputHandler
Parameters:
map - the attributes of the key tag.
scopeType - the scope for which the key is defined. One of GraphMLConstants.SCOPE_ALL, GraphMLConstants.SCOPE_EDGE, GraphMLConstants.SCOPE_ENDPOINT, GraphMLConstants.SCOPE_GRAPH, GraphMLConstants.SCOPE_NODE, GraphMLConstants.SCOPE_PORT, GraphMLConstants.SCOPE_HYPEREDGE.

getPrecedence

public int getPrecedence()
Has precedence Precedence.GRAPHML_PRECEDENCE + 1.

Specified by:
getPrecedence in interface Precedence
Returns:
the precedence value of the handler

parseData

protected void parseData(DOMGraphMLParseContext context,
                         Graph graph,
                         Object nodeedge,
                         boolean defaultMode,
                         Node domNode)
Parses and executes postprocessing instructions.

Specified by:
parseData in class AbstractDOMInputHandler
Parameters:
context - The context in which the parser is.
graph - The current graph in the parse context.
nodeedge - The current node/edge in the parse context.
defaultMode - Whether default data or real data is read.
domNode - The DOM node which is actually processed.

invokePostProcessor

protected void invokePostProcessor(Graph graph,
                                   Object postprocessor)
Invokes the given postprocessor on the given graph.


applyDefault

protected void applyDefault(DOMGraphMLParseContext context,
                            Graph graph,
                            Object nodeedge)
Does nothing yet.

Specified by:
applyDefault in class AbstractDOMInputHandler
Parameters:
context - The context in which the parser is.
graph - The current graph in the parse context.
nodeedge - The current node/edge in the parse context.


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