ExternalInstanceParser class final

Turns a secondary instance's src into a TreeElement tree.

Instance providers are consulted first, then file parsers by format (CSV for file-csv URIs, GeoJSON for .geojson), and XML otherwise. Registered providers and parsers take precedence over earlier ones.

Constructors

ExternalInstanceParser()
Creates a parser with the default CSV and GeoJSON file parsers.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addFileInstanceParser(FileInstanceParser parser) → void
Adds parser before the existing file parsers.
addInstanceProvider(InstanceProvider provider) → void
Adds provider before the existing instance providers.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(ResourceResolver resolver, String instanceId, String instanceSrc, {bool partial = false}) → Future<TreeElement>
Loads the instance instanceId from instanceSrc.
parseWithReload(ResourceResolver resolver, String instanceId, String instanceSrc, {bool partial = false}) → Future<(TreeElement, TreeElement Function())>
Like parse, also returning a synchronous function that produces the complete instance (used to fill in partial elements, as JavaRosa's ExternalDataInstance.parseExternalFile(false) does). File instances are re-parsed from the bytes already read.
providerFor(String instanceId, String instanceSrc) → InstanceProvider?
The provider that supplies instanceId at instanceSrc, if any.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited