controllers/static/model.js
/**
   * @method transformModel
   * @description given a aggie experts model, lookup correct transform function
   * and transform into schema.org jsonld stringified object
   * 
   * @param {Object} model
   *  
   * @returns {String}
   */
@method transformModel
@description given a aggie experts model, lookup correct transform function
and transform into schema.org jsonld stringified object

@param {Object} model

@returns {String}
@method transformModel @description given a aggie experts model lookup correct transform function and transform into schema . org jsonld stringified object @param { Object } model @returns { String }
transformModel(model) {
    let jsonld = '';
    let transform = getTransformByType(model['@type']);
    if( !transform ) return jsonld;
    try {
      jsonld = JSON.stringify(transform(model), '  ', '  ');
    } catch(e) {
      logger.error(`failed to transform model: ${model['@id']}`, e);
    }
    return jsonld;
  }
transformModel ( model ) { let jsonld = '' ; let transform = getTransformByType ( model [ '@type' ] ) ; if ( ! transform ) return jsonld ; try { jsonld = JSON . stringify ( transform ( model ) , '  ' , '  ' ) ; } catch ( e ) { logger . error ( ` ${ model [ '@id' ] } ` , e ) ; } return jsonld ; }
@method transformModel
 @description given a aggie experts model, lookup correct transform function
 and transform into schema.org jsonld stringified object
@method transformModel @description given a aggie experts model lookup correct transform function and transform into schema . org jsonld stringified object