An implementation of IParseContext that delegates most calls to a parentContext, but adds the capability to locally add lookup results and deserialization properties
Remarks
Type Details
- yfiles module
- view-graphml
- yfiles-umd modules
- view-graphml, view
- Legacy UMD name
- yfiles.graphml.ChildParseContext
See Also
Constructors
Initializes a new instance of the ChildParseContext class that delegates to the provided context and adds the currentObject
to the objectStack.
Parameters
A map of options to pass to the method.
- parentContext - IParseContext
- The parent context.
- currentObject - Object
- The current object to add to the objectStack and return in getCurrent.
Initializes a new instance of the ChildParseContext class that delegates to the provided context.
Parameters
A map of options to pass to the method.
- parentContext - IParseContext
- The parent context.
Properties
Gets the currently active graph object
Implements
Gets the current nesting of created graphs and graph elements.
Remarks
Implements
Gets the parent context.
Gets an implementation of IParseEvents that allows to subscribe to various events in the parse process.
Implements
Methods
Deserialize the object representation in targetNode
.
Remarks
context
as first argument and should be used in virtually all cases.Type Parameters
- T
- The desired target type.
Parameters
A map of options to pass to the method.
- targetType - Class
- The desired target type.
- targetNode - Node
- The XML node that should be deserialized.
Returns
- ↪T
- an instance of
T
ornull
.
Throws
- Exception({ name: 'DeserializationNotSupportedError' })
See Also
Defined in
Deserialize the object representation in targetNode
Remarks
context
instance is used.Type Parameters
- T
Parameters
A map of options to pass to the method.
- targetType - Class
- The expected return type.
- context - IParseContext
- The current parse context.
- targetNode - Node
- The XML node that should be deserialized.
Returns
- ↪T
- The deserialized object from
targetNode
or an DeserializationNotSupportedError iftargetNode
could not be deserialized.
See Also
Implements
Returns the most current (the last element) within the container hierarchy as it is returned by objectStack or default(T)
if the most current element is not of the desired target type.
Type Parameters
- T
Parameters
A map of options to pass to the method.
- itemType - Class
- The desired target type.
Returns
- ↪T
- the most current element within the container hierarchy or
default(T)
.
See Also
Implements
Get a property value that specifies information about how to handle specific cases.
Parameters
A map of options to pass to the method.
- key - string
- The identifier for the property
Returns
- ↪any
- The property value, or
null
if no such property exists.
Implements
Returns an instance that implements the given type or null
.
Remarks
null
implementations for the types, nor does it have to return the same instance any time. Also it depends on the type and context whether the instance returned stays up to date or needs to be reobtained for subsequent use.Type Parameters
- T: any
Parameters
A map of options to pass to the method.
- type - Class<T>
- The type for which an instance shall be returned.
Returns
- ↪T
- an instance that is assignable to type or
null
See Also
Implements
Removes a previously locally set deserialization property.
Parameters
A map of options to pass to the method.
- key - string
- The key for which the local property override should be removed.
Adds another lookup result to the local lookup override.
Type Parameters
- T
- The type to use as a key for the lookup.
Parameters
A map of options to pass to the method.
- tType - Class
- The type to use as a key for the lookup.
- value - T
- The value to provide for queries to
T
.