NIHVIVO-1923 Modify orgType query so it only returns subclasses of foaf:Organization. Otherwise form breaks in edit mode.

This commit is contained in:
rjy7 2011-01-27 20:11:19 +00:00
parent facea76266
commit 24e4432076
2 changed files with 10 additions and 2 deletions

View file

@ -192,10 +192,14 @@ core:dateTimePrecision (DateTimeValue : DateTimeValuePrecision)
} }
</v:jsonset> </v:jsonset>
<%-- 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. --%>
<v:jsonset var="orgTypeQuery" > <v:jsonset var="orgTypeQuery" >
PREFIX rdfs: <${rdfs}>
SELECT ?existingOrgType WHERE { SELECT ?existingOrgType WHERE {
?edTraining <${trainingAtOrg}> ?existingOrg . ?edTraining <${trainingAtOrg}> ?existingOrg .
?existingOrg a ?existingOrgType . ?existingOrg a ?existingOrgType .
?existingOrgType rdfs:subClassOf <${orgClass}> .
} }
</v:jsonset> </v:jsonset>

View file

@ -152,10 +152,14 @@
} }
</v:jsonset> </v:jsonset>
<%-- 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. --%>
<v:jsonset var="orgTypeQuery" > <v:jsonset var="orgTypeQuery" >
PREFIX rdfs: <${rdfs}>
SELECT ?existingOrgType WHERE { SELECT ?existingOrgType WHERE {
?position <${positionInOrgPred}> ?existingOrg . ?position <${positionInOrgPred}> ?existingOrg .
?existingOrg a ?existingOrgType . ?existingOrg a ?existingOrgType .
# ?existingOrgType rdfs:subClassOf <${orgClass}> .
} }
</v:jsonset> </v:jsonset>