diff --git a/productMods/config/listViewConfig-awardOrHonor.xml b/productMods/config/listViewConfig-awardOrHonor.xml
index b4f07be7..149df272 100644
--- a/productMods/config/listViewConfig-awardOrHonor.xml
+++ b/productMods/config/listViewConfig-awardOrHonor.xml
@@ -26,16 +26,16 @@
WHERE {
?subject ?property ?awardReceipt .
?awardReceipt a core:AwardReceipt .
- OPTIONAL { ?awardReceipt rdfs:label ?receiptLabel }
- OPTIONAL { ?awardReceipt core:relates ?award .
+ OPTIONAL { ?awardReceipt rdfs:label ?receiptLabel }
+ OPTIONAL { ?awardReceipt core:relates ?award .
?award a core:Award .
- ?award core:relatedBy ?awardReceipt
- OPTIONAL { ?award rdfs:label ?awardLabel }
- OPTIONAL { ?award core:assignedBy ?assignedBy
- OPTIONAL { ?assignedBy rdfs:label ?assignedByLabel }
- }
- }
- OPTIONAL { ?awardReceipt core:dateTimeInterval ?dateTimeInterval
+ ?award core:relatedBy ?awardReceipt .
+ ?award rdfs:label ?awardLabel
+ }
+ OPTIONAL { ?awardReceipt core:assignedBy ?assignedBy .
+ ?assignedBy rdfs:label ?assignedByLabel
+ }
+ OPTIONAL { ?awardReceipt core:dateTimeInterval ?dateTimeInterval
OPTIONAL { ?dateTimeInterval core:start ?dateTimeStartValue .
?dateTimeStartValue core:dateTime ?dateTimeStart
}
@@ -65,7 +65,7 @@
?award a core:Award .
?award core:relatedBy ?awardReceipt .
?award rdfs:label ?awardLabel .
- ?award core:assignedBy ?assignedBy .
+ ?awardReceipt core:assignedBy ?assignedBy .
?assignedBy rdfs:label ?assignedByLabel .
?awardReceipt core:dateTimeValue ?dateTimeValue .
?dateTimeValue core:dateTime ?dateTime
@@ -89,9 +89,7 @@
?subject ?property ?awardReceipt .
?awardReceipt a core:AwardReceipt .
?awardReceipt rdfs:label ?receiptLabel .
- ?awardReceipt core:relates ?award .
- ?award a core:Award .
- ?award core:assignedBy ?assignedBy .
+ ?awardReceipt core:assignedBy ?assignedBy .
?assignedBy rdfs:label ?assignedByLabel
} UNION {
?subject ?property ?awardReceipt .
@@ -122,8 +120,8 @@
PREFIX core: <http://vivoweb.org/ontology/core#>
CONSTRUCT {
- ?subject ?property ?awardReceipt .
- ?awardReceipt a core:AwardReceipt .
+ ?subject ?property ?awardReceipt .
+ ?awardReceipt a core:AwardReceipt .
?awardReceipt core:dateTimeInterval ?dateTimeInterval .
?dateTimeInterval core:end ?dateTimeEndValue .
?dateTimeEndValue core:dateTime ?dateTimeEnd
diff --git a/productMods/config/listViewConfig-default.xml b/productMods/config/listViewConfig-default.xml
index 213bf31a..7b550b8c 100644
--- a/productMods/config/listViewConfig-default.xml
+++ b/productMods/config/listViewConfig-default.xml
@@ -12,6 +12,8 @@
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
+ PREFIX obo: <http://purl.obolibrary.org/obo/>
+ PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
SELECT ?subclass
?object
@@ -37,7 +39,11 @@
?classGroup a vitro:ClassGroup
}
- OPTIONAL { ?object core:preferredTitle ?title }
+ OPTIONAL { ?object obo:ARG_2000028 ?vcard .
+ ?vcard vcard:hasTitle ?titleObj .
+ ?titleObj vcard:title ?title
+ }
+
OPTIONAL { ?object a ?subclass }
@@ -75,6 +81,8 @@
PREFIX core: <http://vivoweb.org/ontology/core#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>
+ PREFIX obo: <http://purl.obolibrary.org/obo/>
+ PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>
CONSTRUCT {
?subject ?property ?object .
@@ -82,7 +90,9 @@
?typeUri vitro:inClassGroup ?classGroup .
?classGroup a vitro:ClassGroup .
?typeUri rdfs:label ?type .
- ?object core:preferredTitle ?title .
+ ?object obo:ARG_2000028 ?vcard .
+ ?vcard vcard:hasTitle ?titleObj .
+ ?titleObj vcard:title ?title
} WHERE {
{
?subject ?property ?object .
@@ -92,7 +102,9 @@
?classGroup a vitro:ClassGroup
} UNION {
?subject ?property ?object .
- ?object core:preferredTitle ?title .
+ ?object obo:ARG_2000028 ?vcard .
+ ?vcard vcard:hasTitle ?titleObj .
+ ?titleObj vcard:title ?title
}
}
diff --git a/productMods/templates/freemarker/edit/forms/addGrantRoleToPerson.ftl b/productMods/templates/freemarker/edit/forms/addGrantRoleToPerson.ftl
index 3520f23a..1fe602ef 100644
--- a/productMods/templates/freemarker/edit/forms/addGrantRoleToPerson.ftl
+++ b/productMods/templates/freemarker/edit/forms/addGrantRoleToPerson.ftl
@@ -4,6 +4,7 @@
<#-- Template for adding a grant role, such as principal investigator, to a foaf:Persons -->
<#--Retrieve certain edit configuration information-->
<#assign editMode = editConfiguration.pageData.editMode />
+<#assign rangeUri = editConfiguration.pageData.rangeUri />
<#assign literalValues = editConfiguration.existingLiteralValues />
<#assign uriValues = editConfiguration.existingUriValues />
<#assign htmlForElements = editConfiguration.pageData.htmlForElements />
@@ -34,9 +35,9 @@ Set this flag on the input acUriReceiver where you would like this behavior to o
<#assign formHeading = "${i18n().investigator_entry_for}"/>
<#assign submitButtonLabel = "${i18n().investigator_capitalized}" />
-<#if editConfiguration.predicateUri?ends_with("hasPrincipalInvestigatorRole") >
+<#if rangeUri?contains("#PrincipalInvestigatorRole") >
<#assign formHeading = "${i18n().principal_investigator_entry_for}"/>
-<#elseif editConfiguration.predicateUri?ends_with("hasCo-PrincipalInvestigatorRole") >
+<#elseif rangeUri?contains("#CoPrincipalInvestigatorRole") >
<#assign formHeading = "${i18n().co_principal_investigator_entry_for}"/>
#if>
diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddGrantRoleToPersonGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddGrantRoleToPersonGenerator.java
index 47d4d76c..8a8bfc08 100644
--- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddGrantRoleToPersonGenerator.java
+++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/AddGrantRoleToPersonGenerator.java
@@ -729,6 +729,7 @@ public class AddGrantRoleToPersonGenerator implements EditConfigurationGenerator
public void addFormSpecificData(EditConfigurationVTwo editConfiguration, VitroRequest vreq) {
HashMap formSpecificData = new HashMap();
formSpecificData.put("editMode", getEditMode(vreq).name().toLowerCase());
+ formSpecificData.put("rangeUri", getRangeUri(vreq));
//In this case, passing back a sparql query
formSpecificData.put("sparqlForAcFilter", getSparqlForAcFilter(vreq));
//Put in the fact that we require field
@@ -747,8 +748,10 @@ public class AddGrantRoleToPersonGenerator implements EditConfigurationGenerator
return query;
}
-
-
-
+ private String getRangeUri(VitroRequest vreq) {
+ String rangeUri = vreq.getParameter("rangeUri");
+
+ return rangeUri;
+ }
}
diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAwardOrHonorGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAwardOrHonorGenerator.java
index af2abc33..eec388d3 100644
--- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAwardOrHonorGenerator.java
+++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasAwardOrHonorGenerator.java
@@ -262,9 +262,8 @@ public class PersonHasAwardOrHonorGenerator extends VivoBaseGenerator implements
final static String existingOrgQuery =
"SELECT ?existingOrg WHERE { \n" +
- " ?awardReceipt <" + receiptOfPred + "> ?existingAward . \n" +
- " ?existingAward a <" + awardClass + "> . \n" +
- " ?existingAward<" + awardConferredByPred + "> ?existingOrg . \n" +
+ " ?awardReceipt <" + awardConferredByPred + "> ?existingOrg . \n" +
+ " ?existingOrg a <" + orgClass + "> . \n" +
" ?existingOrg <" + awardConferredPred + "> ?existingAward . }";
final static String awardReceiptLabelQuery =
@@ -281,7 +280,8 @@ public class PersonHasAwardOrHonorGenerator extends VivoBaseGenerator implements
final static String orgLabelQuery =
"SELECT ?existingOrgLabel WHERE { \n" +
- " ?award <" + awardConferredByPred + "> ?existingOrg . \n" +
+ " ?awardReceipt <" + awardConferredByPred + "> ?existingOrg . \n" +
+ " ?existingOrg a <" + orgClass + "> . \n" +
" ?existingOrg <" + label + "> ?existingOrgLabel . \n" +
"}";