@import org.silkframework.rule.vocab.VocabularyProperty @import org.silkframework.config.Prefixes @* * Shows details information for a vocabulary property. *@ @(name: String, property: Option[VocabularyProperty], prefixes: Prefixes = Prefixes.default) @property match { case Some(prop) => { @renderProperty(prop) } case None => { Property @name not found in target vocabularies. } } @renderProperty(prop: VocabularyProperty) = {
@renderPropertyName(prop) (@renderPropertyDomain(prop), @renderPropertyRange(prop))
@renderPropertyDescription(prop)
} @renderPropertyName(prop: VocabularyProperty) = { @prop.info.label match { case Some(label) => { @label } case None => { no label } } } @renderPropertyDescription(prop: VocabularyProperty) = { @prop.info.description match { case Some(desc) => { @desc } case None => { no description } } } @renderPropertyDomain(prop: VocabularyProperty) = { @prop.domain match { case Some(domain) => { @prefixes.shorten(domain.info.uri) } case None => { (unspecified) } } } @renderPropertyRange(prop: VocabularyProperty) = { @prop.range match { case Some(range) => { @prefixes.shorten(range.info.uri) } case None => { (unspecified) } } }