Packageimpression.persistence
Classpublic class ChildElement
InheritanceChildElement Inheritance PersistedPropertiesCollection Inheritance Object

The ChildElement object is an extension of the PersistedPropertyCollection object that can be placed into a ChildElementCollection.



Public Properties
 PropertyDefined By
  elementType : String
Identifies the type of data stored within the object.
ChildElement
 Inheritedlength : int
[read-only] The number of items in the collection.
PersistedPropertiesCollection
 Inheritedname : String
[read-only] The name of the collection.
PersistedPropertiesCollection
 InheriteduseIntType : Boolean = false
[static] Specifies how PersistedPropertyCollection objects will store numeric data loaded from an XML object.
PersistedPropertiesCollection
Public Methods
 MethodDefined By
  
ChildElement(newName:String = null, elementType:String = null)
Creates a new instance of the ChildElement class.
ChildElement
 Inherited
clear():void
Removes all items from the collection.
PersistedPropertiesCollection
  
clone():*
[override] Returns a copy of the object.
ChildElement
 Inherited
contains(propertyName:String):Boolean
Returns a value indicating whether or not the property specified by propertyName exists in the collection.
PersistedPropertiesCollection
 Inherited
copyFrom(source:PersistedPropertiesCollection, overwriteExisting:Boolean):void
Copies properties from the source object into the collection.
PersistedPropertiesCollection
  
fromXML(source:XML):ChildElement
[static] Returns a new instance of the ChildElement class based on the data contained in the XML object.
ChildElement
 Inherited
getAsset(propertyName:String, defaultValue:AssetData):AssetData
Returns an AssetData value.
PersistedPropertiesCollection
 Inherited
getBoolean(propertyName:String, defaultValue:Boolean):Boolean
Returns a Boolean value.
PersistedPropertiesCollection
 Inherited
getCEC(propertyName:String, defaultValue:ChildElementCollection):ChildElementCollection
Returns a ChildElementCollection value.
PersistedPropertiesCollection
 Inherited
getColor(propertyName:String, defaultValue:ColorData):ColorData
Returns a ColorData value.
PersistedPropertiesCollection
 Inherited
getFont(propertyName:String, defaultValue:FontData):FontData
Returns a FontData value.
PersistedPropertiesCollection
 Inherited
getInt(propertyName:String, defaultValue:int):int
Returns an int value.
PersistedPropertiesCollection
 Inherited
getLocation(propertyName:String, defaultValue:LocationData):LocationData
Returns a LocationData value.
PersistedPropertiesCollection
 Inherited
getNumber(propertyName:String, defaultValue:Number):Number
Returns a Number value.
PersistedPropertiesCollection
 Inherited
Returns a PersistedPropertiesCollection value.
PersistedPropertiesCollection
 Inherited
getRectangle(propertyName:String, defaultValue:Rectangle):Rectangle
Returns a Rectangle value.
PersistedPropertiesCollection
 Inherited
getString(propertyName:String, defaultValue:String):String
Returns a String value.
PersistedPropertiesCollection
 Inherited
getUInt(propertyName:String, defaultValue:uint):uint
Returns a uint value.
PersistedPropertiesCollection
 Inherited
getValue(propertyName:String, defaultValue:*, requireTypeMatching:Boolean = true, requiredType:Class = null):*
Returns a value.
PersistedPropertiesCollection
 Inherited
remove(propertyName:String):void
Removes an item from the collection.
PersistedPropertiesCollection
 Inherited
Removes all properties from this instance where the property name is present in source.
PersistedPropertiesCollection
 Inherited
setAsset(propertyName:String, newValue:AssetData):void
Stores an AssetData value.
PersistedPropertiesCollection
 Inherited
setBoolean(propertyName:String, newValue:Boolean):void
Stores a Boolean value.
PersistedPropertiesCollection
 Inherited
setCEC(propertyName:String, newValue:ChildElementCollection):void
Stores a ChildElementCollection value.
PersistedPropertiesCollection
 Inherited
setColor(propertyName:String, newValue:ColorData):void
Stores a ColorData value.
PersistedPropertiesCollection
 Inherited
setFont(propertyName:String, newValue:FontData):void
Stores a FontData value.
PersistedPropertiesCollection
 Inherited
setInt(propertyName:String, newValue:int):void
Stores an int value.
PersistedPropertiesCollection
 Inherited
setLocation(propertyName:String, newValue:LocationData):void
Stores a LocationData value.
PersistedPropertiesCollection
 Inherited
setNumber(propertyName:String, newValue:Number):void
Stores a Number value.
PersistedPropertiesCollection
 Inherited
setPPC(propertyName:String, newValue:PersistedPropertiesCollection):void
Stores a PersistedPropertiesCollection value.
PersistedPropertiesCollection
 Inherited
setRectangle(propertyName:String, newValue:Rectangle):void
Stores a Rectangle value.
PersistedPropertiesCollection
 Inherited
setString(propertyName:String, newValue:String):void
Stores a String value.
PersistedPropertiesCollection
 Inherited
setUInt(propertyName:String, newValue:uint):void
Stores a uint value.
PersistedPropertiesCollection
 Inherited
setValue(propertyName:String, newValue:*):void
Stores a value.
PersistedPropertiesCollection
 Inherited
toObject(cloneProperties:Boolean = true):Object
Returns an object containing a copy of all the items stored in the collection.
PersistedPropertiesCollection
  
toString():String
[override] Returns the string representation of the specified object.
ChildElement
  
toXML():XML
[override] Returns an Impression-format XML object containing all the data from the object.
ChildElement
 Inherited
typesMatch(a:*, b:*, requiredType:Class = null):Boolean
Returns a Boolean value specifying whether or not an item is of a specific type.
PersistedPropertiesCollection
Property Detail
elementTypeproperty
elementType:String

Identifies the type of data stored within the object.

If elementType is set to null, an empty string ("") will be used.

The default value is the empty string ("").


Implementation
    public function get elementType():String
    public function set elementType(value:String):void
Constructor Detail
ChildElement()Constructor
public function ChildElement(newName:String = null, elementType:String = null)

Creates a new instance of the ChildElement class.

If newName is null, "properties" will be used for the name property. If elementType is null, an empty string ("") will be used for the elementType property.

Parameters
newName:String (default = null) — A String specifying the name of the object.
 
elementType:String (default = null) — A String specifying the type of the object.
Method Detail
clone()method
override public function clone():*

Returns a copy of the object.

Objects that have a type-specific set[type]/get[type] method pair defined in this class (for example, AssetData objects) are copied by invoking their clone method before they are stored in the clone.

Other property values are assigned to the clone using the equals operator (=). Depending on the object type, it may be either a copy of, or a reference to, the original object. Use caution when working with objects stored using setValue.

Returns
* — A copy of the object.

See also

fromXML()method 
public static function fromXML(source:XML):ChildElement

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

If source is null, an empty ChildElement object is returned. If the source.name property is not "ce", an error is thrown.

The XML format of a ChildElement object is:

Where [persisted property value] can be any valid PersistedPropertyCollection XML property values.

Parameters

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

Returns
ChildElement — A ChildElement object containing the data from the source XML object.

Throws
ArgumentError — node is not a <ce> element (ArgumentError).

See also

toString()method 
override public function toString():String

Returns the string representation of the specified object.

Returns
String — The string representation of the specified object.
toXML()method 
override public function toXML():XML

Returns an Impression-format XML object containing all the data from the object.

Returns
XML — An XML object containing all the data from the object.

See also