C

InputHandlerBase<TKey, TData>
abstract

An abstract base implementation of the IInputHandler interface.
ImplementsInheritance Hierarchy

Members

Show:

Constructors

Initializes a new instance of the InputHandlerBase<TKey, TData> class.
The precedence has an initial value of DEFAULT.
protected

Parameters

keyType: Constructor<TKey>
The type of the key, i.e. the items that are associated with the data in the GraphML.
dataType: Constructor<TData>
The type of the data that is associated with the keys.
Initializes a new instance of the InputHandlerBase<TKey, TData> class.
The precedence gets the initial value assigned to precedence
protected

Parameters

keyType: Constructor<TKey>
The type of the key, i.e. the items that are associated with the data in the GraphML.
dataType: Constructor<TData>
The type of the data that is associated with the keys.
precedence: ParsePrecedence
The precedence to assign to the precedence property.

Properties

Gets a value indicating whether a default value has been set, either through a key definition element or explicitly by assigning a value to the defaultValue property.
If this property is set to true, the applyDefault method will call the setValue method using the defaultValue as the value parameter.
readonlyfinal

Property Value

true if the default value exists; false otherwise.
Gets or sets the default value that will be applied to the keys where the data attribute is missing.
If any default value is set (including null), defaultExists is automatically set to true.
final

Property Value

The default value.
Gets or sets a value indicating whether the default value in the key definition should be parsed.
final

Property Value

true if the default value should be parsed; false otherwise. The default is true.
Gets or sets the parse precedence that is associated with this handler.
conversionfinal

Property Value

The parse precedence.

Methods

This method is invoked when no data tag is defined, and the default value should be applied.
This implementation delegates to setValue if a default exists using the defaultValue.

Parameters

context: IParseContext
the current parse context.
Initializes this instance from the GraphML key definition.
This implementation looks for the GraphML default element and delegates to parseDataCore if a default is found to store the defaultValue.

Parameters

context: IParseContext
The context.
definition: Element
The definition.
This method is invoked each time a data element with a matching key is processed.
This method delegates the actual parsing to parseDataCore and sets the value afterwards. If the current element is of the same type as this TKey, it is used as the key parameter in the setValue call. Otherwise, null is passed as the key so the data can be stored temporarily until the key element is created.

Parameters

context: IParseContext
The current parse context.
node: Node
The DOM node representing the data element.

See Also

API
CreationProperties
Abstract method callback that actually parses the data.
protectedabstract

Parameters

context: IParseContext
The context.
node: Node
The node that contains the data. This is either the GraphML 'data' element or the 'default' element.

Return Value

TData
The parsed data.

See Also

Developer's Guide
Abstract method callback that actually stores the value with the keys.
The key may be null e.g. when the model item is created and the data is parsed beforehand. In this case CreationProperties can be used to temporarily store the data until used by the IGraphElementFactory during the creation of the item.
protectedabstract

Parameters

context: IParseContext
The context.
key: TKey
The key.
data: TData
The data.

See Also

Developer's Guide