
templates.view-standardsregistry_docs-macros.ftl Maven / Gradle / Ivy
The newest version!
<#macro renderTags tags>
<#if tags?has_content>
<#list tags as tag>
<#if tag.object.iri?has_content>
${tag.object.label?html}
<#else>
${tag.object.label?html}
#if>
#list>
#if>
#macro>
<#macro renderPackage package>
${package.simpleName?html} (${package.name?html})
<#if package.description?has_content>${package.description}#if>
<@renderTags tags=package.tags/>
<#-- Subpackages -->
<#if package.subPackages?has_content>
Packages
<#list package.subPackages as subPackage>
- ${subPackage.name?html}
#list>
#if>
<#-- Entities index -->
<#if package.entityMetaDatas?has_content>
Entities
<#list package.entityMetaDatas as entity>
- ${entity.label?html}
#list>
back to top
<#-- Entities -->
<#list package.entityMetaDatas as entity>
${entity.label?html}<#if entity.extends?has_content> extends ${entity.extends.label?html}#if><#if entity.abstract> (abstract)#if>
<#if entity.description?has_content>${entity.description?html}<#else>No description available#if>
<@renderTags tags=tagService.getTagsForEntity(entity)/>
<#-- Entity attributes -->
Attribute
Default
Type
Constraints
Description
<#assign depth = []/>
<#list entity.attributes as attribute>
<@renderAttribute attribute entity depth/>
#list>
back to entities
#list>
back to top
<#else>
This package does not contain entities
#if>
<#if package.subPackages?has_content>
<#list package.subPackages as subPackage>
<@renderPackage subPackage/>
#list>
#if>
#macro>
<#macro renderAttribute attribute entity depth>
<#assign nextDepth = depth + ["x"]/>
<#assign dataType=attribute.dataType.enumType>
<#list depth as lvl> #list>${attribute.label?html}<#if entity.idAttribute?? && entity.idAttribute.name == attribute.name> (id attribute)#if><#if entity.labelAttribute?? && entity.labelAttribute.name == attribute.name> (label attribute)#if><#list entity.lookupAttributes as lookupAttribute><#if lookupAttribute.name == attribute.name> (lookup attribute)<#break>#if>#list>
<#if attribute.defaultValue?has_content>${attribute.defaultValue?html}#if>
${dataType?html}<#if dataType == "CATEGORICAL" || dataType == "CATEGORICAL_MREF" || dataType == "MREF" || dataType == "XREF"> (${attribute.refEntity.label?html})#if>
<#assign constraints = []>
<#if attribute.nillable><#assign constraints = constraints + [ "nillable" ] />#if>
<#if attribute.readonly><#assign constraints = constraints + [ "read-only" ] />#if>
<#if attribute.unique><#assign constraints = constraints + [ "unique" ] />#if>
<#if !attribute.visible><#assign constraints = constraints + [ "hidden" ] />#if>
<#if attribute.auto><#assign constraints = constraints + [ "auto" ] />#if>
<#if attribute.aggregateable><#assign constraints = constraints + [ "aggregates" ] />#if>
<#if attribute.range?has_content>
<#assign range = "range [">
<#if attribute.range.min?has_content>
<#assign range = range + "from " + attribute.range.min>
#if>
<#if attribute.range.max?has_content>
<#assign range = range + " to " + attribute.range.max>
#if>
<#assign range = range + "]">
<#assign constraints = constraints + [ range ] />
#if>
<#list constraints as constraint>${constraint?html}<#if constraint_has_next>, #if>#list>
<#if attribute.description?has_content>${attribute.description?html}#if>
<#if attribute.dataType.enumType == "COMPOUND">
<#list attribute.attributeParts as attributePart>
<@renderAttribute attributePart entity nextDepth/>
#list>
#if>
<#assign nextDepth = depth/>
#macro>
<#macro createPackageListItem package>
${package.name?html}
<#if package.subPackages?has_content>
<#list package.subPackages as subPackage>
<@createPackageListItem subPackage/>
#list>
#if>
#macro>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy