Merge branch 'maint-rel-1.6' into develop
This commit is contained in:
commit
6aa8ed4ddd
8 changed files with 68 additions and 16 deletions
|
@ -7,5 +7,5 @@ CONSTRUCT {
|
|||
?grant vivo:relates ?role
|
||||
} WHERE {
|
||||
?role vivo:roleContributesTo ?grant .
|
||||
?grant a vivo:Grant .
|
||||
{ ?grant a vivo:Grant } UNION { ?grant a vivo:Contract }
|
||||
}
|
||||
|
|
|
@ -8,6 +8,6 @@ CONSTRUCT {
|
|||
} WHERE {
|
||||
?agent <http://purl.obolibrary.org/obo/RO_0000053> ?role .
|
||||
?role vivo:relatedBy ?grant .
|
||||
?grant a vivo:Grant .
|
||||
{ ?grant a vivo:Grant } UNION { ?grant a vivo:Contract }
|
||||
FILTER NOT EXISTS { ?grant vivo:relates ?agent }
|
||||
}
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
PREFIX vivo: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX owl: <http://www.w3.org/2002/07/owl#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
|
||||
CONSTRUCT {
|
||||
?awardReceipt vivo:assignedBy ?org .
|
||||
?org vivo:assigns ?awardReceipt .
|
||||
} WHERE {
|
||||
?org vivo:assigns ?award .
|
||||
?award a vivo:Award .
|
||||
?org a foaf:Organization .
|
||||
?awardReceipt vivo:relates ?award .
|
||||
?awardReceipt a vivo:AwardReceipt .
|
||||
}
|
|
@ -7,5 +7,5 @@ CONSTRUCT {
|
|||
?grant vivo:contributingRole ?role .
|
||||
} WHERE {
|
||||
?role vivo:roleContributesTo ?grant .
|
||||
?grant a vivo:Grant .
|
||||
{ ?grant a vivo:Grant } UNION { ?grant a vivo:Contract }
|
||||
}
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
PREFIX vivo: <http://vivoweb.org/ontology/core#>
|
||||
PREFIX owl: <http://www.w3.org/2002/07/owl#>
|
||||
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
|
||||
|
||||
CONSTRUCT {
|
||||
?award vivo:assignedBy ?org .
|
||||
?org vivo:assigns ?award .
|
||||
} WHERE {
|
||||
?org vivo:assigns ?award .
|
||||
?award a vivo:Award .
|
||||
?org a foaf:Organization .
|
||||
}
|
|
@ -35,14 +35,22 @@ $(document).ready(function(){
|
|||
$('a#globalLink').removeClass("selected");
|
||||
});
|
||||
|
||||
function getLatLong(country) {
|
||||
function getLatLong(localName,popup) {
|
||||
var lat = [];
|
||||
latLongJson.map(function (json) {
|
||||
if ( json.name == country) {
|
||||
if ( json.local == localName) {
|
||||
lat.push(json.data["longitude"]);
|
||||
lat.push(json.data["latitude"]);
|
||||
}
|
||||
});
|
||||
if (lat.length == 0) {
|
||||
latLongJson.map(function (json) {
|
||||
if ( json.name == popup) {
|
||||
lat.push(json.data["longitude"]);
|
||||
lat.push(json.data["latitude"]);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (lat.length == 0) {
|
||||
lat.push(0.0);
|
||||
lat.push(0.0);
|
||||
|
@ -50,23 +58,37 @@ $(document).ready(function(){
|
|||
return(lat);
|
||||
}
|
||||
|
||||
function getMapType(country) {
|
||||
function getMapType(localName,popup) {
|
||||
var mt = "";
|
||||
latLongJson.map(function (json) {
|
||||
if ( json.name == country) {
|
||||
if ( json.local == localName) {
|
||||
mt = json.data["mapType"];
|
||||
}
|
||||
});
|
||||
if ( mt.length == 0 ) {
|
||||
latLongJson.map(function (json) {
|
||||
if ( json.name == popup) {
|
||||
mt = json.data["mapType"];
|
||||
}
|
||||
});
|
||||
}
|
||||
return(mt);
|
||||
}
|
||||
|
||||
function getGeoClass(country) {
|
||||
function getGeoClass(localName,popup) {
|
||||
var gc = "";
|
||||
latLongJson.map(function (json) {
|
||||
if ( json.name == country) {
|
||||
if ( json.local == localName) {
|
||||
gc = json.data["geoClass"];
|
||||
}
|
||||
});
|
||||
if ( gc.length == 0 ) {
|
||||
latLongJson.map(function (json) {
|
||||
if ( json.name == popup) {
|
||||
gc = json.data["geoClass"];
|
||||
}
|
||||
});
|
||||
}
|
||||
return(gc);
|
||||
}
|
||||
|
||||
|
@ -342,7 +364,6 @@ $(document).ready(function(){
|
|||
action: "getGeoFocusLocations",
|
||||
},
|
||||
complete: function(xhr, status) {
|
||||
|
||||
var results = $.parseJSON(xhr.responseText);
|
||||
if ( results.length == 0 ) {
|
||||
var html = i18nStrings.currentlyNoResearchers;
|
||||
|
@ -355,10 +376,11 @@ $(document).ready(function(){
|
|||
}
|
||||
else {
|
||||
$.each(results, function() {
|
||||
var locale = this.properties.popupContent;
|
||||
this.geometry.coordinates = getLatLong(locale);
|
||||
this.properties.mapType = getMapType(locale);
|
||||
this.properties.geoClass = getGeoClass(locale);
|
||||
var popup = this.properties.popupContent;
|
||||
var localName = this.properties.local;
|
||||
this.geometry.coordinates = getLatLong(localName,popup);
|
||||
this.properties.mapType = getMapType(localName,popup);
|
||||
this.properties.geoClass = getGeoClass(localName,popup);
|
||||
researchAreas["features"].push(this);
|
||||
});
|
||||
buildGlobalMap();
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -36,7 +36,8 @@ public class GeoFocusMapLocations extends AbstractAjaxResponder {
|
|||
+ "PREFIX core: <http://vivoweb.org/ontology/core#> \n"
|
||||
+ "PREFIX foaf: <http://xmlns.com/foaf/0.1/> \n"
|
||||
+ "PREFIX vivoc: <http://vivo.library.cornell.edu/ns/0.1#> \n"
|
||||
+ "SELECT DISTINCT ?label ?location (COUNT(DISTINCT ?person) AS ?count) \n"
|
||||
+ "PREFIX afn: <http://jena.hpl.hp.com/ARQ/function#> "
|
||||
+ "SELECT DISTINCT ?label ?location (afn:localname(?location) AS ?localName) (COUNT(DISTINCT ?person) AS ?count) \n"
|
||||
+ "WHERE { { \n"
|
||||
+ " ?location rdf:type core:GeographicRegion . \n"
|
||||
+ " ?location rdfs:label ?label . \n"
|
||||
|
@ -77,6 +78,7 @@ public class GeoFocusMapLocations extends AbstractAjaxResponder {
|
|||
String label = map.get("label");
|
||||
String html = map.get("count");
|
||||
String uri = map.get("location");
|
||||
String local = map.get("localName");
|
||||
if ( uri != null ) {
|
||||
uri = UrlBuilder.urlEncode(uri);
|
||||
}
|
||||
|
@ -107,6 +109,8 @@ public class GeoFocusMapLocations extends AbstractAjaxResponder {
|
|||
+ radius
|
||||
+ ",\"uri\": \""
|
||||
+ uri
|
||||
+ "\",\"local\": \""
|
||||
+ local
|
||||
+ "\"}},";
|
||||
response += tempStr;
|
||||
previousLabel = label;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue