An abstract base implementation of the IInputHandler interface.
Type Parameters
- TKey
- The type of the key, i.e. the items that are associated with the data in the GraphML.
- TData
- The type of the data that is associated with the keys.
Type Details
- yfiles module
- view-graphml
- yfiles-umd modules
- view-graphml, view
- Legacy UMD name
- yfiles.graphml.InputHandlerBase
See Also
Constructors
Initializes a new instance of the InputHandlerBase<TKey,TData> class.
Remarks
Parameters
A map of options to pass to the method.
Initializes a new instance of the InputHandlerBase<TKey,TData> class.
Remarks
precedence
Parameters
A map of options to pass to the method.
- keyType - Class
- The type of the key, i.e. the items that are associated with the data in the GraphML.
- dataType - Class
- 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.
Remarks
true
, the applyDefault method will call the setValue method using the defaultValue as the value parameter.Gets or sets the default value that will be applied to the keys where the data attribute is missing.
Remarks
null
), defaultExists is automatically set to true.Gets or sets the parse precedence that is associated with this handler.
Implements
Methods
This method is invoked when no data tag is defined, and the default value should be applied.
Remarks
Parameters
A map of options to pass to the method.
- context - IParseContext
- the current parse context.
Implements
Initializes this instance from the GraphML key definition.
Remarks
Parameters
A map of options to pass to the method.
- context - IParseContext
- The context.
- definition - Element
- The definition.
This method is invoked each time a data element with matching key is processed.
Remarks
TKey
, it is used as key parameter in the setValue call. Otherwise null
is passed as key so the data can be stored temporarily until the key element was created.Parameters
A map of options to pass to the method.
- context - IParseContext
- the current parse context.
- node - Node
- the DOM node representing the data element.
See Also
Implements
Abstract method callback that actually parses the data.
Parameters
A map of options to pass to the method.
- context - IParseContext
- The context.
- node - Node
- The node that contains the data. This is either the GraphML 'data' element or the 'default' element.
Returns
- ↪TData
- The parsed data.
See Also
Abstract method callback that actually stores the value with the keys.
Remarks
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.Parameters
A map of options to pass to the method.
- context - IParseContext
- The context.
- key - TKey
- The key.
- data - TData
- The data.