Package | impression.persistence |
Class | public class LessonMap |
Inheritance | LessonMap ![]() |
sbid
property of a storyboard). The object's properties and methods
work directly with this fragment.
Property | Defined By | ||
---|---|---|---|
length : Number [read-only]
The number of items in the object. | LessonMap | ||
mapRoot : XML [read-only]
The root XML object. | LessonMap | ||
name : String
The name of the map. | LessonMap |
Method | Defined By | ||
---|---|---|---|
LessonMap(name:String = null)
Creates a new instance of the LessonMap class. | LessonMap | ||
absolutePositionOf(item:*):Number
Returns the absolute position of an item. | LessonMap | ||
append(item:*):void
Appends an item to the map. | LessonMap | ||
appendChild(parent:*, child:*):void
Adds an item as the child of another item in the map. | LessonMap | ||
Returns a copy of the object. | LessonMap | ||
contains(item:*):Boolean
Returns a value indicating whether or not an item exists in the object. | LessonMap | ||
firstChildOf(item:*, storyboards:StoryboardCollection = null):*
Returns the first child of an item. | LessonMap | ||
firstSBID():String
Returns a String specifying the sbid of the first storyboard in the map. | LessonMap | ||
firstSiblingOf(item:*, storyboards:StoryboardCollection = null):*
Returns the first sibling of an item. | LessonMap | ||
Returns the first storyboard in the map. | LessonMap | ||
fromStoryboardArray(sbArray:Array, mapName:String = null):LessonMap [static]
Creates a new instance of the LessonMap class containing the storyboards from an array. | LessonMap | ||
[static]
Returns a new instance of the LessonMap class based on the data contained in the XML object. | LessonMap | ||
fromXMLString(source:String):LessonMap [static]
Returns a new instance of the LessonMap class based on the XML-formatted string. | LessonMap | ||
Returns a copy of the map without hierarchical data. | LessonMap | ||
Returns the aggregate status of a location. | LessonMap | ||
Returns a LessonMap object based on the collection. | LessonMap | ||
Returns a LessonMap object based on the location. | LessonMap | ||
getMapOfAncestors(current:*):LessonMap
Returns a LessonMap object containing the ancestors of an item. | LessonMap | ||
getMapOfChildren(parent:*, deep:Boolean = true):LessonMap
Returns a LessonMap object containing the children of an item. | LessonMap | ||
getMapOfDescendants(parent:*):LessonMap
Returns a LessonMap object containing the descendants of an item. | LessonMap | ||
insertAfter(current:*, item:*):void
Inserts an item after another item in the map. | LessonMap | ||
insertBefore(current:*, item:*):void
Inserts an item before another item in the map. | LessonMap | ||
isAncestorOf(item:*, relative:*):Boolean
Returns a value indicating whether or not relative is an ancestor of item. | LessonMap | ||
isChildOf(item:*, relative:*):Boolean
Returns a value indicating whether or not item is a child of relative. | LessonMap | ||
isDescendantOf(item:*, relative:*):Boolean
Returns a value indicating whether or not relative is a descendant of item. | LessonMap | ||
isSiblingOf(item:*, relative:*):Boolean
Returns a value indicating if the item is a sibling of relative. | LessonMap | ||
lastChildOf(item:*, storyboards:StoryboardCollection = null):*
Returns the last child of an item. | LessonMap | ||
lastDescendantOf(item:*, storyboards:StoryboardCollection = null):*
Returns the last descendant of an item. | LessonMap | ||
lastSBID():String
Returns a String specifying the sbid of the last storyboard in the map. | LessonMap | ||
lastSiblingOf(item:*, storyboards:StoryboardCollection = null):*
Returns the last sibling of an item. | LessonMap | ||
Returns the last storyboard in the map. | LessonMap | ||
nextLinearOf(item:*, storyboards:StoryboardCollection = null):*
Returns the next linear value of an item. | LessonMap | ||
nextSiblingOf(item:*, storyboards:StoryboardCollection = null):*
Returns the next sibling of an item. | LessonMap | ||
parentOf(item:*, storyboards:StoryboardCollection = null):*
Returns the parent of an item. | LessonMap | ||
prependChild(parent:*, child:*):void
Adds an item as the first child of another item in the map. | LessonMap | ||
previousLinearOf(item:*, storyboards:StoryboardCollection = null):*
Returns the previuos linear value of an item. | LessonMap | ||
previousSiblingOf(item:*, storyboards:StoryboardCollection = null):*
Returns the previous sibling of an item. | LessonMap | ||
relativeCountOf(item:*):Number
Returns the number of siblings of an item. | LessonMap | ||
relativeOf(item:*, relativeLocation:String, storyboards:StoryboardCollection = null):*
Returns the relative of an item. | LessonMap | ||
relativePathOf(item:*):String
Returns a dot-seperated list of relative positions for an item. | LessonMap | ||
relativePositionOf(item:*):Number
Returns the relative position of an item. | LessonMap | ||
relativeXMLOf(source:XML, relativeLocation:String):XML
Returns an XML object for the specified relation of the passed in source XML object. | LessonMap | ||
remove(item:*, deep:Boolean = false):void
Removes an item from the map. | LessonMap | ||
Returns a resolved version of a LocationData object. | LessonMap | ||
sbidOf(source:XML):String
Returns the sbid of an item. | LessonMap | ||
toArray():Array
Returns an array of sbid references in the map. | LessonMap | ||
toObject():Object
Returns an object containing the sbid references as dynamic properties. | LessonMap | ||
topAncestorOf(item:*, storyboards:StoryboardCollection = null):*
Returns the top ancestor of an item. | LessonMap | ||
toStoryboardArray(storyboards:StoryboardCollection):Array
Returns an array containing the storyboards in the map. | LessonMap | ||
Returns a StoryboardCollection object containing the storyboards in the map. | LessonMap | ||
toString():String
Returns the string representation of the specified object. | LessonMap | ||
toXML():XML
Returns an Impression-format XML object containing all the data from the object. | LessonMap | ||
xmlOf(item:*):XML
Returns an XML object for an item. | LessonMap |
length | property |
length:Number
[read-only] The number of items in the object.
public function get length():Number
mapRoot | property |
mapRoot:XML
[read-only] The root XML object.
public function get mapRoot():XML
name | property |
name:String
The name of the map.
The name
property value is stored as the name
attribute of the root <map> XML object.
The default value is New Map
.
public function get name():String
public function set name(value:String):void
LessonMap | () | Constructor |
public function LessonMap(name:String = null)
Creates a new instance of the LessonMap class.
If name
is null
, the default value is used.
name:String (default = null ) — A String specifying the name of the map.
|
absolutePositionOf | () | method |
public function absolutePositionOf(item:*):Number
Returns the absolute position of an item.
The absolute position of an item ignores hierarchy and works from the "top" down. If
item
exists more than once in the map, this method returns only the value associated with the first
occurrence. If item
is not found in the object, -1 is returned.
Note that the absolute position is 1-based, not 0-based.
Parameters
item:* — Expression identifying the item to find the position of. item can be one of
the following types:
|
Number — The absolute position of item .
|
See also
append | () | method |
public function append(item:*):void
Appends an item to the map.
If any part of item
is already present in the map, it is removed from the map before being appended.
Note that this method appends the item as the last top-level sibling, not the next sibling of the last storyboard.
Parameters
item:* — An expression specifying the item to add to the map. item can be one of the following types:
|
ArgumentError append() — cannot process passed item type (ArgumentError).
|
appendChild | () | method |
public function appendChild(parent:*, child:*):void
Adds an item as the child of another item in the map.
If any part of item
is already present in the map, it is removed from the map before being added. If
current
is null
, or is not referenced in the map, item
is appended to the map.
If current
has children, item
is appended as the last child of current
.
Parameters
parent:* — An expression designating the item to add as a child to. current can be one of the following types:
| |
child:* — An expression specifying the item to add to the map. item can be one of the following types:
|
ArgumentError appendChild() — cannot process passed item type (ArgumentError).
|
See also
clone | () | method |
public function clone():LessonMap
Returns a copy of the object.
ReturnsLessonMap — A copy of the object.
|
contains | () | method |
public function contains(item:*):Boolean
Returns a value indicating whether or not an item exists in the object.
Parameters
item:* — Expression identifying the item to find. item can be one of the following types:
|
Boolean — true if the element was found in the object and false otherwise.
|
See also
firstChildOf | () | method |
public function firstChildOf(item:*, storyboards:StoryboardCollection = null):*
Returns the first child of an item.
Parameters
item:* — Expression identifying the storyboard to return the first child of. item can be one of the following types:
| |
storyboards:StoryboardCollection (default = null ) — An optional collection of storyboards. If this value is null , or the type of the item parameter is
a String, the return value will be the sbid of the relative. If this value is non-null and the type of the item
parameter is not a String, the storyboard whose sbid value matches the relative will be returned if it exists in the collection, otherwise,
null will be returned, even if the relative sbid is non-null .
|
* — A value representing the first child of item .
|
See also
firstSBID | () | method |
public function firstSBID():String
Returns a String specifying the sbid of the first storyboard in the map.
ReturnsString — A String specifying the sbid of the first storyboard in the map.
|
See also
firstSiblingOf | () | method |
public function firstSiblingOf(item:*, storyboards:StoryboardCollection = null):*
Returns the first sibling of an item.
Parameters
item:* — Expression identifying the storyboard to return the first sibling of. item can be one of the following types:
| |
storyboards:StoryboardCollection (default = null ) — An optional collection of storyboards. If this value is null , or the type of the item parameter is
a String, the return value will be the sbid of the relative. If this value is non-null and the type of the item
parameter is not a String, the storyboard whose sbid value matches the relative will be returned if it exists in the collection, otherwise,
null will be returned, even if the relative sbid is non-null .
|
* — The first sibling of item .
|
See also
firstStoryboard | () | method |
public function firstStoryboard(storyboards:StoryboardCollection):Storyboard
Returns the first storyboard in the map.
Parameters
storyboards:StoryboardCollection — collection of storyboards from which to select the return value.
|
Storyboard — A Storyboard representing the first storyboard in the map.
|
See also
fromStoryboardArray | () | method |
public static function fromStoryboardArray(sbArray:Array, mapName:String = null):LessonMap
Creates a new instance of the LessonMap class containing the storyboards from an array.
The created map will order the storyboards based on their index in the array, and will be a linear map.
If sbArray
is null
, an empty LessonMap object is returned with " (null)" added to the
name
property. If mapName
is null
, "map of array" will be used for the
name
property.
Parameters
sbArray:Array — The array containing the storyboards to use.
| |
mapName:String (default = null ) — The name property of the return value.
|
LessonMap — A LessonMap object containing a linear list of the storyboards in sbArray .
|
fromXML | () | method |
public static function fromXML(source:XML):LessonMap
Returns a new instance of the LessonMap class based on the data contained in the XML object.
If source
is null
, an empty LessonMap object is returned. If the source.name
property is not "map", an error is thrown.
The XML format of a LessonMap object is:
Where [sbid]
is a storyboard unique identifier. Any valid hierarchical relationship between items is supported.
Strictly speaking, nodes do not have to have a node name of item
; the LessonMap object uses a node's
sbid
attribute exclusively when traversing the map XML.
Internally, this method converts the source
XML parameter into a String (using the XML object's
toXMLString
method, then passes invokes the fromXMLString
class constructor with the generated
string. This is done to prevent issues with embedded whitespace, comments, or processing instructions.
Parameters
source:XML — The object containing the data to use.
|
LessonMap — A LessonMap object containing the data from the source XML object.
|
ArgumentError node — is not a <map> element (ArgumentError).
|
See also
fromXMLString | () | method |
public static function fromXMLString(source:String):LessonMap
Returns a new instance of the LessonMap class based on the XML-formatted string.
This method creates an XML object from the source
. If the XML objects name
property is not "map" or
a problem occurs while creating the XML object, an error is thrown.
If source
is null
or the empty string (""), an empty LessonMap object is returned.
This method sets the XML object's ignoreComments
, ignoreProcessingInstructions
, and ignoreWhitespace
static variables to true
during execution; and returns the variables to their original state when the method returns.
Parameters
source:String — The object containing the data to use.
|
LessonMap — A LessonMap object containing the data from the source XML object.
|
ArgumentError — root node is not a <map> element (ArgumentError).
| |
ArgumentError — Unable to parse map XML (ArgumentError).
|
getLinearMap | () | method |
public function getLinearMap():LessonMap
Returns a copy of the map without hierarchical data.
ReturnsLessonMap — A copy of the map without hierarchical data.
|
getLocationStatus | () | method |
public function getLocationStatus(location:LocationData, current:*, storyboards:StoryboardCollection):String
Returns the aggregate status of a location.
This method returns a LocationStatusTypes
value based on the values of the
storyboards that fall into the range specified by location
in the map.
The method resolves location
and uses the resolved object to build a collection of
storyboards that fall between (and include) the startPoint
and endPoint
of
the location. Each storyboard, if available, is examined to determine the return value.
If all storyboards have a complete
Boolean persisted property value of true
, this
method returns LocationStatusTypes.COMPLETE
. Otherwise, if any storyboard has an initialized
Boolean persisted property value of true
, this method returns LocationStatusTypes.INITIALIZED
.
Otherwise, if there is at least one storyboard in the resolved collection, this method returns
LocationStatusTypes.DEFAULT
. Otherwise, if there are no storyboards in the resolved collection, this
method returns LocationStatusTypes.NOT_AVAILABLE
.
If either the location
parameter or the storyboards
parameter is null
, this
method returns LocationStatusTypes.UNKNOWN
.
Note that this routine ignores the map
property of the passed location.
Parameters
location:LocationData — The location to return the aggregate status of.
| |
current:* — An expression identifying the current location to use when looking up relative locations. current can be one of the following types:
| |
storyboards:StoryboardCollection — The storyboards to use to determine the return value.
|
String — A LocationStatusTypes value identifying the aggregate status of the storyboards.
|
See also
getMapFromCollection | () | method |
public function getMapFromCollection(storyboards:StoryboardCollection, appendMissing:Boolean = false):LessonMap
Returns a LessonMap object based on the collection.
This method iterates through the nodes of the map, examining each node to see if the sbid
value it contains
is also contained in the collection. If it is, the node is added to the new map. The returned map attempts to preserve as
much of the heirarchical structure as possible.
If the appendMissing
parameter value is true
, any storyboards in the collection but not referenced
in the current map are appended to the end of the map in no defined order. If the parameter value is false
, any
unreferenced storyboards in the collection are ignored.
If storyboards
is null
, an empty map is returned.
Parameters
storyboards:StoryboardCollection — The storyboards to build the map from.
| |
appendMissing:Boolean (default = false ) — Indicates how to process unreferenced storyboards in the collection.
|
LessonMap — A LessonMap object containing the subset of this map that includes storyboards contained in the collection.
|
getMapFromLocation | () | method |
public function getMapFromLocation(location:LocationData, current:* = null):LessonMap
Returns a LessonMap object based on the location.
This method resolves the location
parameter, then returns a subset of the map
from (and including) the resolved location's startPoint
and endPoint
values. The returned map attempts to preserve as much of the hierarchical structure as possible.
If location
is null
, an empty map is returned.
Note that this routine ignores the map
property of the passed location.
Parameters
location:LocationData — The location to build a map of.
| |
current:* (default = null ) — An expression identifying the current location to use when looking up relative locations. current can be one of the following types:
|
LessonMap — A LessonMap object containing the subset of this map that falls within the location.
|
See also
getMapOfAncestors | () | method |
public function getMapOfAncestors(current:*):LessonMap
Returns a LessonMap object containing the ancestors of an item.
Note that the return value has no hierarchical structure. The first item is the direct parent, and each successive item
is the previous item's parent. If current
is null
, or is not referenced in the map, an empty
map is returned.
Parameters
current:* — An expression designating the item to return the ancestors of. current can be one of the following types:
|
LessonMap — A LessonMap object containing the ancestors of current .
|
See also
getMapOfChildren | () | method |
public function getMapOfChildren(parent:*, deep:Boolean = true):LessonMap
Returns a LessonMap object containing the children of an item.
If deep
is false
, only direct children of parent
will be added to the
returned LessonMap object. If deep
is true
, all descendants will be added to the returned
object. In this case, invoking this method is the same as invoking getMapOfDescendants()
.
The map returned preserves the original hierarchical structure. If parent
is null
, or is not
referenced in the map, an empty map is returned.
Parameters
parent:* — An expression designating the item to return the ancestors of. parent can be one of the following types:
| |
deep:Boolean (default = true ) — Specifies how descendants should be handled.
|
LessonMap — A LessonMap object containing the children of parent .
|
See also
getMapOfDescendants | () | method |
public function getMapOfDescendants(parent:*):LessonMap
Returns a LessonMap object containing the descendants of an item.
The map returned preserves the original hierarchical structure. If parent
is null
, or is not
referenced in the map, an empty map is returned.
Parameters
parent:* — An expression designating the item to return the ancestors of. parent can be one of the following types:
|
LessonMap — A LessonMap object containing the descendants of parent .
|
See also
insertAfter | () | method |
public function insertAfter(current:*, item:*):void
Inserts an item after another item in the map.
If any part of item
is already present in the map, it is removed from the map before being added. If
current
is null
, or is not referenced in the map, item
is appended to the map.
Parameters
current:* — An expression designating the item to insert after. current can be one of the following types:
| |
item:* — An expression specifying the item to add to the map. item can be one of the following types:
|
ArgumentError insertAfter() — cannot process passed item type (ArgumentError).
|
See also
insertBefore | () | method |
public function insertBefore(current:*, item:*):void
Inserts an item before another item in the map.
If any part of item
is already present in the map, it is removed from the map before being added. If
current
is null
, or is not referenced in the map, item
is appended to the map.
Parameters
current:* — An expression designating the item to insert before. current can be one of the following types:
| |
item:* — An expression specifying the item to add to the map. item can be one of the following types:
|
ArgumentError insertBefore() — cannot process passed item type (ArgumentError).
|
See also
isAncestorOf | () | method |
public function isAncestorOf(item:*, relative:*):Boolean
Returns a value indicating whether or not relative
is an ancestor of item
.
If item
or relative
is null
, false
is returned.
Parameters
item:* — An expression specifying the item to check the ancestry of. item can be one of the following types:
| |
relative:* — An expression specifying the possible ancestor of item . relative can be any of the supported types of item .
|
Boolean — true if the relative is an ancestor of item and false otherwise.
|
See also
isChildOf | () | method |
public function isChildOf(item:*, relative:*):Boolean
Returns a value indicating whether or not item
is a child of relative
.
If item
or relative
is null
, false
is returned.
Parameters
item:* — An expression specifying the item to check the parentage of. item can be one of the following types:
| |
relative:* — An expression specifying the possible parent of item . relative can be any of the supported types of item .
|
Boolean — true if the item is a child of relative and false otherwise.
|
See also
isDescendantOf | () | method |
public function isDescendantOf(item:*, relative:*):Boolean
Returns a value indicating whether or not relative
is a descendant of item
.
If item
or relative
is null
, false
is returned.
Parameters
item:* — An expression specifying the item to check the descendancy of. item can be one of the following types:
| |
relative:* — An expression specifying the possible descendant of item . relative can be any of the supported types of item .
|
Boolean — true if the relative is a descendant of item and false otherwise.
|
See also
isSiblingOf | () | method |
public function isSiblingOf(item:*, relative:*):Boolean
Returns a value indicating if the item
is a sibling of relative
.
Parameters
item:* — An expression specifying the item to check. item can be one of the following types:
| |
relative:* — An expression specifying the possible sibling of item . relative can be any of the supported types of item .
|
Boolean — true if the item is a sibling of relative and false otherwise.
|
lastChildOf | () | method |
public function lastChildOf(item:*, storyboards:StoryboardCollection = null):*
Returns the last child of an item.
Parameters
item:* — Expression identifying the storyboard to return the last child of. item can be one of the following types:
| |
storyboards:StoryboardCollection (default = null ) — An optional collection of storyboards. If this value is null , or the type of the item parameter is
a String, the return value will be the sbid of the relative. If this value is non-null and the type of the item
parameter is not a String, the storyboard whose sbid value matches the relative will be returned if it exists in the collection, otherwise,
null will be returned, even if the relative sbid is non-null .
|
* — A value representing the last child of item .
|
See also
lastDescendantOf | () | method |
public function lastDescendantOf(item:*, storyboards:StoryboardCollection = null):*
Returns the last descendant of an item.
Parameters
item:* — Expression identifying the storyboard to return the last descendant of. item can be one of the following types:
| |
storyboards:StoryboardCollection (default = null ) — An optional collection of storyboards. If this value is null , or the type of the item parameter is
a String, the return value will be the sbid of the relative. If this value is non-null and the type of the item
parameter is not a String, the storyboard whose sbid value matches the relative will be returned if it exists in the collection, otherwise,
null will be returned, even if the relative sbid is non-null .
|
* — A value representing the last descendant of item .
|
See also
lastSBID | () | method |
public function lastSBID():String
Returns a String specifying the sbid of the last storyboard in the map.
ReturnsString — A String specifying the sbid of the last storyboard in the map.
|
See also
lastSiblingOf | () | method |
public function lastSiblingOf(item:*, storyboards:StoryboardCollection = null):*
Returns the last sibling of an item.
Parameters
item:* — Expression identifying the storyboard to return the last sibling of. item can be one of the following types:
| |
storyboards:StoryboardCollection (default = null ) — An optional collection of storyboards. If this value is null , or the type of the item parameter is
a String, the return value will be the sbid of the relative. If this value is non-null and the type of the item
parameter is not a String, the storyboard whose sbid value matches the relative will be returned if it exists in the collection, otherwise,
null will be returned, even if the relative sbid is non-null .
|
* — A value representing the last sibling of item .
|
See also
lastStoryboard | () | method |
public function lastStoryboard(storyboards:StoryboardCollection):Storyboard
Returns the last storyboard in the map.
Parameters
storyboards:StoryboardCollection — collection of storyboards from which to select the return value.
|
Storyboard — A Storyboard representing the first storyboard in the map.
|
See also
nextLinearOf | () | method |
public function nextLinearOf(item:*, storyboards:StoryboardCollection = null):*
Returns the next linear value of an item.
Parameters
item:* — Expression identifying the storyboard to return the next linear value of. item can be one of the following types:
| |
storyboards:StoryboardCollection (default = null ) — An optional collection of storyboards. If this value is null , or the type of the item parameter is
a String, the return value will be the sbid of the relative. If this value is non-null and the type of the item
parameter is not a String, the storyboard whose sbid value matches the relative will be returned if it exists in the collection, otherwise,
null will be returned, even if the relative sbid is non-null .
|
* — A value representing the next linear value of item .
|
See also
nextSiblingOf | () | method |
public function nextSiblingOf(item:*, storyboards:StoryboardCollection = null):*
Returns the next sibling of an item.
Parameters
item:* — Expression identifying the storyboard to return the next sibling of. item can be one of the following types:
| |
storyboards:StoryboardCollection (default = null ) — An optional collection of storyboards. If this value is null , or the type of the item parameter is
a String, the return value will be the sbid of the relative. If this value is non-null and the type of the item
parameter is not a String, the storyboard whose sbid value matches the relative will be returned if it exists in the collection, otherwise,
null will be returned, even if the relative sbid is non-null .
|
* — A value representing the next sibling of item .
|
See also
parentOf | () | method |
public function parentOf(item:*, storyboards:StoryboardCollection = null):*
Returns the parent of an item.
Parameters
item:* — Expression identifying the storyboard to return the parent of. item can be one of the following types:
| |
storyboards:StoryboardCollection (default = null ) — An optional collection of storyboards. If this value is null , or the type of the item parameter is
a String, the return value will be the sbid of the relative. If this value is non-null and the type of the item
parameter is not a String, the storyboard whose sbid value matches the relative will be returned if it exists in the collection, otherwise,
null will be returned, even if the relative sbid is non-null .
|
* — A value representing the parent of item .
|
See also
prependChild | () | method |
public function prependChild(parent:*, child:*):void
Adds an item as the first child of another item in the map.
If any part of item
is already present in the map, it is removed from the map before being added. If
current
is null
, or is not referenced in the map, item
is appended to the map.
If current
has children, item
is added before all other children of current
.
Parameters
parent:* — An expression designating the item to add as a child to. current can be one of the following types:
| |
child:* — An expression specifying the item to add to the map. item can be one of the following types:
|
ArgumentError prependChild() — cannot process passed item type (ArgumentError).
|
See also
previousLinearOf | () | method |
public function previousLinearOf(item:*, storyboards:StoryboardCollection = null):*
Returns the previuos linear value of an item.
Parameters
item:* — Expression identifying the storyboard to return the previuos linear value of. item can be one of the following types:
| |
storyboards:StoryboardCollection (default = null ) — An optional collection of storyboards. If this value is null , or the type of the item parameter is
a String, the return value will be the sbid of the relative. If this value is non-null and the type of the item
parameter is not a String, the storyboard whose sbid value matches the relative will be returned if it exists in the collection, otherwise,
null will be returned, even if the relative sbid is non-null .
|
* — A value representing the previuos linear value of item .
|
See also
previousSiblingOf | () | method |
public function previousSiblingOf(item:*, storyboards:StoryboardCollection = null):*
Returns the previous sibling of an item.
Parameters
item:* — Expression identifying the storyboard to return the previous sibling of. item can be one of the following types:
| |
storyboards:StoryboardCollection (default = null ) — An optional collection of storyboards. If this value is null , or the type of the item parameter is
a String, the return value will be the sbid of the relative. If this value is non-null and the type of the item
parameter is not a String, the storyboard whose sbid value matches the relative will be returned if it exists in the collection, otherwise,
null will be returned, even if the relative sbid is non-null .
|
* — A value representing the next sibling of item .
|
See also
relativeCountOf | () | method |
public function relativeCountOf(item:*):Number
Returns the number of siblings of an item.
If item
exists more than once in the map, this method returns only the value associated with the first
occurrence. If item
is not valid or not found in the map, this method returns -1. Note that the value
returned from this method includes item
.
Parameters
item:* — Expression identifying the item to find the peer count of. item can be one of the following types:
|
Number — The number of siblings of item .
|
See also
relativeOf | () | method |
public function relativeOf(item:*, relativeLocation:String, storyboards:StoryboardCollection = null):*
Returns the relative of an item.
If item
is a Storyboard object and storyboards
is not null
, then the return value is the
storyboard object from the collection whose sbid
value matches the sbid of the relative of the sbid
property of item
.
Note that if the storyboard object is not in the collection, null
is returned, even if this method
has found a relative sbid.
If item
is not a Storyboard object, or the storyboards
parameter is null
, then the
return value is a String representing the sbid
property of the relative of item
. If no relative
can be found, the empty string ("") is returned.
If the relative isn't found and storyboards
is null
or item
is a
string, an empty string ("") will be returned, otherwise null
is returned.
If relativeLocation
is impression.persistence.properties.RelativeLocations.FIRST_STORYBOARD or
impression.persistence.properties.RelativeLocations.LAST_STORYBOARD, item
is ignored, and the method will return
a Storyboard or String based entirely on the value of the storyboards
parameter.
Parameters
item:* — Expression identifying the storyboard to return the relative storyboard/sbid of. item can be one of the following types:
| |
relativeLocation:String — The relative location to retrieve the value of. This should be one of the RelativeLocations constant values.
| |
storyboards:StoryboardCollection (default = null ) — An optional collection of storyboards.
|
* — A value representing the relative of item .
|
See also
relativePathOf | () | method |
public function relativePathOf(item:*):String
Returns a dot-seperated list of relative positions for an item.
The relative path consists of the relative positions from the top ancestor down to (and including) the item itself.
If item
exists more than once in the map, this method returns only the value associated with the first
occurrence. If item
is not valid or not found in the map, this method returns the empty string ("").
Parameters
item:* — Expression specifying the item to return the position list of. item can be one of the following types:
|
String — The position list for the item
|
See also
relativePositionOf | () | method |
public function relativePositionOf(item:*):Number
Returns the relative position of an item.
The relative position of an item is the 1-based position of the item relative to its siblings. If
item
exists more than once in the map, this method returns only the value associated with the first
occurrence. If item
is not found in the object, -1 is returned.
Parameters
item:* — Expression identifying the item to find the position of. item can be one of the following types:
|
Number — The 1-based position of the item relative to its siblings.
|
See also
relativeXMLOf | () | method |
public function relativeXMLOf(source:XML, relativeLocation:String):XML
Returns an XML object for the specified relation of the passed in source
XML object.
If source
is null
, null
is returned, unless relativeLocation
is impression.persistence.properties.RelativeLocations.FIRST_STORYBOARD or impression.persistence.properties.RelativeLocations.LAST_STORYBOARD,
in which case source
is ignored.
Parameters
source:XML — the node to find the relation of.
| |
relativeLocation:String — The relative location to retrieve the value of. This should be one of the RelativeLocations constant values.
|
XML — An XML object containing the specified relative.
|
See also
remove | () | method |
public function remove(item:*, deep:Boolean = false):void
Removes an item from the map.
If deep
is true
, the item and all of its descendants will be removed from the map. If deep
is false
, only the item itself will be removed.
Parameters
item:* — An expression specifying the item to add to the map. item can be one of the following types:
| |
deep:Boolean (default = false ) — Specifies how descendants of item should be processed.
|
ArgumentError remove() — cannot process passed item type (ArgumentError).
|
resolveLocation | () | method |
public function resolveLocation(location:LocationData, current:* = null):LocationData
Returns a resolved version of a LocationData object.
This routine examines the location
parameter object and replaces any relative locations
specified with absolute sbid values, using the current
parameter as the current item. If
necessary, the startPoint
and endPoint
values are swapped to ensure that the
absolute position of startPoint
is greater than the absolute position of endPoint
.
If a relative location cannot be resolved, it is removed, and the returned object will reference a
single location.
Note that this routine ignores the map
property of the passed object.
Parameters
location:LocationData — The object to resolve.
| |
current:* (default = null ) — An expression identifying the current location to use when looking up relative locations. current can be one of the following types:
|
LocationData — The resolved version of the location parameter.
|
See also
sbidOf | () | method |
public function sbidOf(source:XML):String
Returns the sbid of an item.
If source
is null
, an empty string ("") will be returned.
Parameters
source:XML — The item to retrieve the sbid value of.
|
String — The sbid of the item.
|
toArray | () | method |
public function toArray():Array
Returns an array of sbid references in the map.
The return value preserves the linear order of references in the map.
ReturnsArray — An array of sbid references in the map.
|
toObject | () | method |
public function toObject():Object
Returns an object containing the sbid references as dynamic properties. The properties are indexed by the sbid.
ReturnsObject — An object containing the sbid references as dynamic properties.
|
topAncestorOf | () | method |
public function topAncestorOf(item:*, storyboards:StoryboardCollection = null):*
Returns the top ancestor of an item.
Parameters
item:* — Expression identifying the storyboard to return the top ancestor of. item can be one of the following types:
| |
storyboards:StoryboardCollection (default = null ) — An optional collection of storyboards. If this value is null , or the type of the item parameter is
a String, the return value will be the sbid of the relative. If this value is non-null and the type of the item
parameter is not a String, the storyboard whose sbid value matches the relative will be returned if it exists in the collection, otherwise,
null will be returned, even if the relative sbid is non-null .
|
* — A value representing the top ancestor of item .
|
See also
toStoryboardArray | () | method |
public function toStoryboardArray(storyboards:StoryboardCollection):Array
Returns an array containing the storyboards in the map.
If storyboards
is null
, an empty Array is returned. If an item is referenced
by the map, but is not in the collection, it is not added to the array.
Parameters
storyboards:StoryboardCollection — The storyboard objects to place into the return value.
|
Array — An array containing the storyboards in the map.
|
toStoryboardCollection | () | method |
public function toStoryboardCollection(storyboards:StoryboardCollection):StoryboardCollection
Returns a StoryboardCollection object containing the storyboards in the map.
If storyboards
is null
, an empty StoryboardCollection is returned. If an item is referenced
by the map, but is not in the passed collection, it is ignored.
Parameters
storyboards:StoryboardCollection — The storyboard objects to place into the return value.
|
StoryboardCollection — A StoryboardCollection object containg the storyboards in the map.
|
toString | () | method |
public function toString():String
Returns the string representation of the specified object.
ReturnsString — The string representation of the specified object.
|
toXML | () | method |
public function toXML():XML
Returns an Impression-format XML object containing all the data from the object.
ReturnsXML — An XML object containing the data from the object.
|
See also
xmlOf | () | method |
public function xmlOf(item:*):XML
Returns an XML object for an item.
If item
exists more than once in the map, this method returns only the value associated with the first
occurrence. If item
is null
, or the XML object of item
cannot be found,
this method returns null
.
Parameters
item:* — Expression identifying the item to return an XML object for. item can be one of the following types:
|
XML — The XML object for item
|
See also