/* Result * Code for showing the information regarding one of the results */ displayOptions = { showAnnotations: true, metadataLinkBase: 'results?query=' } function showResult(uri) { metadata(uri); annotations(uri); } function metadata(uri) { // Get metadata from server new Pengine({server: 'pengine', application: 'enrichment', ask: 'metadata(' + Pengine.stringify(uri, {string:'atom'}) + ', Metadata),!', onsuccess: function () { appendMetadataWell(this.data, uri); } }); } function appendMetadataWell(data, uri) { var metadata = data[0].Metadata; $("#metadata").append( $.el.div({'class':'row'}, $.el.div({'class':'col-md-10 col-md-offset-1'}, $.el.div({'class':'well well-sm'}, $.el.h4('Showing metadata for ' + metadata.display_title), $.el.dl({'class':'dl-horizontal', 'id':'metadataList'}))))); for(var i=0; i 0) $("#metadata").append(annotationWell(this.data)); } }); } function annotationWell(data) { var annotations = data[0].Annotations.annotations; $("#metadata").append( $.el.div({'class':'row'}, $.el.div({'class':'col-md-10 col-md-offset-1'}, $.el.div({'class':'well well-sm'}, $.el.h4('Annotations for ' + data[0].Annotations.display_title), $.el.dl({'class':'dl-horizontal', 'id':'annotationList'}))))); for(var i=0; i