From f362f7ce2d98950783f83ed6f8a096913a133f80 Mon Sep 17 00:00:00 2001 From: tworrall Date: Thu, 17 Nov 2011 21:00:57 +0000 Subject: [PATCH] hasAttendeeRole now uses role list view; removed unnecessary brackets from selects --- .../app/loadedAtStartup/vivoListViewConfig.rdf | 7 ++++++- .../PersonHasPositionHistoryGenerator.java | 18 ++++++++++-------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/productMods/WEB-INF/ontologies/app/loadedAtStartup/vivoListViewConfig.rdf b/productMods/WEB-INF/ontologies/app/loadedAtStartup/vivoListViewConfig.rdf index 04c8fbd1..025efdf9 100644 --- a/productMods/WEB-INF/ontologies/app/loadedAtStartup/vivoListViewConfig.rdf +++ b/productMods/WEB-INF/ontologies/app/loadedAtStartup/vivoListViewConfig.rdf @@ -60,6 +60,7 @@ ** core:hasResearcherRole ** core:hasTeacherRole ** core:hasOrganizerRole + ** core:hasAttendeeRole these three are an exception, and share a separate config ** core:hasInvestigatorRole ** core:hasCo-PrincipalInvestigatorRole @@ -97,7 +98,11 @@ listViewConfig-hasRole.xml - + + + listViewConfig-hasRole.xml + + diff --git a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasPositionHistoryGenerator.java b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasPositionHistoryGenerator.java index 3f581630..28fb3df9 100644 --- a/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasPositionHistoryGenerator.java +++ b/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/configuration/generators/PersonHasPositionHistoryGenerator.java @@ -154,10 +154,12 @@ public class PersonHasPositionHistoryGenerator extends VivoBaseGenerator impleme ) ); - conf.addValidator(new DateTimeIntervalValidationVTwo("startField","endField")); - //Adding additional data, specifically edit mode - addFormSpecificData(conf, vreq); - return conf; + conf.addValidator(new DateTimeIntervalValidationVTwo("startField","endField")); + + //Adding additional data, specifically edit mode + addFormSpecificData(conf, vreq); + + return conf; } final static String n3ForNewPosition = @@ -240,12 +242,12 @@ public class PersonHasPositionHistoryGenerator extends VivoBaseGenerator impleme final static String existingIntervalNodeQuery = "SELECT ?existingIntervalNode WHERE { \n" + - " ?position <${positionToInterval}> ?existingIntervalNode . \n" + + " ?position <" + positionToInterval + "> ?existingIntervalNode . \n" + " ?existingIntervalNode a <" + intervalType + "> . }"; final static String existingStartNodeQuery = "SELECT ?existingStartNode WHERE { \n" + - " ?position <${positionToInterval}> ?intervalNode . \n" + + " ?position <" + positionToInterval + "> ?intervalNode . \n" + " ?intervalNode a <" + intervalType + "> . \n" + " ?intervalNode <" + intervalToStart + "> ?existingStartNode . \n" + " ?existingStartNode a <" + dateTimeValueType + "> .} "; @@ -262,8 +264,8 @@ public class PersonHasPositionHistoryGenerator extends VivoBaseGenerator impleme " ?position <" + positionToInterval + "> ?intervalNode . \n" + " ?intervalNode a <" + intervalType + "> . \n" + " ?intervalNode <" + intervalToStart + "> ?startNode . \n" + - " ?startNode a <${dateTimeValueType}> . \n" + - " ?startNode <${dateTimePrecision}> ?existingStartPrecision . }"; + " ?startNode a <" + dateTimeValueType + "> . \n" + + " ?startNode <" + dateTimePrecision + "> ?existingStartPrecision . }"; final static String existingEndPrecisionQuery = "SELECT ?existingEndPrecision WHERE { \n" +