mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-19 17:37:50 -05:00
Brought up to date with the private repository (feea4c7)
This commit is contained in:
1 parent
1aa738d692
commit
1b1df1ae48
7925 files changed
+2617237
-20
No files matched your search
@@ -0,0 +1,82 @@
|
||||
package org.osmf.metadata
|
||||
{
|
||||
import flash.events.Event;
|
||||
import flash.events.EventDispatcher;
|
||||
import flash.utils.Dictionary;
|
||||
import org.osmf.events.MetadataEvent;
|
||||
import org.osmf.utils.OSMFStrings;
|
||||
|
||||
public class Metadata extends EventDispatcher
|
||||
{
|
||||
|
||||
private var data:Dictionary;
|
||||
|
||||
public function Metadata()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public function getValue(param1:String) : *
|
||||
{
|
||||
if(param1 == null)
|
||||
{
|
||||
throw new ArgumentError(OSMFStrings.getString("nullParam"));
|
||||
}
|
||||
return data != null ? data[param1] : null;
|
||||
}
|
||||
|
||||
public function addValue(param1:String, param2:Object) : void
|
||||
{
|
||||
var _loc4_:Event = null;
|
||||
if(param1 == null)
|
||||
{
|
||||
throw new ArgumentError(OSMFStrings.getString("nullParam"));
|
||||
}
|
||||
if(data == null)
|
||||
{
|
||||
data = new Dictionary();
|
||||
}
|
||||
var _loc3_:* = data[param1];
|
||||
data[param1] = param2;
|
||||
if(_loc3_ != param2)
|
||||
{
|
||||
_loc4_ = _loc3_ === undefined ? new MetadataEvent("valueAdd",false,false,param1,param2) : new MetadataEvent("valueChange",false,false,param1,param2,_loc3_);
|
||||
dispatchEvent(_loc4_);
|
||||
}
|
||||
}
|
||||
|
||||
public function removeValue(param1:String) : *
|
||||
{
|
||||
if(param1 == null)
|
||||
{
|
||||
throw new ArgumentError(OSMFStrings.getString("nullParam"));
|
||||
}
|
||||
var _loc2_:* = data[param1];
|
||||
if(_loc2_ !== undefined)
|
||||
{
|
||||
delete data[param1];
|
||||
dispatchEvent(new MetadataEvent("valueRemove",false,false,param1,_loc2_));
|
||||
}
|
||||
return _loc2_;
|
||||
}
|
||||
|
||||
public function get keys() : Vector.<String>
|
||||
{
|
||||
var _loc1_:Vector.<String> = new Vector.<String>();
|
||||
if(data != null)
|
||||
{
|
||||
for(var _loc2_:Object in data)
|
||||
{
|
||||
_loc1_.push(_loc2_);
|
||||
}
|
||||
}
|
||||
return _loc1_;
|
||||
}
|
||||
|
||||
public function get synthesizer() : MetadataSynthesizer
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user