templates.rif_cs.vm Maven / Gradle / Ivy
The newest version!
#macro(showElementRifCS $tag $field $attr $label $anzsrc)
#set($valueMap = $util.getList($item, $field))
#foreach($key in $valueMap.keySet())
#set($value = $valueMap.get($key))
#if ($label != "")
#set($labelVal = $value.get($label))
#if ($anzsrc == "anzsrc")
#set($labelVal = $labelVal.split("-").get(0).trim())
#end
<$tag$attr>$labelVal$tag>
#else
<$tag$attr>$value.get($key)$tag>
#end
#end
#end
#macro(showRelatedInfo $field, $relatedInfoType, $identifierType)
#set($valueMap = $util.getList($item, $field))
#foreach($key in $valueMap.keySet())
#set($value = $valueMap.get($key))
$value.get($key)
#end
#end
#set($quote='"')
#set($lang = "xml:lang=${quote}$util.get($item, 'dc:language')${quote}")
$urlBase/detail/$oid
$urlBase/detail/$oid
#set($dateModified="")
#if ($util.get($item, "dc:modified") != "")
#set($dateModified = "dateModified=${quote}$util.getW3CDateTime($util.get($item, 'dc:modified'))$quote")
#end
#set($dateAccessioned = "")
#if ($util.get($item, "dc:created")!="")
#set($dateAccessioned = "dateAccessioned=${quote}$util.getW3CDateTime($util.get($item, 'dc:created'))$quote")
#end
$urlBase/detail/$oid
$util.get($item, "dc:title")
$util.get($item, "dc:description")
$util.get($item, "access_conditions")
$util.get($item, "restrictions")
##
##
##
## $util.get($item, "url")
##
##
##
#set($coverageFrom = "")
#if ($util.get($item, "dc:coverage.from") != "")
#set($coverageFrom = $util.getW3CDateTime($util.get($item, "dc:coverage.from")))
#end
#set($coverageTo = "")
#if ($util.get($item, "dc:coverage.to") != "")
#set($coverageTo = $util.getW3CDateTime($util.get($item, "dc:coverage.to")))
#end
$coverageFrom
$coverageTo
$util.get($item, "time_period")
##
## {co-ords}
##
#showElementRifCS("rif:subject" "dc:subject.keywords", " type=${quote}local${quote} $lang", "", "")
#showElementRifCS("rif:subject" "dc:subject.anzsrc:for", " type=${quote}anzsrc-for${quote} $lang", "skos:prefLabel", "anzsrc")
#showElementRifCS("rif:subject" "dc:subject.anzsrc:seo", " type=${quote}anzsrc-seo${quote} $lang", "skos:prefLabel", "anzsrc")
$util.get($item, "research_activity")
#showRelatedInfo("citations", "publication", "local")
$util.get($item, "website")
$util.get($item, "data_owner")
$util.get($item, "data_custodian")
$util.get($item, "primary_contact_name")