6 var metaData
= {}, metaArray
= {};
11 * The type of meta-data. All meta-data with the same type with be
23 this.register(this.id
);
42 register: function(id
, old
) {
43 if (id
&& id
!== SKIP_ID
) {
44 this.unregister(this, old
);
45 this.metaData
[id
] = this;
46 this.metaArray
.push(this);
50 unregister: function(meta
, id
) {
51 delete this.metaData
[id
|| meta
.id
];
52 var i
= this.metaArray
.indexOf(meta
);
54 this.metaArray
.splice(i
, 1);
59 * Returns a list of all meta-data elements with the same type.
66 return this.metaArray
;
70 * Retrieves meta-data by ID.
73 * @param {String} id The ID of the meta-data to be returned.
74 * @returns Returns meta-data.
77 return this.metaData
[id
];