src/js/serializers/ldt-serializer.js
changeset 1032 74ac0be7655c
parent 1015 63c5e5b16770
child 1036 3b88465041d6
equal deleted inserted replaced
1031:5746d89b5a40 1032:74ac0be7655c
   101                         "dc:title": _data.title || "",
   101                         "dc:title": _data.title || "",
   102                         "dc:description": _data.description || "",
   102                         "dc:description": _data.description || "",
   103                         "dc:created" : IriSP.Model.dateToIso(_data.created || _source.created),
   103                         "dc:created" : IriSP.Model.dateToIso(_data.created || _source.created),
   104                         "dc:modified" : IriSP.Model.dateToIso(_data.modified || _source.modified),
   104                         "dc:modified" : IriSP.Model.dateToIso(_data.modified || _source.modified),
   105                         "dc:creator" : _data.creator || _source.creator,
   105                         "dc:creator" : _data.creator || _source.creator,
   106                         "dc:contributor" : _data.contributor || _source.contributor || _data.creator || _source.creator,
   106                         "dc:contributor" : _data.contributor || _source.contributor || _data.creator || _source.creator
   107                     }
   107                     }
   108                 };
   108                 };
   109                 _dest.tags.push(_res);
   109                 _dest.tags.push(_res);
   110             }
   110             }
   111         },
   111         },
   123                     "dc:title": _data.title || "",
   123                     "dc:title": _data.title || "",
   124                     "dc:description": _data.description || "",
   124                     "dc:description": _data.description || "",
   125                     "dc:created" : IriSP.Model.dateToIso(_data.created || _source.created),
   125                     "dc:created" : IriSP.Model.dateToIso(_data.created || _source.created),
   126                     "dc:modified" : IriSP.Model.dateToIso(_data.modified || _source.modified),
   126                     "dc:modified" : IriSP.Model.dateToIso(_data.modified || _source.modified),
   127                     "dc:creator" : _data.creator || _source.creator,
   127                     "dc:creator" : _data.creator || _source.creator,
   128                     "dc:contributor" : _data.contributor || _source.contributor || _data.creator || _source.creator,
   128                     "dc:contributor" : _data.contributor || _source.contributor || _data.creator || _source.creator
   129                 };
   129                 };
   130                 _dest["annotation-types"].push(_res);
   130                 _dest["annotation-types"].push(_res);
   131                 _dest.views[0].annotation_types.push(_data.id);
   131                 _dest.views[0].annotation_types.push(_data.id);
   132             }
   132             }
   133         },
   133         },
   192                     meta : {
   192                     meta : {
   193                         "id-ref" : _data.getAnnotationType().id,
   193                         "id-ref" : _data.getAnnotationType().id,
   194                         "dc:created" : IriSP.Model.dateToIso(_data.created || _source.created),
   194                         "dc:created" : IriSP.Model.dateToIso(_data.created || _source.created),
   195                         "dc:modified" : IriSP.Model.dateToIso(_data.modified || _source.modified),
   195                         "dc:modified" : IriSP.Model.dateToIso(_data.modified || _source.modified),
   196                         "dc:creator" : _data.creator || _source.creator,
   196                         "dc:creator" : _data.creator || _source.creator,
   197                         "dc:contributor" : _data.contributor || _source.contributor || _data.creator || _source.creator,
   197                         "dc:contributor" : _data.contributor || _source.contributor || _data.creator || _source.creator
   198 //                        project : _source.projectId
   198 //                        project : _source.projectId
   199                     }
   199                     }
   200                 };
   200                 };
   201                 if (_source.regenerateTags) {
   201                 if (_source.regenerateTags) {
   202                     _res.tags = IriSP._(_data.keywords).map(function(_kw) {
   202                     _res.tags = IriSP._(_data.keywords).map(function(_kw) {