src/js/data.js
changeset 859 002a16ff171b
parent 842 4ae2247a59f4
equal deleted inserted replaced
857:fa614dc66b0b 859:002a16ff171b
    74 
    74 
    75 IriSP.Serializer.prototype.getDuration = function() {  
    75 IriSP.Serializer.prototype.getDuration = function() {  
    76 };
    76 };
    77 
    77 
    78 IriSP.Serializer.prototype.sync = function(callback) {
    78 IriSP.Serializer.prototype.sync = function(callback) {
    79   this._DataLoader.get(this._url, callback, force_refresh);
    79     callback.call(this, this._data);
    80 };
    80 };
    81 
    81 
    82 IriSP.SerializerFactory = function(DataLoader) {
    82 IriSP.SerializerFactory = function(DataLoader) {
    83   this._dataloader = DataLoader;
    83   this._dataloader = DataLoader;
    84 };
    84 };
    85 
    85 
    86 IriSP.SerializerFactory.prototype.getSerializer = function(metadataOptions) {
    86 IriSP.SerializerFactory.prototype.getSerializer = function(metadataOptions) {
    87   /* This function returns serializer set-up with the correct
    87   /* This function returns serializer set-up with the correct
    88      configuration - takes a metadata struct describing the metadata source
    88      configuration - takes a metadata struct describing the metadata source
    89   */
    89   */
    90   
       
    91   if (metadataOptions === undefined)
    90   if (metadataOptions === undefined)
    92     /* return an empty serializer */
    91     /* return an empty serializer */
    93     return IriSP.Serializer("", "");
    92     return IriSP.Serializer("", "");
    94             
    93             
    95   switch(metadataOptions.type) {
    94   switch(metadataOptions.type) {