Search this API

y.io.graphml.graph2d
Class PostprocessorOutputHandler

java.lang.Object
  extended by y.io.graphml.output.AbstractOutputHandler
      extended by y.io.graphml.graph2d.PostprocessorOutputHandler
All Implemented Interfaces:
java.util.EventListener, OutputHandler, OutputHandlerProvider

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

public class PostprocessorOutputHandler
extends AbstractOutputHandler

This output handler writes out a list of YModule instances and adds postprocessor instructions for them.

 

Field Summary
static java.lang.Object PROCESSORS_DPKEY
          Deprecated. Data provider key for all registered post-processors that should be written by this handler.
 
Constructor Summary
PostprocessorOutputHandler()
          Deprecated.  
 
Method Summary
protected  java.lang.String encodeType(YModule module, GraphMLWriteContext context)
          Deprecated. Returns the external name for the given module.
 java.util.Collection getKeyDefinitionAttributes()
          Deprecated. Returns all XML attributes of the key element.
 WritePrecedence getPrecedence()
          Deprecated. Gets the write precedence for the handler.
protected  java.lang.Object getValue(GraphMLWriteContext context, java.lang.Object key)
          Deprecated. Callback method that obtains the data for the given key.
 void writeKeyDefinitionContent(GraphMLWriteContext ctx)
          Deprecated. Writes the contents of the key definition.
protected  void writeValueCore(GraphMLWriteContext context, java.lang.Object data)
          Deprecated. Core write that performs the actual writing of the data.
 
Methods inherited from class y.io.graphml.output.AbstractOutputHandler
addNameToKeyDefinition, addScopeToKeyDefinition, addTypeToKeyDefinition, addUriToKeyDefinition, getDataTagAttributes, getDefaultValue, getScope, getValidScopes, hasDefaultValueAssigned, isDefaultValue, isValidScope, isWriteKeyDefault, onQueryOutputHandler, setDefaultValue, setDefaultValueAssigned, setPrecedence, setScope, setValidScopes, setWriteKeyDefault, writeValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROCESSORS_DPKEY

public static final java.lang.Object PROCESSORS_DPKEY
Deprecated. 
Data provider key for all registered post-processors that should be written by this handler. The key used to retrieve post-processors is the currently serialized Graph instance. The associated value has to be either a YModule instance or a List instance holding only YModule instances.

Constructor Detail

PostprocessorOutputHandler

public PostprocessorOutputHandler()
Deprecated. 
Method Detail

getPrecedence

public WritePrecedence getPrecedence()
Deprecated. 
Description copied from class: AbstractOutputHandler
Gets the write precedence for the handler.

Specified by:
getPrecedence in interface OutputHandler
Overrides:
getPrecedence in class AbstractOutputHandler
Returns:
The write precedence.
See Also:
AbstractOutputHandler.setPrecedence(WritePrecedence)

getKeyDefinitionAttributes

public java.util.Collection getKeyDefinitionAttributes()
Deprecated. 
Description copied from class: AbstractOutputHandler
Returns all XML attributes of the key element.

Specified by:
getKeyDefinitionAttributes in interface OutputHandler
Overrides:
getKeyDefinitionAttributes in class AbstractOutputHandler
Returns:
All attributes of the key element.
See Also:
AbstractOutputHandler.addNameToKeyDefinition(String), AbstractOutputHandler.addScopeToKeyDefinition(y.io.graphml.KeyScope), AbstractOutputHandler.addTypeToKeyDefinition(y.io.graphml.KeyType), AbstractOutputHandler.addUriToKeyDefinition(String)

writeKeyDefinitionContent

public void writeKeyDefinitionContent(GraphMLWriteContext ctx)
Deprecated. 
Description copied from class: AbstractOutputHandler
Writes the contents of the key definition.

Depending on whether AbstractOutputHandler.setWriteKeyDefault(boolean) is enabled and AbstractOutputHandler.hasDefaultValueAssigned() is true, this method will write the GraphML 'default' element and use AbstractOutputHandler.writeValueCore(y.io.graphml.output.GraphMLWriteContext,Object) to serialize the AbstractOutputHandler.getDefaultValue().

Specified by:
writeKeyDefinitionContent in interface OutputHandler
Overrides:
writeKeyDefinitionContent in class AbstractOutputHandler
Parameters:
ctx - The context.

writeValueCore

protected void writeValueCore(GraphMLWriteContext context,
                              java.lang.Object data)
Deprecated. 
Description copied from class: AbstractOutputHandler
Core write that performs the actual writing of the data.

Specified by:
writeValueCore in class AbstractOutputHandler
Parameters:
context - The context.
data - The data.

encodeType

protected java.lang.String encodeType(YModule module,
                                      GraphMLWriteContext context)
Deprecated. 
Returns the external name for the given module.

By default, this method returns the module's qualified class name.

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.

See Also:
NameMapper, PostprocessorInputHandler.newModule(String, y.io.graphml.input.GraphMLParseContext)

getValue

protected java.lang.Object getValue(GraphMLWriteContext context,
                                    java.lang.Object key)
                             throws GraphMLWriteException
Deprecated. 
Description copied from class: AbstractOutputHandler
Callback method that obtains the data for the given key.

Specified by:
getValue in class AbstractOutputHandler
Parameters:
context - The context.
key - The key.
Returns:
The data that is associated with the key.
Throws:
GraphMLWriteException

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