updates for VIVO-413 and VIVO-409
This commit is contained in:
parent
f1abafa3aa
commit
e6bd71e6ba
5 changed files with 41 additions and 27 deletions
|
@ -29,11 +29,11 @@
|
|||
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 }
|
||||
?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 .
|
||||
|
@ -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 .
|
||||
|
|
|
@ -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 <collated> ?subclass </collated>
|
||||
?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
|
||||
}
|
||||
|
||||
|
||||
<collated>
|
||||
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
|
||||
}
|
||||
}
|
||||
</query-construct>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -729,6 +729,7 @@ public class AddGrantRoleToPersonGenerator implements EditConfigurationGenerator
|
|||
public void addFormSpecificData(EditConfigurationVTwo editConfiguration, VitroRequest vreq) {
|
||||
HashMap<String, Object> formSpecificData = new HashMap<String, Object>();
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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" +
|
||||
"}";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue