Rapporto Tecnico, Anno 7, n° 42 maggio 2012 this.query = 'select $parent ' + 'subquery (' + ' select $sibling from <#ri> ' + ' where $sibling $parent ' + ' and $sibling ' + ' order by $sibling) ' + 'from <#ri> ' + 'where $child ' + 'and $child $parent ' + 'and $parent '; } else if (this.cmodel == 'islandora-dm:po-document-cmodel') { this.query = 'select $object from <#ri> ' + 'where ($object ' + 'and $object ) ' + 'order by $object'; } else { // no query -- pid will be used alone. } } }, search: function() { if (this.query == null) { this.results = [this.pid]; } else { options = { type: this.type, lang: this.lang, format: this.format, query: this.query, uid: this.uid }; jQuery.post(this.fedoraUrl + '/risearch', options, this.createCallback(), 'text'); } }, extractPid: function(riSearchResult) { return riSearchResult.replace(/^.*\//, ''); }, createCallback: function() { var riSearch = this; return function(data, status) { var results = []; if ('success' == status) { var lines = data.split("\n"); for (i = 0; i < lines.length; i++) { if (i > 0 && lines[i] != '') { results.push(riSearch.extractPid(lines[i])); } } } riSearch.searchCallback(results); } } }); /* monkey patch OpenLayers.Layer.OpenURL */ iiv.Viewer.ImageLayer = OpenLayers.Class(OpenLayers.Layer.OpenURL, { djatokaUrl: null, uid: null, /** * this implementation is the same as the superclass, except that we use a * fedora service as the url base, not djatoka itself */ getURL: function(bounds) { bounds = this.adjustBounds(bounds); this.calculatePositionAndSize(bounds); var z = this.map.getZoom() + this.zoomOffset; // uid and djatokaUrl set in createImageLayer var path = this.djatokaUrl + '/getRegion?uid=' + this.uid + '&level=' + z + '®ion=' + this.tilePos.lat + "," + this.tilePos.lon + "," + this.imageSize.h + "," + this.imageSize.w; var url = this.url; if (url instanceof Array) { url = this.selectUrl(path, url); } return url + path; } }); 8.1.22 oaiprovider/WEB-INF/classes/proai.properties # # Proai Configuration # ================================ ############################## 82