Search this API

y.io.graphml.graph2d
Class PostprocessorInputHandler

java.lang.Object
  extended by y.io.graphml.graph2d.PostprocessorInputHandler
All Implemented Interfaces:
InputHandler

public class PostprocessorInputHandler
extends Object
implements InputHandler

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


Field Summary
static String IGNORE_POSTPROCESSOR_ERRORS
           
 
Constructor Summary
PostprocessorInputHandler()
           
 
Method Summary
 boolean acceptKey(NamedNodeMap map)
          Accepts keys at graph scope whose attribute yfiles.type has the value postprocessors.
 void applyDefault(GraphMLParseContext context)
          This method is invoked when no data tag is defined, and the default value should be applied.
 ParsePrecedence getPrecedence()
          Gets the parse precedence that is associated with this instance.
 void parseData(GraphMLParseContext context, Node node)
          Parses and executes postprocessing instructions.
protected  void startModule(YModule module, Graph2D graph, GraphMLParseContext context)
          Starts the given module with the given graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IGNORE_POSTPROCESSOR_ERRORS

public static final String IGNORE_POSTPROCESSOR_ERRORS
See Also:
Constant Field Values
Constructor Detail

PostprocessorInputHandler

public PostprocessorInputHandler()
Method Detail

acceptKey

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


parseData

public void parseData(GraphMLParseContext context,
                      Node node)
               throws GraphMLParseException
Parses and executes postprocessing instructions.

Specified by:
parseData in interface InputHandler
Throws:
GraphMLParseException
Parameters:
context - The context in which the parser is.
node - The DOM node which is actually processed.

startModule

protected void startModule(YModule module,
                           Graph2D graph,
                           GraphMLParseContext context)
                    throws GraphMLParseException
Starts the given module with the given graph. This method is called from parseData for each parsed post-processor module.

Throws:
GraphMLParseException - if an exception is thrown by running the module.
Parameters:
module - The module to start.
graph - The graph to pass to the module.
context - The context in which the parser is.

getPrecedence

public ParsePrecedence getPrecedence()
Description copied from interface: InputHandler
Gets the parse precedence that is associated with this instance.

Specified by:
getPrecedence in interface InputHandler
Returns:
The parse precedence for this instance.

applyDefault

public void applyDefault(GraphMLParseContext context)
Description copied from interface: InputHandler
This method is invoked when no data tag is defined, and the default value should be applied.

Specified by:
applyDefault in interface InputHandler
Parameters:
context - the current parse context.

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