Packageflare.data
Classpublic class DataSchema

A data schema represents a set of data variables and their associated types. A schema maintains a collection of DataField objects.

See also

flare.data.DataField


Public Properties
 PropertyDefined by
  dataRoot : String = "null"
DataSchema
  fields : Array
[read-only] An array containing the data fields in this schema.
DataSchema
  hasHeader : Boolean = false
DataSchema
  numFields : int
[read-only] The number of data fields in this schema.
DataSchema
Public Methods
 MethodDefined by
  
DataSchema(... fields)
Creates a new DataSchema.
DataSchema
  
addField(field:DataField):void
Adds a field to this schema.
DataSchema
  
Retrieves a data field by its index in this schema.
DataSchema
  
getFieldById(id:String):DataField
Retrieves a data field by id.
DataSchema
  
getFieldByName(name:String):DataField
Retrieves a data field by name.
DataSchema
Property detail
dataRootproperty
public var dataRoot:String = "null"
fieldsproperty 
fields:Array  [read-only]

An array containing the data fields in this schema.

Implementation
    public function get fields():Array
hasHeaderproperty 
public var hasHeader:Boolean = false
numFieldsproperty 
numFields:int  [read-only]

The number of data fields in this schema.

Implementation
    public function get numFields():int
Constructor detail
DataSchema()constructor
public function DataSchema(... fields)

Creates a new DataSchema.

Parameters
... fields — an ordered list of data fields to include in the schema
Method detail
addField()method
public function addField(field:DataField):void

Adds a field to this schema.

Parameters
field:DataField — the data field to add
getFieldAt()method 
public function getFieldAt(idx:int):DataField

Retrieves a data field by its index in this schema.

Parameters
idx:int — the index of the data field in this schema

Returns
DataField — the corresponding data field
getFieldById()method 
public function getFieldById(id:String):DataField

Retrieves a data field by id.

Parameters
id:String — the data field id

Returns
DataField — the corresponding data field, or null if no data field is found matching the id
getFieldByName()method 
public function getFieldByName(name:String):DataField

Retrieves a data field by name.

Parameters
name:String — the data field name

Returns
DataField — the corresponding data field, or null if no data field is found matching the name