Working on context node update during incremental search update. NIHVIVO-2834
This commit is contained in:
parent
a978437a4d
commit
4653fd9e64
1 changed files with 34 additions and 8 deletions
|
@ -81,6 +81,9 @@ public class AdditionalURIsForContextNodes implements AdditionalURIsToIndex {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( log.isDebugEnabled() )
|
||||||
|
log.debug( "additional uris for " + uri + " are " + uriList);
|
||||||
|
|
||||||
return uriList;
|
return uriList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,18 +98,22 @@ public class AdditionalURIsForContextNodes implements AdditionalURIsToIndex {
|
||||||
+ " prefix bibo: <http://purl.org/ontology/bibo/> ";
|
+ " prefix bibo: <http://purl.org/ontology/bibo/> ";
|
||||||
|
|
||||||
static{
|
static{
|
||||||
|
|
||||||
|
// If a person changes then update
|
||||||
|
// organizations for positions
|
||||||
multiValuedQueriesForAgent.add(prefix +
|
multiValuedQueriesForAgent.add(prefix +
|
||||||
"SELECT " +
|
"SELECT " +
|
||||||
" (str(?f) as ?positionForPerson) (str(?i) as ?positionInOrganization) " +
|
" (str(?i) as ?positionInOrganization) " +
|
||||||
" WHERE {"
|
" WHERE {"
|
||||||
|
|
||||||
+ "?uri rdf:type foaf:Agent ; ?b ?c . "
|
+ "?uri rdf:type foaf:Agent ; ?b ?c . "
|
||||||
+ " ?c rdf:type core:Position . "
|
+ " ?c rdf:type core:Position . "
|
||||||
|
|
||||||
+ " OPTIONAL { ?c core:positionForPerson ?f . } . "
|
|
||||||
+ " OPTIONAL { ?c core:positionInOrganization ?i . } . "
|
+ " OPTIONAL { ?c core:positionInOrganization ?i . } . "
|
||||||
+ " }");
|
+ " }");
|
||||||
|
|
||||||
|
// If a person changes then update
|
||||||
|
// advisee, linkedAuthor and informationResource
|
||||||
multiValuedQueriesForAgent.add(prefix +
|
multiValuedQueriesForAgent.add(prefix +
|
||||||
"SELECT (str(?d) as ?advisee) " +
|
"SELECT (str(?d) as ?advisee) " +
|
||||||
" (str(?f) as ?linkedAuthor) (str(?h) as ?linkedInformationResource) WHERE {"
|
" (str(?f) as ?linkedAuthor) (str(?h) as ?linkedInformationResource) WHERE {"
|
||||||
|
@ -120,23 +127,30 @@ public class AdditionalURIsForContextNodes implements AdditionalURIsToIndex {
|
||||||
|
|
||||||
+ " } ");
|
+ " } ");
|
||||||
|
|
||||||
|
// If a person changes then update
|
||||||
|
// award giver
|
||||||
multiValuedQueriesForAgent.add(prefix +
|
multiValuedQueriesForAgent.add(prefix +
|
||||||
"SELECT (str(?d) as ?awardConferredBy) (str(?e) as ?awardOrHonorFor) " +
|
"SELECT (str(?d) as ?awardConferredBy) " +
|
||||||
"WHERE {"
|
"WHERE {"
|
||||||
|
|
||||||
+ "?uri rdf:type foaf:Agent ; ?b ?c . "
|
+ "?uri rdf:type foaf:Agent ; ?b ?c . "
|
||||||
+ " ?c rdf:type core:AwardReceipt . "
|
+ " ?c rdf:type core:AwardReceipt . "
|
||||||
|
|
||||||
+ " OPTIONAL { ?c core:awardConferredBy ?d . } . "
|
+ " OPTIONAL { ?c core:awardConferredBy ?d . } . "
|
||||||
+ " OPTIONAL { ?c core:awardOrHonorFor ?e . } ."
|
|
||||||
+ " }");
|
+ " }");
|
||||||
|
|
||||||
|
// If a person changes then update
|
||||||
|
// organization for role
|
||||||
multiValuedQueriesForAgent.add(prefix +
|
multiValuedQueriesForAgent.add(prefix +
|
||||||
"SELECT (str(?Organization) as ?organization) WHERE {"
|
"SELECT (str(?Organization) as ?organization) " +
|
||||||
|
"WHERE {"
|
||||||
|
|
||||||
+ "?uri rdf:type foaf:Agent ; ?b ?c . "
|
+ "?uri rdf:type foaf:Agent ; ?b ?c . "
|
||||||
+ " ?c rdf:type core:Role ; core:roleIn ?Organization ."
|
+ " ?c rdf:type core:Role ; core:roleIn ?Organization ."
|
||||||
+ " }");
|
+ " }");
|
||||||
|
|
||||||
|
// If a person changes then update
|
||||||
|
// organization in educational training
|
||||||
multiValuedQueriesForAgent.add(prefix +
|
multiValuedQueriesForAgent.add(prefix +
|
||||||
"SELECT " +
|
"SELECT " +
|
||||||
"(str(?e) as ?trainingAtOrganization) WHERE {"
|
"(str(?e) as ?trainingAtOrganization) WHERE {"
|
||||||
|
@ -144,10 +158,22 @@ public class AdditionalURIsForContextNodes implements AdditionalURIsToIndex {
|
||||||
+ " ?uri rdf:type foaf:Agent ; ?b ?c . "
|
+ " ?uri rdf:type foaf:Agent ; ?b ?c . "
|
||||||
+ " ?c rdf:type core:EducationalTraining . "
|
+ " ?c rdf:type core:EducationalTraining . "
|
||||||
|
|
||||||
+ " OPTIONAL { ?c core:trainingAtOrganization ?e . } . "
|
+ " OPTIONAL { ?c core:trainingAtOrganization ?e . } . "
|
||||||
|
|
||||||
+"}");
|
+"}");
|
||||||
|
|
||||||
|
// If an organizatoin changes then update
|
||||||
|
// people in head of relations
|
||||||
|
multiValuedQueriesForAgent.add(
|
||||||
|
" # for organization, get leader \n" +
|
||||||
|
prefix +
|
||||||
|
"SELECT " +
|
||||||
|
"(str(?e) as ?LeaderPerson ) WHERE {"
|
||||||
|
|
||||||
|
+ " ?uri rdf:type foaf:Agent ; ?b ?c . "
|
||||||
|
+ " ?c rdf:type core:LeaderRole . "
|
||||||
|
|
||||||
|
+ " OPTIONAL { ?c core:leaderRoleOf ?e . } . "
|
||||||
|
+"}");
|
||||||
}
|
}
|
||||||
|
|
||||||
//multivalued query for core:InformationResource
|
//multivalued query for core:InformationResource
|
||||||
|
|
Loading…
Add table
Reference in a new issue