Search this API

y.io.graphml.output
Class AbstractDataProviderOutputHandler

java.lang.Object
  extended by y.io.graphml.output.AbstractOutputHandler
      extended by y.io.graphml.output.AbstractDataProviderOutputHandler
All Implemented Interfaces:
java.util.EventListener, OutputHandler, OutputHandlerProvider
Direct Known Subclasses:
ComplexDataProviderOutputHandler, GraphMLHandler.BooleanDataProviderOutputHandler, GraphMLHandler.DoubleDataProviderOutputHandler, GraphMLHandler.FloatDataProviderOutputHandler, GraphMLHandler.IntDataProviderOutputHandler, GraphMLHandler.LongDataProviderOutputHandler, GraphMLHandler.StringDataProviderOutputHandler

public abstract class AbstractDataProviderOutputHandler
extends AbstractOutputHandler

An abstract implementation of the AbstractOutputHandler class that uses an DataProvider to retrieve the values to output for each item.

 

Constructor Summary
protected AbstractDataProviderOutputHandler()
           
protected AbstractDataProviderOutputHandler(java.lang.String name, KeyScope scope, KeyType type)
          Initializes a new instance of the AbstractDataProviderOutputHandler class
 
Method Summary
 DataProvider getDataProvider()
          Gets the DataProvider to use for querying the data for each item.
protected  java.lang.Object getValue(GraphMLWriteContext context, java.lang.Object key)
          Core parse method that obtains the data for the given key.
 void setDataProvider(DataProvider value)
          Sets the DataProvider to use for querying the data for each item.
 
Methods inherited from class y.io.graphml.output.AbstractOutputHandler
addNameToKeyDefinition, addScopeToKeyDefinition, addTypeToKeyDefinition, addUriToKeyDefinition, getDataTagAttributes, getDefaultValue, getKeyDefinitionAttributes, getPrecedence, getScope, getValidScopes, hasDefaultValueAssigned, isDefaultValue, isValidScope, isWriteKeyDefault, onQueryOutputHandler, setDefaultValue, setDefaultValueAssigned, setPrecedence, setScope, setValidScopes, setWriteKeyDefault, writeKeyDefinitionContent, writeValue, writeValueCore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDataProviderOutputHandler

protected AbstractDataProviderOutputHandler()

AbstractDataProviderOutputHandler

protected AbstractDataProviderOutputHandler(java.lang.String name,
                                            KeyScope scope,
                                            KeyType type)
Initializes a new instance of the AbstractDataProviderOutputHandler class

Parameters:
name - The name for the key definition attributes.
scope - The scope for the key definition attributes.
type - The type for the key definition attributes.
Method Detail

setDataProvider

public void setDataProvider(DataProvider value)
Sets the DataProvider to use for querying the data for each item.

Parameters:
value - The DataProvider
See Also:
getDataProvider()

getDataProvider

public DataProvider getDataProvider()
Gets the DataProvider to use for querying the data for each item.

Returns:
The DataProvider
See Also:
setDataProvider(y.base.DataProvider)

getValue

protected java.lang.Object getValue(GraphMLWriteContext context,
                                    java.lang.Object key)
Core parse method that obtains the data for the given key.

This implementation calls DataProvider.get(Object) to retrieve the value from the getDataProvider().

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

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