Skip to content

Commit

Permalink
Update process participant nested object (#236)
Browse files Browse the repository at this point in the history
* Update process participant nested object

* Update meta templates to not expect trailing forward slash in UI URL

* Remove other research activities from person display view
  • Loading branch information
William Welling authored Jan 11, 2023
1 parent a983825 commit bcbfbfc
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,14 @@ public class Process extends Common {
private List<String> inEventSeries;

@Indexed(type = "nested_tokenized_strings", copyTo = { "_text_", "participants_nested_facets" })
@NestedObject(properties = { @Reference(value = "participantRole", key = "role"), @Reference(value = "participantDateTimeIntervalStart", key = "startDate"), @Reference(value = "participantDateTimeIntervalEnd", key = "endDate") })
@NestedObject(properties = { @Reference(value = "participantId", key = "personId"), @Reference(value = "participantRole", key = "role"), @Reference(value = "participantDateTimeIntervalStart", key = "startDate"), @Reference(value = "participantDateTimeIntervalEnd", key = "endDate") })
@PropertySource(template = "process/participant", predicate = "http://www.w3.org/2000/01/rdf-schema#label")
private List<String> participants;

@Indexed(type = "nested_whole_strings", searchable = false)
@PropertySource(template = "process/participantId", predicate = "http://purl.obolibrary.org/obo/RO_0000052", parse = true)
private List<String> participantId;

@Indexed(type = "nested_whole_strings", searchable = false)
@PropertySource(template = "process/participantRole", predicate = "http://www.w3.org/2000/01/rdf-schema#label")
private List<String> participantRole;
Expand Down Expand Up @@ -317,6 +321,14 @@ public void setParticipants(List<String> participants) {
this.participants = participants;
}

public List<String> getParticipantId() {
return participantId;
}

public void setParticipantId(List<String> participantId) {
this.participantId = participantId;
}

public List<String> getParticipantRole() {
return participantRole;
}
Expand Down
6 changes: 1 addition & 5 deletions src/main/resources/defaults/displayViews.yml
Original file line number Diff line number Diff line change
Expand Up @@ -557,15 +557,11 @@
direction: DESC
date: true
template: "defaults/displayViews/persons/grantsAwards/researcherOn/default.html"
- name: other research activities
template: "defaults/displayViews/persons/grantsAwards/otherResearchActivities.html"
field: otherResearchActivities
order: 3
- name: awards and honors
paginated: true
template: "defaults/displayViews/persons/grantsAwards/awardsAndHonors.html"
field: awardsAndHonors
order: 4
order: 3
sort:
- field: yearAwarded
direction: DESC
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{uiUrl}}display/{{id}}
{{uiUrl}}/display/{{id}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{uiUrl}}display/{{id}}
{{uiUrl}}/display/{{id}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{uiUrl}}display/{{id}}
{{uiUrl}}/display/{{id}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{uiUrl}}display/{{id}}
{{uiUrl}}/display/{{id}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{uiUrl}}display/{{id}}
{{uiUrl}}/display/{{id}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{uiUrl}}display/{{id}}
{{uiUrl}}/display/{{id}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{uiUrl}}display/{{id}}
{{uiUrl}}/display/{{id}}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<span>
<a href="display/{{id}}">{{label}}</a> <span class="badge badge-light">{{role}}</span>
<a href="display/{{personId}}">{{label}}</a> <span class="badge badge-light">{{role}}</span>
{{#if startDate}}
{{#if endDate}}
<span>{{toYear startDate}}</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{uiUrl}}display/{{id}}
{{uiUrl}}/display/{{id}}
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ CONSTRUCT {
?participant obo:RO_0000052 ?person .
?person a foaf:Person .
?person rdfs:label ?label .
BIND( CONCAT( STR(?label), REPLACE(STR(?person), "(^.*/)", "::") ) AS ?labelWithId ) .
BIND( CONCAT( STR(?label), REPLACE(STR(?participant), "(^.*/)", "::") ) AS ?labelWithId ) .
}
12 changes: 12 additions & 0 deletions src/main/resources/templates/sparql/process/participantId.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

CONSTRUCT {
?participant obo:RO_0000052 ?participantIdWithId .
} WHERE {
<{{uri}}> obo:BFO_0000055 ?participant .
?participant obo:RO_0000052 ?person .
?person a foaf:Person .
BIND( CONCAT( STR(?person), REPLACE(STR(?participant), "(^.*/)", "::") ) AS ?participantIdWithId ) .
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ CONSTRUCT {
?participant rdfs:label ?label .
?participant obo:RO_0000052 ?person .
?person a foaf:Person .
BIND( CONCAT( STR(?label), REPLACE(STR(?person), "(^.*/)", "::") ) AS ?labelWithId ) .
BIND( CONCAT( STR(?label), REPLACE(STR(?participant), "(^.*/)", "::") ) AS ?labelWithId ) .
}

0 comments on commit bcbfbfc

Please sign in to comment.