An implementation of the OutputHandlerBase<TKey, TData> class, that uses an IMapper<K, V> to retrieve the values to output for each item and a serializer callback for the serialization or delegates to the serializeCore callback.
Implements
- I
Members
Show:
Constructors
Initializes a new instance of the MapperOutputHandler<TKey, TData> class using the provided key scope, the name, and the key type.
Initializes a new instance of the MapperOutputHandler<TKey, TData> class using the provided key scope, the name, and the key type.
Properties
Gets the XML attributes that should be added to the data element.
Gets the XML attributes that should be added to the data element.
readonly
Defined in
OutputHandlerBase.dataTagAttributesfinal
Property Value
true if a default value has been assigned, false otherwise.Defined in
OutputHandlerBase.defaultExistsSetting this value also sets the defaultExists property.
final
Property Value
The default value.
Defined in
OutputHandlerBase.defaultValueGets the XML attributes that should be added to the key definition in the GraphML key element.
Gets the XML attributes that should be added to the key definition in the GraphML key element.
readonly
Gets or sets the mapper to use for querying the data for each item.
Gets or sets the mapper to use for querying the data for each item.
conversionfinal
Property Value
The mapper.
Gets or sets the write precedence for the handler.
Gets or sets the write precedence for the handler.
Gets or sets the serialization callback to use for serializing the value in writeValueCore.
Gets or sets the serialization callback to use for serializing the value in writeValueCore.
final
Property Value
The serialization callback or
null to indicate that the context should be used instead.See Also
API
- sourceType
This type will be used as the sourceType.
final
Property Value
The desired type of the object that is serialized.
See Also
final
Property Value
true if the key default should be written; false otherwise.Defined in
OutputHandlerBase.writeKeyDefaultMethods
Obtains the data for the given key.
Obtains the data for the given key.
protected
Parameters
- context: IWriteContext
- The context.
- key: TKey
- The key.
Return Value
- TData
- The data that is associated with the key using the mapper.
Overrides
OutputHandlerBase.getValueDetermines whether in the current context, the value is the default value and therefore no data element needs to be written.
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
trueif for the current context the default value applies and therefore no data element needs to be written.
Defined in
OutputHandlerBase.isDefaultValuefinal
Parameters
- name: string
- The name of the key element.
Defined in
OutputHandlerBase.setKeyDefinitionNameSets the scope for the key definition.
Sets the scope for the key definition.
final
Parameters
- scope: KeyScope
- The scope of the key element.
Defined in
OutputHandlerBase.setKeyDefinitionScopeSets the key type for the key definition.
Sets the key type for the key definition.
final
Parameters
- type: KeyType
- The type of the key element.
Defined in
OutputHandlerBase.setKeyDefinitionTypeBy default, no URI is set.
final
Parameters
- uri: string
- The URI of the key element.
Defined in
OutputHandlerBase.setKeyDefinitionUriWrites the contents of the key definition.
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.
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.
Defined in
OutputHandlerBase.writeValuePerforms the actual writing of the data using either the serializer or the serializeCore method.
Performs the actual writing of the data using either the serializer or the serializeCore method.
protected
Parameters
- context: IWriteContext
- The context to use for writing.
- data: TData
- The data to write.