integration/js/ldt-serializer.js
changeset 42 40909e8d6855
parent 41 3ec2343f2b85
child 43 5a5024bc74e6
--- a/integration/js/ldt-serializer.js	Thu Nov 08 18:24:47 2012 +0100
+++ b/integration/js/ldt-serializer.js	Fri Nov 09 18:56:29 2012 +0100
@@ -121,7 +121,7 @@
                     },
                     media : _data.media.id,
                     meta : {
-                        "id-ref" : _data.annotationType.id,
+                        "id-ref" : _data.getAnnotationType().id,
                         "dc:created" : IriSP.Model.dateToIso(_data.created),
                         "dc:creator" : _data.creator,
                         project : _source.projectId
@@ -155,7 +155,7 @@
                         listtype: "mashup"
                     },
                     items: _data.segments.map(function(_annotation) {
-                        return _id;
+                        return _annotation.annotation.id;
                     }),
                     id: _data.id
                 }
@@ -163,7 +163,16 @@
         }
     },
     serialize : function(_source) {
-        var _res = {},
+        var _res = {
+                meta: {
+                    "dc:creator": _source.creator,
+                    "dc:created": IriSP.Model.dateToIso(_source.created),
+                    "dc:title": _source.title,
+                    "dc:description": _source.description,
+                    "id": _source.projectId || _source.id
+                },
+                views: []
+            },
             _this = this;
         _source.forEach(function(_list, _typename) {
             if (typeof _this.types[_typename] !== "undefined") {