Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
home.templates.selfsub-dataset.selfSubToDataset.vm Maven / Gradle / Ivy
#macro(EscapeForJson $value)
#set($escaped = $value.replaceAll("\"","\\\"").replaceAll("\n","\\n"))$escaped#end
#macro(Collaborators $map $key $order)
#set($queryKey = "person.${key}")
#set ($value = $map.get($queryKey))
#if ("$!value" != "")
"dc:contributor.locrel:clb.${order}.foaf:Agent.${key}": "#EscapeForJson($value)",
#end
#end
#macro(Grants $map $key $order)
#set($queryKey = "${key}")
#set ($value = $map.get($queryKey))
#if ("$!value" != "")
"foaf:fundedBy.vivo:Grant.${order}.${key}": "#EscapeForJson($value)",
#end
#end
#macro(FundingSources $map $key $order)
#set($queryKey = "${key}")
#set ($value = $map.get($queryKey))
#if ("$!value" != "")
"foaf:fundedBy.foaf:Agent.${order}.${key}": "#EscapeForJson($value)",
#end
#end
#macro(multiValuedProperty $map $prefix $key $order)
#set($queryKey = "${key}")
#set ($value = $map.get($queryKey))
"${prefix}.${order}.${key}": "#EscapeForJson($value)",
#end
#macro(multiValuedMappedProperty $map $prefix $key $suffix $order)
#set($queryKey = "${key}")
#set ($value = $map.get($queryKey))
#if ("$!value" != "")
"${prefix}.${order}.${suffix}": "#EscapeForJson($value)",
#end
#end
#macro(copyCodes $map $key $order $type)
#set ($value = $map.get($key))
#if ("$!value" != "")
"dc:subject.anzsrc:${type}.${order}.${key}": "#EscapeForJson($value)",
#end
#end
#macro(mapTo $from $to)
#set($v = $util.get($item, $from))
#if ($v) "$to": "#EscapeForJson($v)",
#end
#end
{
#mapTo('dc:title', 'title')
"viewId": "default",
"packageType": "dataset",
"redbox:newForm": "$util.get($item, 'redbox:newForm')",
"redbox:formVersion": "$util.get($item, 'redbox:formVersion')",
#mapTo('dc:title', 'dc:title'),
#foreach( $key in ["dc:type.rdf:PlainLiteral","dc:type.skos:prefLabel","dc:created",
"dc:modified","dc:language.dc:identifier","dc:language.skos:prefLabel",
"dc:coverage.vivo:DateTimeInterval.vivo:start","dc:coverage.vivo:DateTimeInterval.vivo:end",
"dc:coverage.redbox:timePeriod"
])
#set($v = $util.get($item, $key))
#if ($v) "$key": "#EscapeForJson($v)",
#else
"$key": "",
#end
#end
#set($cList = $util.getList($item, "dc:description"))
#set($order = 1)
#if ($cList.size() > 0)
#foreach($key in $cList.keySet())
#set($slot = $cList.get($key))
#multiValuedProperty($slot "dc:description" "text" $order)
#multiValuedProperty($slot "dc:description" "type" $order)
#multiValuedProperty($slot "dc:description" "shadow" $order)
#set($order = $order + 1)
#end
#end
#set($cList = $util.getList($item, "dc:coverage.vivo:GeographicLocation"))
#set($order = 1)
#if ($cList.size() > 0)
#foreach($key in $cList.keySet())
#set($slot = $cList.get($key))
#multiValuedProperty($slot "dc:coverage.vivo:GeographicLocation" "dc:type" $order)
#multiValuedProperty($slot "dc:coverage.vivo:GeographicLocation" "redbox:wktRaw" $order)
#multiValuedProperty($slot "dc:coverage.vivo:GeographicLocation" "rdf:PlainLiteral" $order)
#multiValuedProperty($slot "dc:coverage.vivo:GeographicLocation" "geo:long" $order)
#multiValuedProperty($slot "dc:coverage.vivo:GeographicLocation" "geo:lat" $order)
#multiValuedProperty($slot "dc:coverage.vivo:GeographicLocation" "dc:identifier" $order)
#set($order = $order + 1)
#end
#end
#set($cList = $util.getList($item, "dc:relation.bibo:Website"))
#set($order = 1)
#if ($cList.size() > 0)
#foreach($key in $cList.keySet())
#set($slot = $cList.get($key))
#multiValuedProperty($slot "dc:relation.bibo:Website" "dc:identifier" $order)
#multiValuedProperty($slot "dc:relation.bibo:Website" "dc:title" $order)
#multiValuedProperty($slot "dc:relation.bibo:Website" "skos:note" $order)
#set($order = $order + 1)
#end
#end
#set($cList = $util.getList($item, "dc:relation.vivo:Dataset"))
#set($order = 1)
#if ($cList.size() > 0)
#foreach($key in $cList.keySet())
#set($slot = $cList.get($key))
#multiValuedProperty($slot "dc:relation.vivo:Dataset" "dc:title" $order)
#multiValuedProperty($slot "dc:relation.vivo:Dataset" "skos:note" $order)
#multiValuedProperty($slot "dc:relation.vivo:Dataset" "redbox:origin" $order)
#multiValuedProperty($slot "dc:relation.vivo:Dataset" "redbox:publish" $order)
#multiValuedProperty($slot "dc:relation.vivo:Dataset" "dc:identifier" $order)
#set($order = $order + 1)
#end
#end
#set($cList = $util.getList($item, "dc:relation.vivo:Service"))
#set($order = 1)
#if ($cList.size() > 0)
#foreach($key in $cList.keySet())
#set($slot = $cList.get($key))
#multiValuedProperty($slot "dc:relation.vivo:Service" "dc:identifier" $order)
#multiValuedProperty($slot "dc:relation.vivo:Service" "vivo:Relationship.rdf:PlainLiteral" $order)
#multiValuedProperty($slot "dc:relation.vivo:Service" "vivo:Relationship.skos:prefLabel" $order)
#multiValuedProperty($slot "dc:relation.vivo:Service" "dc:title" $order)
#multiValuedProperty($slot "dc:relation.vivo:Service" "skos:note" $order)
#set($order = $order + 1)
#end
#end
#mapTo('dc:creator.foaf:Person.foaf:title', 'dc:creator.foaf:Person.1.foaf:title')
#mapTo('dc:creator.foaf:Person.foaf:givenName', 'dc:creator.foaf:Person.1.foaf:givenName')
#mapTo('dc:creator.foaf:Person.foaf:familyName', 'dc:creator.foaf:Person.1.foaf:familyName')
#mapTo('dc:creator.foaf:Person.dc:identifier', 'dc:creator.foaf:Person.1.dc:identifier')
"dc:creator.foaf:Person.1.foaf:name": "#EscapeForJson($ciFamilyName), #EscapeForJson($ciGivenName)",
"dc:creator.foaf:Person.1.redbox:isPrimaryInvestigator": "on",
#set($cList = $util.getList($item, "dc:contributor.locrel:clb"))
#set($order = 2)
#if ($cList.size() > 0)
#foreach($key in $cList.keySet())
#set($slot = $cList.get($key))
#multiValuedMappedProperty($slot "dc:creator.foaf:Person" "foaf:Agent.foaf:title" "foaf:title" $order)
#multiValuedMappedProperty($slot "dc:creator.foaf:Person" "foaf:Agent.foaf:givenName" "foaf:givenName" $order)
#multiValuedMappedProperty($slot "dc:creator.foaf:Person" "foaf:Agent.foaf:familyName" "foaf:familyName" $order)
#multiValuedMappedProperty($slot "dc:creator.foaf:Person" "foaf:Agent.dc:identifier" "dc:identifier" $order)
#set($familyNameValue = $slot.get("foaf:Agent.foaf:familyName"))
#set($givenNameValue = $slot.get("foaf:Agent.foaf:givenName"))
#if ("$!familyNameValue" != "")
"dc:creator.foaf:Person.${order}.foaf:name": "#EscapeForJson($familyNameValue), #EscapeForJson($givenNameValue)",
#end
#set($order = $order + 1)
#end
#end
#mapTo('swrc:supervisor.foaf:Person.foaf:title', 'swrc:supervisor.foaf:Person.1.foaf:title')
#mapTo('swrc:supervisor.foaf:Person.foaf:givenName', 'swrc:supervisor.foaf:Person.1.foaf:givenName')
#mapTo('swrc:supervisor.foaf:Person.foaf:familyName', 'swrc:supervisor.foaf:Person.1.foaf:familyName')
#mapTo('swrc:supervisor.foaf:Person.dc:identifier', 'swrc:supervisor.foaf:Person.1.dc:identifier')
#set($supFamilyName = $util.get($item, "swrc:supervisor.foaf:Person.foaf:familyName"))
#set($supGivenName = $util.get($item, "swrc:supervisor.foaf:Person.foaf:givenName"))
#if ("$!supFamilyName" != "")
"swrc:supervisor.foaf:Person.1.foaf:name": "#EscapeForJson($supFamilyName), #EscapeForJson($supGivenName)",
#end
#set($cList = $util.getList($item, "dc:subject.vivo:keyword"))
#set($order = 1)
#if ($cList.size() > 0)
#foreach($key in $cList.keySet())
#set($slot = $cList.get($key))
#multiValuedProperty($slot "dc:subject.vivo:keyword" "rdf:PlainLiteral" $order)
#set($order = $order + 1)
#end
#end
#set($cList = $util.getList($item, "bibo:Website"))
#set($order = 1)
#if ($cList.size() > 0)
#foreach($key in $cList.keySet())
#set($slot = $cList.get($key))
#multiValuedProperty($slot "bibo:Website" "dc:identifier" $order)
#set($order = $order + 1)
#end
#end
#mapTo('redbox:retentionPeriod.dc:date.prefLabel', 'redbox:retentionPeriod')
#set($cList = $util.getList($item, "foaf:fundedBy.foaf:Agent"))
#set($order = 1)
#if ($cList.size() > 0)
#foreach($key in $cList.keySet())
#set($slot = $cList.get($key))
#multiValuedProperty($slot "foaf:fundedBy.foaf:Agent" "skos:prefLabel" $order)
#multiValuedProperty($slot "foaf:fundedBy.foaf:Agent" "dc:identifier" $order)
#set($order = $order + 1)
#end
#end
#set($cList = $util.getList($item, "foaf:fundedBy.vivo:Grant"))
#set($order = 1)
#if ($cList.size() > 0)
#foreach($key in $cList.keySet())
#set($slot = $cList.get($key))
"foaf:fundedBy.vivo:Grant.${order}.internalGrant": "",
#multiValuedProperty($slot "foaf:fundedBy.vivo:Grant" "redbox:grantNumber" $order)
#multiValuedProperty($slot "foaf:fundedBy.vivo:Grant" "dc:identifier" $order)
#multiValuedProperty($slot "foaf:fundedBy.vivo:Grant" "skos:prefLabel" $order)
#set($order = $order + 1)
#end
#end
#set($cList = $util.getList($item, "dc:subject.anzsrc:seo"))
#set($order = 1)
#if ($cList.size() > 0)
#foreach($key in $cList.keySet())
#set($slot = $cList.get($key))
#multiValuedProperty($slot "dc:subject.anzsrc:seo" "skos:prefLabel" $order)
#multiValuedProperty($slot "dc:subject.anzsrc:seo" "rdf:resource" $order)
#set($order = $order + 1)
#end
#end
#set($cList = $util.getList($item, "dc:subject.anzsrc:for"))
#set($order = 1)
#if ($cList.size() > 0)
#foreach($key in $cList.keySet())
#set($slot = $cList.get($key))
#multiValuedProperty($slot "dc:subject.anzsrc:for" "skos:prefLabel" $order)
#multiValuedProperty($slot "dc:subject.anzsrc:for" "rdf:resource" $order)
#set($order = $order + 1)
#end
#end
#foreach( $key in ["locrel:prc.foaf:Person.foaf:title","locrel:prc.foaf:Person.foaf:givenName","locrel:prc.foaf:Person.foaf:familyName",
"locrel:prc.foaf:Person.dc:identifier","locrel:prc.foaf:Person.foaf:email", "dc:license.skos:prefLabel" ,"dc:license.dc:identifier",
"dc:license.rdf:Alt.skos:prefLabel","dc:license.rdf:Alt.dc:identifier","dc:identifier.rdf:PlainLiteral","dc:identifier.dc:type.rdf:PlainLiteral",
"dc:identifier.dc:type.skos:prefLabel","dc:identifier.redbox:origin", "vivo:Location.vivo:GeographicLocation.gn:name",
"dc:extent","redbox:disposalDate","locrel:dtm.foaf:Agent.foaf:name","foaf:Organization.dc:identifier",
"foaf:Organization.skos:prefLabel","swrc:ResearchProject.dc:title","locrel:dpt.foaf:Person.foaf:name","dc:SizeOrDuration",
"dc:Policy","dc:accessRights.dc:RightsStatement.skos:prefLabel","dc:accessRights.dc:RightsStatement.dc:identifier","dc:accessRights.skos:prefLabel","dc:accessRightsType","dc:accessRights.dc:identifier",
"dc:subject.anzsrc:toa.rdf:resource","dc:subject.anzsrc:toa.skos:prefLabel"
])
#set($v = $util.get($item, $key))
#if ($v) "$key": "#EscapeForJson($v)",
#else
"$key": "",
#end
#end
#set($noteValue = $util.get($item, "skos:note.0.dc:description"))
#if ("$!noteValue" != "")
"skos:note.1.dc:description": "#EscapeForJson($noteValue)",
"skos:note.1.dc:created": "1970-01-01 00:00:00",
"skos:note.1.foaf:name": "Self-submission User"
#end
"xmlns:dc": "http://dublincore.org/documents/2008/01/14/dcmi-terms/",
"xmlns:foaf": "http://xmlns.com/foaf/spec/",
"xmlns:anzsrc": "http://purl.org/anzsrc/",
"metaList": [
"dc:title",
"dc:type.rdf:PlainLiteral",
"dc:type.skos:prefLabel",
"dc:created",
"dc:modified",
"dc:language.dc:identifier",
"dc:language.skos:prefLabel",
"redbox:formVersion",
"redbox:newForm",
"dc:coverage.vivo:DateTimeInterval.vivo:start",
"dc:coverage.vivo:DateTimeInterval.vivo:end",
"dc:coverage.redbox:timePeriod",
"dc:coverage.vivo:GeographicLocation.1.dc:type",
"dc:coverage.vivo:GeographicLocation.2.dc:type",
"dc:coverage.vivo:GeographicLocation.1.redbox:wktRaw",
"dc:coverage.vivo:GeographicLocation.2.redbox:wktRaw",
"dc:coverage.vivo:GeographicLocation.1.rdf:PlainLiteral",
"dc:coverage.vivo:GeographicLocation.2.rdf:PlainLiteral",
"dc:coverage.vivo:GeographicLocation.1.geo:long",
"dc:coverage.vivo:GeographicLocation.2.geo:long",
"dc:coverage.vivo:GeographicLocation.1.geo:lat",
"dc:coverage.vivo:GeographicLocation.2.geo:lat",
"dc:coverage.vivo:GeographicLocation.1.dc:identifier",
"dc:coverage.vivo:GeographicLocation.2.dc:identifier",
"dc:description.0.text",
"dc:description.0.type",
"dc:description.0.shadow",
"dc:relation.swrc:Publication.1.dc:identifier",
"dc:relation.swrc:Publication.1.dc:title",
"dc:relation.swrc:Publication.1.skos:note",
"dc:relation.bibo:Website.1.dc:identifier",
"dc:relation.bibo:Website.1.dc:title",
"dc:relation.bibo:Website.1.skos:note",
"dc:relation.vivo:Dataset.1.dc:identifier",
"dc:relation.vivo:Dataset.1.vivo:Relationship.rdf:PlainLiteral",
"dc:relation.vivo:Dataset.1.vivo:Relationship.skos:prefLabel",
"dc:relation.vivo:Dataset.1.dc:title",
"dc:relation.vivo:Dataset.1.skos:note",
"dc:relation.vivo:Dataset.1.redbox:origin",
"dc:relation.vivo:Dataset.1.redbox:publish",
"dc:relation.vivo:Service.1.dc:identifier",
"dc:relation.vivo:Service.1.vivo:Relationship.rdf:PlainLiteral",
"dc:relation.vivo:Service.1.vivo:Relationship.skos:prefLabel",
"dc:relation.vivo:Service.1.dc:title",
"dc:relation.vivo:Service.1.skos:note",
"dc:creator.foaf:Person.1.dc:identifier",
"dc:creator.foaf:Person.1.foaf:name",
"dc:creator.foaf:Person.1.foaf:title",
"dc:creator.foaf:Person.1.redbox:isCoPrimaryInvestigator",
"dc:creator.foaf:Person.1.redbox:isPrimaryInvestigator",
"dc:creator.foaf:Person.1.foaf:givenName",
"dc:creator.foaf:Person.1.foaf:familyName",
"dc:creator.foaf:Person.1.foaf:Organization.dc:identifier",
"dc:creator.foaf:Person.1.foaf:Organization.skos:prefLabel",
"locrel:prc.foaf:Person.dc:identifier",
"locrel:prc.foaf:Person.foaf:name",
"locrel:prc.foaf:Person.foaf:title",
"locrel:prc.foaf:Person.foaf:givenName",
"locrel:prc.foaf:Person.foaf:familyName",
"locrel:prc.foaf:Person.foaf:email",
"swrc:supervisor.foaf:Person.1.dc:identifier",
"swrc:supervisor.foaf:Person.1.foaf:name",
"swrc:supervisor.foaf:Person.1.foaf:title",
"swrc:supervisor.foaf:Person.1.foaf:givenName",
"swrc:supervisor.foaf:Person.1.foaf:familyName",
"dc:contributor.locrel:clb.1.foaf:Agent",
"dc:subject.anzsrc:seo.1.skos:prefLabel",
"dc:subject.anzsrc:seo.1.rdf:resource",
"dc:subject.anzsrc:for.1.skos:prefLabel",
"dc:subject.anzsrc:for.1.rdf:resource",
"dc:subject.vivo:keyword.1.rdf:PlainLiteral",
"dc:subject.anzsrc:toa.rdf:resource",
"dc:subject.anzsrc:toa.skos:prefLabel",
"dc:accessRights.skos:prefLabel",
"dc:accessRights.dc:identifier",
"dc:accessRights.dc:RightsStatement.skos:prefLabel",
"dc:accessRights.dc:RightsStatement.dc:identifier",
"dc:accessRightsType",
"dc:license.skos:prefLabel",
"dc:license.dc:identifier",
"dc:license.rdf:Alt.skos:prefLabel",
"dc:license.rdf:Alt.dc:identifier",
"dc:identifier.rdf:PlainLiteral",
"dc:identifier.dc:type.rdf:PlainLiteral",
"dc:identifier.dc:type.skos:prefLabel",
"dc:identifier.redbox:origin",
"bibo:Website.1.dc:identifier",
"vivo:Location.vivo:GeographicLocation.gn:name",
"vivo:Location.vivo:GeographicLocation.skos:note",
"redbox:retentionPeriod",
"dc:extent",
"redbox:disposalDate",
"locrel:own.foaf:Agent.1.foaf:name",
"locrel:dtm.foaf:Agent.foaf:name",
"foaf:Organization.dc:identifier",
"foaf:Organization.skos:prefLabel",
"foaf:fundedBy.foaf:Agent.1.skos:prefLabel",
"foaf:fundedBy.foaf:Agent.1.dc:identifier",
"foaf:fundedBy.vivo:Grant.1.redbox:internalGrant",
"foaf:fundedBy.vivo:Grant.1.redbox:grantNumber",
"foaf:fundedBy.vivo:Grant.1.dc:identifier",
"foaf:fundedBy.vivo:Grant.1.skos:prefLabel",
"swrc:ResearchProject.dc:title",
"locrel:dpt.foaf:Person.foaf:name",
"dc:SizeOrDuration",
"dc:Policy",
"redbox:ManagementPlan.redbox:hasPlan",
"redbox:ManagementPlan.skos:note",
"skos:note.1.dc:created",
"skos:note.1.foaf:name",
"skos:note.1.dc:description",
"dc:biblioGraphicCitation.skos:prefLabel",
"dc:biblioGraphicCitation.redbox:sendCitation",
"dc:biblioGraphicCitation.dc:hasPart.dc:identifier.skos:note",
"dc:biblioGraphicCitation.dc:hasPart.locrel:ctb.1.foaf:title",
"dc:biblioGraphicCitation.dc:hasPart.locrel:ctb.1.foaf:givenName",
"dc:biblioGraphicCitation.dc:hasPart.locrel:ctb.1.foaf:familyName",
"dc:biblioGraphicCitation.dc:hasPart.dc:title",
"dc:biblioGraphicCitation.dc:hasPart.dc:hasVersion.rdf:PlainLiteral",
"dc:biblioGraphicCitation.dc:hasPart.dc:publisher.rdf:PlainLiteral",
"dc:biblioGraphicCitation.dc:hasPart.vivo:Publisher.vivo:Location",
"dc:biblioGraphicCitation.dc:hasPart.dc:date.1.rdf:PlainLiteral",
"dc:biblioGraphicCitation.dc:hasPart.dc:date.2.rdf:PlainLiteral",
"dc:biblioGraphicCitation.dc:hasPart.dc:date.1.dc:type.rdf:PlainLiteral",
"dc:biblioGraphicCitation.dc:hasPart.dc:date.2.dc:type.rdf:PlainLiteral",
"dc:biblioGraphicCitation.dc:hasPart.dc:date.1.dc:type.skos:prefLabel",
"dc:biblioGraphicCitation.dc:hasPart.dc:date.2.dc:type.skos:prefLabel",
"dc:biblioGraphicCitation.dc:hasPart.bibo:Website.dc:identifier",
"dc:biblioGraphicCitation.dc:hasPart.skos:scopeNote",
"redbox:submissionProcess.redbox:submitted",
"redbox:submissionProcess.dc:date",
"redbox:submissionProcess.dc:description",
"redbox:submissionProcess.locrel:prc.foaf:Person.foaf:name",
"redbox:submissionProcess.locrel:prc.foaf:Person.foaf:phone",
"redbox:submissionProcess.locrel:prc.foaf:Person.foaf:mbox",
"redbox:submissionProcess.dc:title",
"redbox:submissionProcess.skos:note",
"redbox:embargo.redbox:isEmbargoed",
"redbox:embargo.dc:date",
"redbox:embargo.skos:note",
"dc:relation.redbox:TechnicalMetadata.1.dc:identifier",
"dc:relation.redbox:TechnicalMetadata.1.dc:title",
"dc:relation.redbox:TechnicalMetadata.1.dc:type",
"dc:relation.redbox:TechnicalMetadata.1.dc:conformsTo",
"xmlns:dc",
"xmlns:foaf",
"xmlns:anzsrc"
]
}