VIVO-112 ISF changes relating to custom forms and list views

This commit is contained in:
tworrall 2013-08-26 16:58:49 -04:00
parent 43d92a8cd8
commit 35d136fec3
5 changed files with 418 additions and 176 deletions

View file

@ -36,7 +36,7 @@ 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(?person) AS ?count) \n"
+ "SELECT DISTINCT ?label ?location (COUNT(DISTINCT ?person) AS ?count) \n"
+ "WHERE { { \n"
+ " ?location rdf:type core:GeographicRegion . \n"
+ " ?location rdfs:label ?label . \n"
@ -45,7 +45,7 @@ public class GeoFocusMapLocations extends AbstractAjaxResponder {
+ " FILTER (NOT EXISTS {?location a core:StateOrProvince}) \n"
+ "} UNION { \n"
+ " ?location rdf:type core:GeographicRegion . \n"
+ " ?location core:geographicallyContains ?sublocation . \n"
+ " ?location <http://purl.obolibrary.org/obo/BFO_0000051> ?sublocation . \n"
+ " ?location rdfs:label ?label . \n"
+ " ?sublocation core:geographicFocusOf ?person . \n"
+ " ?person rdf:type foaf:Person \n"

View file

@ -1,50 +1,50 @@
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
public class AddServiceProviderRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
private static String OPTION_CLASS_URI = "http://xmlns.com/foaf/0.1/Organization";
@Override
String getTemplate() { return "addServiceProviderRoleToPerson.ftl"; }
@Override
String getRoleType() {
return "http://vivoweb.org/ontology/core#ServiceProviderRole";
}
/** Service Provider role involves hard-coded options for the
* "right side" of the role or activity. */
@Override
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
return new
ChildVClassesOptions(OPTION_CLASS_URI)
.setDefaultOptionLabel("Select type");
}
@Override
boolean isShowRoleLabelField(){return true;}
/*
* Use the methods below to change the date/time precision in the
* custom form associated with this generator. When not used, the
* precision will be YEAR. The other precisons are MONTH, DAY, HOUR,
* MINUTE, TIME and NONE.
*/
/*
public String getStartDatePrecision() {
String precision = VitroVocabulary.Precision.MONTH.uri();
return precision;
}
public String getEndDatePrecision() {
String precision = VitroVocabulary.Precision.DAY.uri();
return precision;
}
*/
}
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
package edu.cornell.mannlib.vitro.webapp.edit.n3editing.configuration.generators;
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.ChildVClassesOptions;
import edu.cornell.mannlib.vitro.webapp.edit.n3editing.VTwo.fields.FieldOptions;
public class AddServiceProviderRoleToPersonGenerator extends AddRoleToPersonTwoStageGenerator {
private static String OPTION_CLASS_URI = "http://xmlns.com/foaf/0.1/Organization";
@Override
String getTemplate() { return "addServiceProviderRoleToPerson.ftl"; }
@Override
String getRoleType() {
return "http://purl.obolibrary.org/obo/ERO_0000012";
}
/** Service Provider role involves hard-coded options for the
* "right side" of the role or activity. */
@Override
FieldOptions getRoleActivityFieldOptions(VitroRequest vreq) throws Exception {
return new
ChildVClassesOptions(OPTION_CLASS_URI)
.setDefaultOptionLabel("Select type");
}
@Override
boolean isShowRoleLabelField(){return true;}
/*
* Use the methods below to change the date/time precision in the
* custom form associated with this generator. When not used, the
* precision will be YEAR. The other precisons are MONTH, DAY, HOUR,
* MINUTE, TIME and NONE.
*/
/*
public String getStartDatePrecision() {
String precision = VitroVocabulary.Precision.MONTH.uri();
return precision;
}
public String getEndDatePrecision() {
String precision = VitroVocabulary.Precision.DAY.uri();
return precision;
}
*/
}