Packageflare.data.converters
Classpublic class GraphMLConverter
ImplementsIDataConverter

Converts data between GraphML markup and flare DataSet instances. GraphML is a standardized XML format supporting graph structure and typed data schemas for both nodes and edges.



Public Methods
 MethodDefined by
  
parse(graphml:XML, schema:DataSchema = null):DataSet
Parses a GraphML XML object into a DataSet instance.
GraphMLConverter
  
read(input:IDataInput, schema:DataSchema = null):DataSet
Converts data from an external format into ActionScript objects.
GraphMLConverter
  
write(data:DataSet, output:IDataOutput = null):IDataOutput
Converts data from ActionScript objects into an external format.
GraphMLConverter
Method detail
parse()method
public function parse(graphml:XML, schema:DataSchema = null):DataSet

Parses a GraphML XML object into a DataSet instance.

Parameters
graphml:XML — the XML object containing GraphML markup
 
schema:DataSchema (default = null) — a DataSchema (typically null, as GraphML contains schema information)

Returns
DataSet — the parsed DataSet instance
read()method 
public function read(input:IDataInput, schema:DataSchema = null):DataSet

Converts data from an external format into ActionScript objects.

Parameters
input:IDataInput — the loaded input data
 
schema:DataSchema (default = null) — a data schema describing the structure of the data. Schemas are optional in many but not all cases.

Returns
DataSet — a DataSet instance containing converted data objects.
write()method 
public function write(data:DataSet, output:IDataOutput = null):IDataOutput

Converts data from ActionScript objects into an external format.

Parameters
data:DataSet — the data set to write.
 
output:IDataOutput (default = null) — an object to which to write the output. If this value is null, a new ByteArray will be created.

Returns
IDataOutput — the converted data. If the output parameter is non-null, it is returned. Otherwise the return value will be a newly created ByteArray