Interface that defines the context of a GraphML parsing context.
Implements
- I
Remarks
All state data that is needed for the parsing of a concrete input should go here, allowing all handlers and deserializers to be implemented stateless.
Members
Show:
Properties
Gets the currently active graph object.
Gets the currently active graph object.
readonlyabstract
Implemented in
ChildParseContext.graphGets the current nesting of created graphs and graph elements.
Gets the current nesting of created graphs and graph elements.
The list contains the user objects which correspond to the GraphML elements which are ancestors of the current node in the DOM tree.
readonlyabstract
Property Value
A read-only view on the current nesting
Implemented in
ChildParseContext.objectStackGets an implementation of IParseEvents that allows to subscribe to various events in the parse process.
Gets an implementation of IParseEvents that allows to subscribe to various events in the parse process.
readonlyabstract
Implemented in
ChildParseContext.parseEventsMethods
This method calls deserializeCore with
context as the first argument and should be used in virtually all cases.Parameters
- targetType: Constructor<T>
- The desired target type.
- targetNode: Node
- The XML node that should be deserialized.
Return Value
- T
- an instance of
Tornull.
Throws
- Exception ({ name: 'DeserializationNotSupportedError' })
See Also
Developer's Guide
API
- deserializeCore
Deserialize the object representation in targetNode
Deserialize the object representation in
targetNodeClient code should usually use the method deserialize instead to ensure the correct
context instance is used.abstract
Parameters
- targetType: Constructor<T>
- The expected return type.
- context: IParseContext
- The current parse context.
- targetNode: Node
- The XML node that should be deserialized.
Return Value
- T
- The deserialized object from
targetNodeor an DeserializationNotSupportedError iftargetNodecould not be deserialized.
See Also
API
- deserialize
Implemented in
ChildParseContext.deserializeCoreReturns 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.
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.abstract
Parameters
- itemType: Constructor<T>
- The desired target type.
Return Value
- T
- The most current element within the container hierarchy or
default(T).
See Also
Developer's Guide
Implemented in
ChildParseContext.getCurrentabstract
Parameters
- key: string
- The identifier for the property
Return Value
- any
- The property value, or
nullif no such property exists.
Implemented in
ChildParseContext.getDeserializationPropertyTypically, this method will be called to obtain a different view or aspect of the current instance. This is quite similar to casting or using a super type or interface of this instance, but is not limited to inheritance or compile-time constraints. An instance implementing this method is not required to return non-
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 re-obtained for further use.abstract
Parameters
- type: Constructor<T>
- the type for which an instance shall be returned
Return Value
- T
- an instance that is assignable to the type or
null
See Also
Developer's Guide