NIHVIVO-1959 Added default value for property parameter in hasStatement(). Tried to put the onus of determining whether a property is available in the function. Work in progress.
This commit is contained in:
parent
86d3f8ff3d
commit
285400f3df
1 changed files with 7 additions and 1 deletions
|
@ -1,7 +1,13 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Function to test whether any statements exist with property as predicate -->
|
||||
<#function hasStatements property>
|
||||
<#function hasStatements property=false>
|
||||
<#-- First ensure that the property is defined
|
||||
(an unpopulated property while logged out is undefined) -->
|
||||
<#if property?is_boolean>
|
||||
<#return false>
|
||||
</#if>
|
||||
|
||||
<#if property.collatedBySubclass!false> <#-- collated -->
|
||||
<#if (property.subclasses?size > 0)>
|
||||
<#return true>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue