From 24e443207618f19a9574442b62ea0b74d8ad4aa1 Mon Sep 17 00:00:00 2001 From: rjy7 Date: Thu, 27 Jan 2011 20:11:19 +0000 Subject: [PATCH] NIHVIVO-1923 Modify orgType query so it only returns subclasses of foaf:Organization. Otherwise form breaks in edit mode. --- productMods/edit/forms/personHasEducationalTraining.jsp | 4 ++++ productMods/edit/forms/personHasPositionHistory.jsp | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/productMods/edit/forms/personHasEducationalTraining.jsp b/productMods/edit/forms/personHasEducationalTraining.jsp index 86c3aa96..37b5075c 100644 --- a/productMods/edit/forms/personHasEducationalTraining.jsp +++ b/productMods/edit/forms/personHasEducationalTraining.jsp @@ -192,10 +192,14 @@ core:dateTimePrecision (DateTimeValue : DateTimeValuePrecision) } +<%-- Limit type to subclasses of foaf:Organization. Otherwise, sometimes owl:Thing or another +type is returned and we don't get a match to the select element options. --%> + PREFIX rdfs: <${rdfs}> SELECT ?existingOrgType WHERE { ?edTraining <${trainingAtOrg}> ?existingOrg . ?existingOrg a ?existingOrgType . + ?existingOrgType rdfs:subClassOf <${orgClass}> . } diff --git a/productMods/edit/forms/personHasPositionHistory.jsp b/productMods/edit/forms/personHasPositionHistory.jsp index 79cb0e60..d49c19bb 100644 --- a/productMods/edit/forms/personHasPositionHistory.jsp +++ b/productMods/edit/forms/personHasPositionHistory.jsp @@ -152,11 +152,15 @@ } - +<%-- Limit type to subclasses of foaf:Organization. Otherwise, sometimes owl:Thing or another +type is returned and we don't get a match to the select element options. --%> + + PREFIX rdfs: <${rdfs}> SELECT ?existingOrgType WHERE { ?position <${positionInOrgPred}> ?existingOrg . ?existingOrg a ?existingOrgType . - } + # ?existingOrgType rdfs:subClassOf <${orgClass}> . + }