NIHVIVO-1863 Fix collated view of core:personInPosition and core:hasResearchArea
This commit is contained in:
parent
1f2edcc622
commit
1b2f34eadc
5 changed files with 31 additions and 23 deletions
|
@ -6,9 +6,13 @@ REQUIRED ELEMENTS
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
- list-view-config: root element
|
- list-view-config: root element
|
||||||
- query: the sparql query used to retrieve the data
|
- query-base: sparql query used to retrieve data for an uncollated property
|
||||||
|
- query-collated: sparql query used to retrieve data for a collated property
|
||||||
- template: the name of the template used to display a single property statement
|
- template: the name of the template used to display a single property statement
|
||||||
|
|
||||||
|
Note: both query-base and query-collated must be included to support the collation checkbox
|
||||||
|
on the back end Object Property Edit form.
|
||||||
|
|
||||||
|
|
||||||
-----------------
|
-----------------
|
||||||
OPTIONAL ELEMENTS
|
OPTIONAL ELEMENTS
|
||||||
|
|
|
@ -63,11 +63,12 @@ public class DataPropertyDaoJena extends PropertyDaoJena implements
|
||||||
* value does not contain all of these namespaces.
|
* value does not contain all of these namespaces.
|
||||||
*/
|
*/
|
||||||
protected static final List<String> EXCLUDED_NAMESPACES = Arrays.asList(
|
protected static final List<String> EXCLUDED_NAMESPACES = Arrays.asList(
|
||||||
|
// Don't need to exclude these, because they are not owl:DatatypeProperty
|
||||||
|
//"http://www.w3.org/1999/02/22-rdf-syntax-ns#",
|
||||||
|
//"http://www.w3.org/2000/01/rdf-schema#",
|
||||||
|
"http://www.w3.org/2002/07/owl#",
|
||||||
"http://vitro.mannlib.cornell.edu/ns/vitro/0.7#",
|
"http://vitro.mannlib.cornell.edu/ns/vitro/0.7#",
|
||||||
"http://vitro.mannlib.cornell.edu/ns/vitro/public#",
|
"http://vitro.mannlib.cornell.edu/ns/vitro/public#"
|
||||||
"http://www.w3.org/1999/02/22-rdf-syntax-ns#",
|
|
||||||
"http://www.w3.org/2000/01/rdf-schema#",
|
|
||||||
"http://www.w3.org/2002/07/owl#"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -55,8 +55,9 @@ public class ObjectPropertyDaoJena extends PropertyDaoJena implements ObjectProp
|
||||||
private static final Log log = LogFactory.getLog(ObjectPropertyDaoJena.class.getName());
|
private static final Log log = LogFactory.getLog(ObjectPropertyDaoJena.class.getName());
|
||||||
|
|
||||||
protected static final List<String> EXCLUDED_NAMESPACES = Arrays.asList(
|
protected static final List<String> EXCLUDED_NAMESPACES = Arrays.asList(
|
||||||
"http://www.w3.org/1999/02/22-rdf-syntax-ns#",
|
// Don't need to exclude these, because they are not owl:ObjectProperty
|
||||||
"http://www.w3.org/2000/01/rdf-schema#",
|
//"http://www.w3.org/1999/02/22-rdf-syntax-ns#",
|
||||||
|
//"http://www.w3.org/2000/01/rdf-schema#",
|
||||||
"http://www.w3.org/2002/07/owl#"
|
"http://www.w3.org/2002/07/owl#"
|
||||||
);
|
);
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -30,13 +30,8 @@
|
||||||
<#if property.type == "data">
|
<#if property.type == "data">
|
||||||
<@p.dataPropertyList property editable />
|
<@p.dataPropertyList property editable />
|
||||||
<#-- object property -->
|
<#-- object property -->
|
||||||
<#elseif property.collatedBySubclass> <#-- collated -->
|
<#else>
|
||||||
<@p.collatedObjectPropertyList property editable />
|
<@p.objectProperty property editable />
|
||||||
<#else> <#-- uncollated -->
|
|
||||||
<#-- We pass property.statements and property.template even though we are also
|
|
||||||
passing property, because objecctPropertyList can get other values, and
|
|
||||||
doesn't necessarily use property.statements and property.template -->
|
|
||||||
<@p.objectPropertyList property property.statements property.template editable />
|
|
||||||
</#if>
|
</#if>
|
||||||
</ul>
|
</ul>
|
||||||
</article> <!-- end property -->
|
</article> <!-- end property -->
|
||||||
|
|
|
@ -10,23 +10,30 @@
|
||||||
</#list>
|
</#list>
|
||||||
</#macro>
|
</#macro>
|
||||||
|
|
||||||
<#macro collatedObjectPropertyList property editable>
|
<#macro objectProperty property editable template="${property.template}">
|
||||||
|
<#if property.collatedBySubclass> <#-- collated -->
|
||||||
|
<@p.collatedObjectPropertyList property editable template />
|
||||||
|
<#else> <#-- uncollated -->
|
||||||
|
<#-- We pass property.statements and property.template even though we are also
|
||||||
|
passing property, because objecctPropertyList can get other values, and
|
||||||
|
doesn't necessarily use property.statements and property.template -->
|
||||||
|
<@p.objectPropertyList property editable property.statements template />
|
||||||
|
</#if>
|
||||||
|
</#macro>
|
||||||
|
|
||||||
|
<#macro collatedObjectPropertyList property editable template="${property.template}">
|
||||||
<#assign subclasses = property.subclasses>
|
<#assign subclasses = property.subclasses>
|
||||||
<#list subclasses?keys as subclass>
|
<#list subclasses?keys as subclass>
|
||||||
<li class="subclass">
|
<li class="subclass">
|
||||||
<h3>${subclass?lower_case}</h3>
|
<h3>${subclass?lower_case}</h3>
|
||||||
<ul class="subclass-property-list">
|
<ul class="subclass-property-list">
|
||||||
<@objectPropertyList property subclasses[subclass] property.template editable />
|
<@objectPropertyList property editable subclasses[subclass] template/>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</#list>
|
</#list>
|
||||||
</#macro>
|
</#macro>
|
||||||
|
|
||||||
<#macro simpleObjectPropertyList property editable>
|
<#macro objectPropertyList property editable statements="${property.statements}" template="${property.template}">
|
||||||
<@objectPropertyList property property.statements "propStatement-simple.ftl" editable />
|
|
||||||
</#macro>
|
|
||||||
|
|
||||||
<#macro objectPropertyList property statements template editable>
|
|
||||||
<#list statements as statement>
|
<#list statements as statement>
|
||||||
<@propertyListItem property statement editable><#include "${template}"></@propertyListItem>
|
<@propertyListItem property statement editable><#include "${template}"></@propertyListItem>
|
||||||
</#list>
|
</#list>
|
||||||
|
@ -97,13 +104,13 @@ name will be used as the label. -->
|
||||||
<@addLinkWithLabel primaryLink editable "Primary Web Page" />
|
<@addLinkWithLabel primaryLink editable "Primary Web Page" />
|
||||||
<#if primaryLink.statements?has_content> <#-- if there are any statements -->
|
<#if primaryLink.statements?has_content> <#-- if there are any statements -->
|
||||||
<ul class="${linkListClass}" id="links-primary" role="list">
|
<ul class="${linkListClass}" id="links-primary" role="list">
|
||||||
<@objectPropertyList primaryLink primaryLink.statements primaryLink.template editable />
|
<@objectPropertyList primaryLink editable />
|
||||||
</ul>
|
</ul>
|
||||||
</#if>
|
</#if>
|
||||||
<@addLinkWithLabel additionalLinks editable "Additional Web Pages" />
|
<@addLinkWithLabel additionalLinks editable "Additional Web Pages" />
|
||||||
<#if additionalLinks.statements?has_content> <#-- if there are any statements -->
|
<#if additionalLinks.statements?has_content> <#-- if there are any statements -->
|
||||||
<ul class="${linkListClass}" id="links-additional" role="list">
|
<ul class="${linkListClass}" id="links-additional" role="list">
|
||||||
<@objectPropertyList additionalLinks additionalLinks.statements additionalLinks.template editable />
|
<@objectPropertyList additionalLinks editable />
|
||||||
</ul>
|
</ul>
|
||||||
</#if>
|
</#if>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
Loading…
Add table
Reference in a new issue