NIHVIVO-3230: list view now displays the parent organization of the org that the position is in
This commit is contained in:
parent
9e71a78bd7
commit
490d5dedeb
2 changed files with 41 additions and 2 deletions
|
@ -15,10 +15,18 @@
|
||||||
?positionTitle
|
?positionTitle
|
||||||
?hrJobTitle
|
?hrJobTitle
|
||||||
?org ?orgName
|
?org ?orgName
|
||||||
|
?middleOrg ?middleOrgName
|
||||||
|
?outerOrg ?outerOrgName
|
||||||
?dateTimeStart ?dateTimeEnd WHERE {
|
?dateTimeStart ?dateTimeEnd WHERE {
|
||||||
?subject ?property ?position
|
?subject ?property ?position
|
||||||
OPTIONAL { ?position core:positionInOrganization ?org .
|
OPTIONAL { ?position core:positionInOrganization ?org .
|
||||||
?org rdfs:label ?orgName
|
?org rdfs:label ?orgName
|
||||||
|
OPTIONAL { ?org core:subOrganizationWithin ?middleOrg .
|
||||||
|
?middleOrg rdfs:label ?middleOrgName
|
||||||
|
OPTIONAL { ?middleOrg core:subOrganizationWithin ?outerOrg .
|
||||||
|
?outerOrg rdfs:label ?outerOrgName
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
OPTIONAL { ?position rdfs:label ?positionTitle }
|
OPTIONAL { ?position rdfs:label ?positionTitle }
|
||||||
OPTIONAL { ?position core:hrJobTitle ?hrJobTitle }
|
OPTIONAL { ?position core:hrJobTitle ?hrJobTitle }
|
||||||
|
@ -62,7 +70,11 @@
|
||||||
CONSTRUCT {
|
CONSTRUCT {
|
||||||
?subject ?property ?position .
|
?subject ?property ?position .
|
||||||
?position ?positionProperty ?positionValue .
|
?position ?positionProperty ?positionValue .
|
||||||
?org rdfs:label ?orgName
|
?org rdfs:label ?orgName .
|
||||||
|
?org core:subOrganizationWithin ?middleOrg .
|
||||||
|
?middleOrg rdfs:label ?middleOrgName .
|
||||||
|
?middleOrg core:subOrganizationWithin ?outerOrg .
|
||||||
|
?outerOrg rdfs:label ?outerOrgName
|
||||||
} WHERE {
|
} WHERE {
|
||||||
{
|
{
|
||||||
?subject ?property ?position
|
?subject ?property ?position
|
||||||
|
@ -73,6 +85,26 @@
|
||||||
?subject ?property ?position .
|
?subject ?property ?position .
|
||||||
?position core:positionInOrganization ?org .
|
?position core:positionInOrganization ?org .
|
||||||
?org rdfs:label ?orgName
|
?org rdfs:label ?orgName
|
||||||
|
} UNION {
|
||||||
|
?subject ?property ?position .
|
||||||
|
?position core:positionInOrganization ?org .
|
||||||
|
?org core:subOrganizationWithin ?middleOrg
|
||||||
|
} UNION {
|
||||||
|
?subject ?property ?position .
|
||||||
|
?position core:positionInOrganization ?org .
|
||||||
|
?org core:subOrganizationWithin ?middleOrg .
|
||||||
|
?middleOrg rdfs:label ?middleOrgName
|
||||||
|
} UNION {
|
||||||
|
?subject ?property ?position .
|
||||||
|
?position core:positionInOrganization ?org .
|
||||||
|
?org core:subOrganizationWithin ?middleOrg .
|
||||||
|
?middleOrg core:subOrganizationWithin ?outerOrg
|
||||||
|
} UNION {
|
||||||
|
?subject ?property ?position .
|
||||||
|
?position core:positionInOrganization ?org .
|
||||||
|
?org core:subOrganizationWithin ?middleOrg .
|
||||||
|
?middleOrg core:subOrganizationWithin ?outerOrg .
|
||||||
|
?outerOrg rdfs:label ?outerOrgName
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</query-construct>
|
</query-construct>
|
||||||
|
|
|
@ -23,7 +23,14 @@
|
||||||
<a href="${profileUrl(statement.position)}">missing organization</a>
|
<a href="${profileUrl(statement.position)}">missing organization</a>
|
||||||
</#if>
|
</#if>
|
||||||
</#local>
|
</#local>
|
||||||
|
<#-- The sparql query returns both the org's parent (middleOrg) and grandparent (outerOrg).
|
||||||
|
For now, we are only displaying the parent in the list view. -->
|
||||||
|
<#local middleOrganization>
|
||||||
|
<#if statement.middleOrg??>
|
||||||
|
<a href="${profileUrl(statement.middleOrg)}">${statement.middleOrgName!}</a>
|
||||||
|
</#if>
|
||||||
|
</#local>
|
||||||
|
|
||||||
<@s.join [ linkedIndividual, statement.positionTitle!statement.hrJobTitle! ] /> <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
|
<@s.join [ linkedIndividual, statement.positionTitle!statement.hrJobTitle!, middleOrganization! ] /> <@dt.yearIntervalSpan "${statement.dateTimeStart!}" "${statement.dateTimeEnd!}" />
|
||||||
|
|
||||||
</#macro>
|
</#macro>
|
Loading…
Add table
Reference in a new issue