C

OutputHandlerBase<TKey, TData>
abstract

Abstract base implementation of the IOutputHandler interface.
ImplementsInheritance Hierarchy

Members

Show:

Constructors

Initializes a new instance of the OutputHandlerBase<TKey, TData> class using the provided scope, name, and type for the key definition.
protected

Parameters

keyType: Constructor<TKey>
The type of the keys.
dataType: Constructor<TData>
The type of the data.
scope: KeyScope
The scope.
name: string
The name to use for the key definition.
type: KeyType
The type to use for the key definition.

See Also

API
setKeyDefinitionUri

Properties

Gets the XML attributes that should be added to the data element.
Gets or sets a value indicating whether a default value has been assigned.
final

Property Value

true if a default value has been assigned, false otherwise.
Gets or sets the default value.
Setting this value also sets the defaultExists property.
final

Property Value

The default value.
Gets the XML attributes that should be added to the key definition in the GraphML key element.
Gets or sets the write precedence for the handler.
conversionfinal

Property Value

The write precedence.
Gets or sets a value indicating whether to write the key default.
final

Property Value

true if the key default should be written; false otherwise.

Methods

Obtains the data for the given key.
protectedabstract

Parameters

context: IWriteContext
The context.
key: TKey
The key.

Return Value

TData
The data that is associated with the key.

See Also

Developer's Guide
Determines whether in the current context, the value is the default value and therefore no data element needs to be written.
This implementation will return false if no default has been set. Otherwise it will use getValue and compare the result with the defaultValue to determine whether they are equal and therefore no data needs to be written.

Parameters

context: IWriteContext
The context.

Return Value

boolean
true if for the current context the default value applies and therefore no data element needs to be written.
Sets the name for the key definition.
final

Parameters

name: string
The name of the key element.
Sets the scope for the key definition.
Note that the official GraphML schema does not support the GRAPHML so this implementation will silently ignore this, which will result in ALL implicitly being defined.
final

Parameters

scope: KeyScope
The scope of the key element.
Sets the key type for the key definition.
final

Parameters

type: KeyType
The type of the key element.
Sets an optional URI for the key definition.
By default, no URI is set.
final

Parameters

uri: string
The URI of the key element.
Writes the contents of the key definition.
Depending on whether writeKeyDefault is enabled and defaultExists is true, this method will write the GraphML 'default' element and use writeValueCore to serialize the defaultValue.

Parameters

context: IWriteContext
The context.
Actually writes the value for the current context.
This method will use getValue to obtain the data and delegate to writeValueCore to perform the actual serialization.
final

Parameters

context: IWriteContext
The context.
Performs the actual writing of the data.
protectedabstract

Parameters

context: IWriteContext
The context.
data: TData
The data.

See Also

Developer's Guide