Packageimpression.persistence.properties
Classpublic class LocationData
InheritanceLocationData Inheritance Object

The LocationData object stores information about a location within a lesson. Locations are either a single storyboard or a range of storyboards. Locations are specified as relative to either the current map, the default map, or a specific (named) map. Locations can contain references to specific (absolute) storyboards or can be relative to the current storyboard.



Public Properties
 PropertyDefined By
  endPoint : String
[read-only] The ending point of a range of storyboards.
LocationData
  isEmpty : Boolean
[read-only] Indicates whether or not the object contains a valid point or range.
LocationData
  isRange : Boolean
[read-only] Indicates whether or not the object identifies a range of storyboards.
LocationData
  isRelativeLocation : Boolean
[read-only] Indicates whether or not the object has at least one relative location.
LocationData
  jumpPoint : String
[read-only] The single point value, which is an alias for the start point value.
LocationData
  mapName : String
[read-only] The name of the map referenced by the object.
LocationData
  startPoint : String
[read-only] The starting point of a range of storyboards or the single point in cases where only a single point defined.
LocationData
  useCurrentMap : Boolean
[read-only] Indicates whether or not the map referenced by the object is the current map.
LocationData
  useDefaultMap : Boolean
[read-only] Indicates whether or not the map referenced by the object is the default map.
LocationData
Public Methods
 MethodDefined By
  
LocationData(startPoint:String = null, endPoint:String = null, map:String = null)
Creates a new instance of the LocationData class.
LocationData
  
Returns a copy of the object.
LocationData
  
fromObject(source:Object):LocationData
[static] Returns a new instance of the LocationData class based on the data contained in the object.
LocationData
  
fromXML(source:XML):LocationData
[static] Returns a new instance of the LocationData class based on the data contained in the XML object.
LocationData
  
resolveLocation(map:LessonMap, currentSBID:String):LocationData
Returns a new LocationData object where any relative locations in the current object have been replaced with sbid values from the passed map.
LocationData
  
toObject():Object
Returns an Object containing the property values as dynamic properties.
LocationData
  
toString():String
Returns a String containing all of the properties of the object.
LocationData
Property Detail
endPointproperty
endPoint:String  [read-only]

The ending point of a range of storyboards. This property is the same as startPoint if only a single point is defined.


Implementation
    public function get endPoint():String
isEmptyproperty 
isEmpty:Boolean  [read-only]

Indicates whether or not the object contains a valid point or range.


Implementation
    public function get isEmpty():Boolean
isRangeproperty 
isRange:Boolean  [read-only]

Indicates whether or not the object identifies a range of storyboards. A LocationData object is considered a range if both startPoint and endPoint are non-null and the string values of startPoint and endPoint are not equal.

If one or both points are relative values, it is possible that they both resolve to the same storyboard. In this case, isRange will erroneously return true.


Implementation
    public function get isRange():Boolean
isRelativeLocationproperty 
isRelativeLocation:Boolean  [read-only]

Indicates whether or not the object has at least one relative location.


Implementation
    public function get isRelativeLocation():Boolean
jumpPointproperty 
jumpPoint:String  [read-only]

The single point value, which is an alias for the start point value. This property is provided for use in cases where only a single point is desired.


Implementation
    public function get jumpPoint():String
mapNameproperty 
mapName:String  [read-only]

The name of the map referenced by the object. If this property value is null or the empty string (""), the current map (as defined by the project) should be used. If this property value is "_default", the default map should be used.


Implementation
    public function get mapName():String
startPointproperty 
startPoint:String  [read-only]

The starting point of a range of storyboards or the single point in cases where only a single point defined.


Implementation
    public function get startPoint():String
useCurrentMapproperty 
useCurrentMap:Boolean  [read-only]

Indicates whether or not the map referenced by the object is the current map.


Implementation
    public function get useCurrentMap():Boolean
useDefaultMapproperty 
useDefaultMap:Boolean  [read-only]

Indicates whether or not the map referenced by the object is the default map.


Implementation
    public function get useDefaultMap():Boolean
Constructor Detail
LocationData()Constructor
public function LocationData(startPoint:String = null, endPoint:String = null, map:String = null)

Creates a new instance of the LocationData class.

If startPoint is null then startPoint is set to the endPoint and the endPoint is set to null. If startPoint is equal to endPoint then they are resolved into a single point.

Parameters
startPoint:String (default = null) — The starting point of a range of storyboards, or the single point in cases with only a single point defined.
 
endPoint:String (default = null) — The ending point of a range of storyboards.
 
map:String (default = null) — The name of the map associated with the storyboard point or range.
Method Detail
clone()method
public function clone():LocationData

Returns a copy of the object.

Returns
LocationData — A copy of the object.
fromObject()method 
public static function fromObject(source:Object):LocationData

Returns a new instance of the LocationData class based on the data contained in the object.

If source is null than an empty LocationData object is returned.

Parameters

source:Object — The object containing the data to use. The object should contain three dynamic properties, from, to and map.

Returns
LocationData — A new instance of the LocationData class containing the data from the source Object.
fromXML()method 
public static function fromXML(source:XML):LocationData

Returns a new instance of the LocationData class based on the data contained in the XML object.

If source is null then an empty LocationData object is returned. The XML format of a LocationData object is:

If any attribute is missing, null is used.

Parameters

source:XML — The object containing the data to use.

Returns
LocationData — A LocationData object containing the data from the source XML object.
resolveLocation()method 
public function resolveLocation(map:LessonMap, currentSBID:String):LocationData

Returns a new LocationData object where any relative locations in the current object have been replaced with sbid values from the passed map.

Parameters

map:LessonMap — The object to use to determine sbid values from relative locations. If map is null, null is returned.
 
currentSBID:String — The sbid value of the current storyboard.

Returns
LocationData — A LocationData object containing sbid values based on the current object's relative locations and the parameters passed.

See also

LessonMap.resolveLocation()
toObject()method 
public function toObject():Object

Returns an Object containing the property values as dynamic properties. The dynamic properties are from, to, and map.

Returns
Object — An Object containing the property values as dynamic properties.
toString()method 
public function toString():String

Returns a String containing all of the properties of the object.

Returns
String — A String containing all of the properties of the object.