diff --git a/src/main/java/edu/tamu/scholars/middleware/discovery/model/Relationship.java b/src/main/java/edu/tamu/scholars/middleware/discovery/model/Relationship.java index 6f4d8589d..9fd0c0820 100644 --- a/src/main/java/edu/tamu/scholars/middleware/discovery/model/Relationship.java +++ b/src/main/java/edu/tamu/scholars/middleware/discovery/model/Relationship.java @@ -191,13 +191,13 @@ public class Relationship extends Common { @Field @FieldType(type = "pdate") - @FieldSource(template = "relationship/dateTimeIntervalStart", predicate = "http://vivoweb.org/ontology/core#dateTime") - private String dateTimeIntervalStart; + @FieldSource(template = "relationship/startDateTime", predicate = "http://vivoweb.org/ontology/core#dateTime") + private String startDateTime; @Field @FieldType(type = "pdate") - @FieldSource(template = "relationship/dateTimeIntervalEnd", predicate = "http://vivoweb.org/ontology/core#dateTime") - private String dateTimeIntervalEnd; + @FieldSource(template = "relationship/endDateTime", predicate = "http://vivoweb.org/ontology/core#dateTime") + private String endDateTime; @Field @NestedObject @@ -486,20 +486,20 @@ public void setSupportedPublicationOrOtherWork(List supportedPublication this.supportedPublicationOrOtherWork = supportedPublicationOrOtherWork; } - public String getDateTimeIntervalStart() { - return dateTimeIntervalStart; + public String getStartDateTime() { + return startDateTime; } - public void setDateTimeIntervalStart(String dateTimeIntervalStart) { - this.dateTimeIntervalStart = dateTimeIntervalStart; + public void setStartDateTime(String startDateTime) { + this.startDateTime = startDateTime; } - public String getDateTimeIntervalEnd() { - return dateTimeIntervalEnd; + public String getEndDateTime() { + return endDateTime; } - public void setDateTimeIntervalEnd(String dateTimeIntervalEnd) { - this.dateTimeIntervalEnd = dateTimeIntervalEnd; + public void setEndDateTime(String endDateTime) { + this.endDateTime = endDateTime; } public List getSubjectAreas() { diff --git a/src/main/resources/defaults/discoveryViews.yml b/src/main/resources/defaults/discoveryViews.yml index 8f7b132df..ffbb90b9f 100644 --- a/src/main/resources/defaults/discoveryViews.yml +++ b/src/main/resources/defaults/discoveryViews.yml @@ -353,8 +353,8 @@ fields: - type - title - - dateTimeIntervalStart - - dateTimeIntervalEnd + - startDateTime + - endDateTime - awardedBy - contributors - contributors.role @@ -409,7 +409,7 @@ collapsed: true hidden: false - name: Year Start - field: dateTimeIntervalStart + field: startDateTime opKey: BETWEEN type: DATE_YEAR sort: COUNT @@ -418,7 +418,7 @@ collapsed: true hidden: false - name: Year End - field: dateTimeIntervalEnd + field: endDateTime opKey: BETWEEN type: DATE_YEAR sort: COUNT @@ -448,9 +448,9 @@ - columnHeader: Grant title valuePath: title - columnHeader: Grant date start - valuePath: dateTimeIntervalStart + valuePath: startDateTime - columnHeader: Grant date end - valuePath: dateTimeIntervalEnd + valuePath: endDateTime - columnHeader: Awarded by valuePath: awardedBy - columnHeader: Principal investigators diff --git a/src/main/resources/defaults/discoveryViews/grants/default.html b/src/main/resources/defaults/discoveryViews/grants/default.html index 84e5a73a6..bc41ff156 100644 --- a/src/main/resources/defaults/discoveryViews/grants/default.html +++ b/src/main/resources/defaults/discoveryViews/grants/default.html @@ -11,20 +11,20 @@
- {{#if dateTimeIntervalStart}} - {{#if dateTimeIntervalEnd}} + {{#if startDateTime}} + {{#if endDateTime}} Date: - {{toYear dateTimeIntervalStart}} + {{toYear startDateTime}} - - {{toYear dateTimeIntervalEnd}} + {{toYear endDateTime}} {{else}} Date: - {{toYear dateTimeIntervalStart}} + {{toYear startDateTime}} {{/if}} {{else}} - {{#if dateTimeIntervalEnd}} + {{#if endDateTime}} Date: - {{toYear dateTimeIntervalEnd}} + {{toYear endDateTime}} {{/if}} {{/if}}
diff --git a/src/main/resources/defaults/displayViews.yml b/src/main/resources/defaults/displayViews.yml index 6692e3905..4b9f88459 100644 --- a/src/main/resources/defaults/displayViews.yml +++ b/src/main/resources/defaults/displayViews.yml @@ -1103,22 +1103,18 @@ template: "defaults/displayViews/organizations/overview/abbreviation.html" field: abbreviation order: 2 - - name: date/time interval - template: "defaults/displayViews/organizations/overview/dateTimeInterval.html" - field: dateTimeInterval - order: 3 - name: sponsors award or honor paginated: true template: "defaults/displayViews/organizations/overview/sponsorsAwardOrHonor.html" field: sponsorsAwardOrHonor - order: 4 + order: 3 lazyReferences: - sponsorsAwardOrHonor - name: award or honor given paginated: true template: "defaults/displayViews/organizations/overview/awardOrHonorGiven.html" field: awardOrHonorGiven - order: 5 + order: 4 sort: - field: yearAwarded direction: DESC @@ -1128,17 +1124,17 @@ - name: awards and honors received template: "defaults/displayViews/organizations/overview/awardsAndHonorsReceived.html" field: awardsAndHonorsReceived - order: 6 + order: 5 lazyReferences: - awardsAndHonorsReceived - name: keywords template: "defaults/displayViews/organizations/overview/keywords.html" field: keywords - order: 7 + order: 6 - name: geographic focus template: "defaults/displayViews/organizations/overview/geographicFocus.html" field: geographicFocus - order: 8 + order: 7 - name: Affiliation sections: - name: organization for training @@ -1778,10 +1774,10 @@ order: 3 - name: date/time interval template: "defaults/displayViews/relationships/overview/dateTimeInterval.html" - field: dateTimeIntervalStart + field: startDateTime order: 4 requiredFields: - - dateTimeIntervalEnd + - endDateTime - name: year awarded template: "defaults/displayViews/relationships/overview/yearAwarded.html" field: yearAwarded diff --git a/src/main/resources/defaults/displayViews/organizations/overview/dateTimeInterval.html b/src/main/resources/defaults/displayViews/organizations/overview/dateTimeInterval.html deleted file mode 100644 index f2bc1035f..000000000 --- a/src/main/resources/defaults/displayViews/organizations/overview/dateTimeInterval.html +++ /dev/null @@ -1,15 +0,0 @@ -
- {{#if dateTimeIntervalStart}} - {{#if dateTimeIntervalEnd}} - {{toYear dateTimeIntervalStart}} - - - {{toYear dateTimeIntervalEnd}} - {{else}} - {{toYear dateTimeIntervalStart}} - {{/if}} - {{else}} - {{#if dateTimeIntervalEnd}} - {{toYear dateTimeIntervalEnd}} - {{/if}} - {{/if}} -
\ No newline at end of file diff --git a/src/main/resources/defaults/displayViews/relationships/overview/dateTimeInterval.html b/src/main/resources/defaults/displayViews/relationships/overview/dateTimeInterval.html index f2bc1035f..b82352e8b 100644 --- a/src/main/resources/defaults/displayViews/relationships/overview/dateTimeInterval.html +++ b/src/main/resources/defaults/displayViews/relationships/overview/dateTimeInterval.html @@ -1,15 +1,15 @@
- {{#if dateTimeIntervalStart}} - {{#if dateTimeIntervalEnd}} - {{toYear dateTimeIntervalStart}} + {{#if startDateTime}} + {{#if endDateTime}} + {{toYear startDateTime}} - - {{toYear dateTimeIntervalEnd}} + {{toYear endDateTime}} {{else}} - {{toYear dateTimeIntervalStart}} + {{toYear startDateTime}} {{/if}} {{else}} - {{#if dateTimeIntervalEnd}} - {{toYear dateTimeIntervalEnd}} + {{#if endDateTime}} + {{toYear endDateTime}} {{/if}} {{/if}} -
\ No newline at end of file +
diff --git a/src/main/resources/templates/sparql/relationship/dateTimeIntervalStart.sparql b/src/main/resources/templates/sparql/relationship/endDateTime.sparql similarity index 100% rename from src/main/resources/templates/sparql/relationship/dateTimeIntervalStart.sparql rename to src/main/resources/templates/sparql/relationship/endDateTime.sparql diff --git a/src/main/resources/templates/sparql/relationship/dateTimeIntervalEnd.sparql b/src/main/resources/templates/sparql/relationship/startDateTime.sparql similarity index 100% rename from src/main/resources/templates/sparql/relationship/dateTimeIntervalEnd.sparql rename to src/main/resources/templates/sparql/relationship/startDateTime.sparql diff --git a/src/test/resources/mock/discovery/relationships/na971ae5b.json b/src/test/resources/mock/discovery/relationships/na971ae5b.json index e7d2a04c3..f77a15a23 100644 --- a/src/test/resources/mock/discovery/relationships/na971ae5b.json +++ b/src/test/resources/mock/discovery/relationships/na971ae5b.json @@ -22,7 +22,7 @@ "coPrincipalInvestigators": [ "Hagan-Burke, Shanna::nb2c12cd3" ], - "dateTimeIntervalStart": "2006-01-01T00:00:00", - "dateTimeIntervalEnd": "2011-01-01T00:00:00", + "startDateTime": "2006-01-01T00:00:00", + "endDateTime": "2011-01-01T00:00:00", "modTime": "2019-02-01T00:00:00" }