Packageimpression.persistence.properties
Classpublic class AssetData
InheritanceAssetData Inheritance Object

The AssetData object stores a filename used to specify an externally loadable file (asset). The AssetResolver class uses AssetData objects to load external files.

See also

impression.resolver.AssetResolver


Public Properties
 PropertyDefined By
  description : String
String description of the asset.
AssetData
  filename : String
The filename of the asset.
AssetData
  source : String
Additional information about the source files associated with the asset.
AssetData
Public Methods
 MethodDefined By
  
AssetData(filename:String, description:String, source:String)
Creates a new instance of the AssetData class.
AssetData
  
Returns a copy of the object.
AssetData
  
fromObject(sourceObject:Object):AssetData
[static] Returns a new instance of the AssetData class based on the data contained in the object.
AssetData
  
fromXML(sourceXML:XML):AssetData
[static] Returns a new instance of the AssetData class based on the data contained in the XML object.
AssetData
  
toObject():Object
Returns an Object containing the property values as dynamic properties.
AssetData
  
toString():String
Returns a string containing the property values of the object.
AssetData
Property Detail
descriptionproperty
public var description:String

String description of the asset.

filenameproperty 
public var filename:String

The filename of the asset.

sourceproperty 
public var source:String

Additional information about the source files associated with the asset.

Constructor Detail
AssetData()Constructor
public function AssetData(filename:String, description:String, source:String)

Creates a new instance of the AssetData class.

If filename or source is null, then the empty string ("") will be used.

Parameters
filename:String — The filename of the asset.
 
description:String — Additional information about the source files associated with the asset.
 
source:String — String description of the asset.
Method Detail
clone()method
public function clone():AssetData

Returns a copy of the object.

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

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

If sourceObject is null an empty AssetData object is returned.

Parameters

sourceObject:Object — The object containing the data to use. The object should contain two dynamic properties, filename and source.

Returns
AssetData — An AssetData object containing the data from the sourceObject object.
fromXML()method 
public static function fromXML(sourceXML:XML):AssetData

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

If sourceXML is null, then an empty AssetData object is returned. The XML format of an AssetData object is:

If the source element is missing, the empty string ("") is used.

Parameters

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

Returns
AssetData — An AssetData object containing the data from the sourceXML object.
toObject()method 
public function toObject():Object

Returns an Object containing the property values as dynamic properties.

Returns
Object — An Object containing the filename and source property values.
toString()method 
public function toString():String

Returns a string containing the property values of the object.

Returns
String — A string containing the filename and source property values.