Search this API

y.io.graphml.graph2d
Class PostprocessorInputHandler

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

Deprecated. Client code should explicitly implement post-processing steps.

public class PostprocessorInputHandler
extends java.lang.Object
implements InputHandler

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

 

Field Summary
static java.lang.String IGNORE_POSTPROCESSOR_ERRORS
          Deprecated.  
 
Constructor Summary
PostprocessorInputHandler()
          Deprecated.  
 
Method Summary
 boolean acceptKey(org.w3c.dom.NamedNodeMap map)
          Deprecated. Accepts keys at graph scope whose attribute yfiles.type has the value postprocessors.
 void applyDefault(GraphMLParseContext context)
          Deprecated. This method is invoked when no data tag is defined, and the default value should be applied.
 ParsePrecedence getPrecedence()
          Deprecated. Gets the parse precedence that is associated with this instance.
protected  YModule newModule(java.lang.String moduleName, GraphMLParseContext context)
          Deprecated. Creates a YModule instance that is used as a post-processor.
 void parseData(GraphMLParseContext context, org.w3c.dom.Node node)
          Deprecated. Parses and executes postprocessing instructions.
protected  void startModule(YModule module, Graph2D graph, GraphMLParseContext context)
          Deprecated. 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 java.lang.String IGNORE_POSTPROCESSOR_ERRORS
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

PostprocessorInputHandler

public PostprocessorInputHandler()
Deprecated. 
Method Detail

acceptKey

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


parseData

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

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

newModule

protected YModule newModule(java.lang.String moduleName,
                            GraphMLParseContext context)
                     throws java.lang.Exception
Deprecated. 
Creates a YModule instance that is used as a post-processor.

The default implementation assumes a public, non-argument constructor in the requested module class.

Note: To prevent obfuscation from breaking post-processing support, an explicit name mapping should be specified for class names of modules that are used as post-processors.

Parameters:
moduleName - the external name identifing the module to instantiate.
Throws:
java.lang.Exception
See Also:
NameMapper, PostprocessorOutputHandler.encodeType(YModule, GraphMLWriteContext)

startModule

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

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

getPrecedence

public ParsePrecedence getPrecedence()
Deprecated. 
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)
Deprecated. 
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-2022,
yWorks GmbH.
All rights reserved.