equal
deleted
inserted
replaced
121 "id-ref" : _source.unNamespace(_id) |
121 "id-ref" : _source.unNamespace(_id) |
122 } |
122 } |
123 }) |
123 }) |
124 } |
124 } |
125 } |
125 } |
|
126 }, |
|
127 mashup : { |
|
128 serialized_name : "mashups", |
|
129 model_name : "mashup", |
|
130 deserializer : function(_data, _source) { |
|
131 console.log("Before"); |
|
132 var _res = new IriSP.Model.Mashup(_data.id, _source); |
|
133 _res.title = _data.meta["dc:title"]; |
|
134 _res.description = _data.meta["dc:description"]; |
|
135 console.log(_data); |
|
136 for (var _i = 0; _i < _data.segments.length; _i++) { |
|
137 console.log("Adding segment "+_data.segments[_i]) |
|
138 _res.addSegmentById(_data.segments[_i]); |
|
139 } |
|
140 return _res; |
|
141 }, |
|
142 serializer : function(_data, _source) { |
|
143 return { |
|
144 "dc:title": _data.title, |
|
145 "dc:description": _data.description, |
|
146 segments: _data.segments.map(function(_annotation) { |
|
147 return _source.unNamespace(_id); |
|
148 }) |
|
149 } |
|
150 } |
126 } |
151 } |
127 }, |
152 }, |
128 serialize : function(_source) { |
153 serialize : function(_source) { |
129 var _res = {}, |
154 var _res = {}, |
130 _this = this; |
155 _this = this; |