diff --git a/config/pom.xml b/config/pom.xml index 940a0195..d4bd6349 100644 --- a/config/pom.xml +++ b/config/pom.xml @@ -68,7 +68,7 @@ com.googlecode.redbox-mint redbox-project - 1.10.1-SNAPSHOT + 1.10 ../parent/pom.xml diff --git a/config/src/main/config/home/templates/rif.vm b/config/src/main/config/home/templates/rif.vm index fe8a698f..766b1964 100644 --- a/config/src/main/config/home/templates/rif.vm +++ b/config/src/main/config/home/templates/rif.vm @@ -304,6 +304,18 @@ #end #end + + ### Free text support + #set($valueMap = $util.getList($item, "identifierText")) + #foreach($key in $valueMap.keySet()) + #set ($value = $valueMap.get($key).get("creatorName.input")) + #if ("$!value" != "") + + $util.encodeXml($value) + + + #end + #end diff --git a/config/src/test/groovy/au/com/redboxresearchdata/rifcs/RifVelocityTest.groovy b/config/src/test/groovy/au/com/redboxresearchdata/rifcs/RifVelocityTest.groovy index 3664e9b1..db387f28 100644 --- a/config/src/test/groovy/au/com/redboxresearchdata/rifcs/RifVelocityTest.groovy +++ b/config/src/test/groovy/au/com/redboxresearchdata/rifcs/RifVelocityTest.groovy @@ -258,6 +258,16 @@ class RifVelocityTest extends GenericVelocitySpecification { " \"dc:creator.foaf:Person.3.foaf:familyName\": \"Chambers\",\n" + " \"dc:creator.foaf:Person.3.foaf:Organization.dc:identifier\": \"redbox-mint.googlecode.com/parties/group/2\",\n" + " \"dc:creator.foaf:Person.3.foaf:Organization.skos:prefLabel\": \"Faculty of Technology\",\n" + + " \"dc:creator.foaf:Person.4.dc:identifier\": \"https://www.scopus.com/authid/detail.uri?authorId=000111\",\n" + + " \"identifierText.4.creatorName.input\": \"https://www.scopus.com/authid/detail.uri?authorId=000111\",\n" + + " \"dc:creator.foaf:Person.4.foaf:name\": \"Smith, John\",\n" + + " \"dc:creator.foaf:Person.4.foaf:title\": \"Prof\",\n" + + " \"dc:creator.foaf:Person.4.redbox:isCoPrimaryInvestigator\": \"\",\n" + + " \"dc:creator.foaf:Person.4.redbox:isPrimaryInvestigator\": \"\",\n" + + " \"dc:creator.foaf:Person.4.foaf:givenName\": \"John\",\n" + + " \"dc:creator.foaf:Person.4.foaf:familyName\": \"Smith\",\n" + + " \"dc:creator.foaf:Person.4.foaf:Organization.dc:identifier\": \"redbox-mint.googlecode.com/parties/group/2\",\n" + + " \"dc:creator.foaf:Person.4.foaf:Organization.skos:prefLabel\": \"Faculty of Technology\",\n" + " \"locrel:prc.foaf:Person.dc:identifier\": \"\",\n" + " \"locrel:prc.foaf:Person.foaf:name\": \"\",\n" + " \"locrel:prc.foaf:Person.foaf:title\": \"\",\n" + @@ -995,6 +1005,10 @@ class RifVelocityTest extends GenericVelocitySpecification { " http://orcid.org/0000-0001-6810-1260\n" + " \n" + " \n" + + " \n" + + " https://www.scopus.com/authid/detail.uri?authorId=000111\n" + + " \n" + + " " + " keywords\n" + " 0402\n" + " <p>The description</p>\n" + diff --git a/config/src/test/resources/rif.vm b/config/src/test/resources/rif.vm index fe8a698f..21c0bf03 100644 --- a/config/src/test/resources/rif.vm +++ b/config/src/test/resources/rif.vm @@ -1,20 +1,20 @@ #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 != "" && $value.get($label)!= "") - #set($labelVal = $value.get($label)) + #set($value = $valueMap.get($key)) + #if ($label != "" && $value.get($label)!= "") + #set($labelVal = $value.get($label)) #if ($anzsrc == "anzsrc") #set($lastIndex = $labelVal.lastIndexOf('/') + 1 ) #set($labelVal = $labelVal.substring($lastIndex) ) #end - <$tag$attr>$util.encodeXml($labelVal) + <$tag$attr>$util.encodeXml($labelVal) #end #end #end #macro(showRelatedInfo $field $relatedInfoType $identifierType) - + #set($valueMap = $util.getList($item, $field)) #foreach($key in $valueMap.keySet()) #set ($row = $valueMap.get($key)) @@ -304,16 +304,28 @@ #end #end - - - + + ### Free text support + #set($valueMap = $util.getList($item, "identifierText")) + #foreach($key in $valueMap.keySet()) + #set ($value = $valueMap.get($key).get("creatorName.input")) + #if ("$!value" != "") + + $util.encodeXml($value) + + + #end + #end + + + #showElementRifCS ("rif:subject" "dc:subject.vivo:keyword" " type=${quote}local${quote} $lang" "rdf:PlainLiteral" "") #showElementRifCS ("rif:subject" "dc:subject.anzsrc:for" " type=${quote}anzsrc-for${quote} $lang" "rdf:resource" "anzsrc") #showElementRifCS ("rif:subject" "dc:subject.anzsrc:seo" " type=${quote}anzsrc-seo${quote} $lang" "rdf:resource" "anzsrc") - - - + + + #set ($value = $util.get($item, "dc:subject.anzsrc:toa.skos:prefLabel")) #if ("$!value" != "") $util.encodeXml($value) @@ -406,7 +418,7 @@ #end ################# - + #showRelatedInfo("dc:relation.swrc:Publication", "publication", "uri") #showRelatedInfo("dc:relation.bibo:Website", "website", "uri") #showRelatedInfo("dc:relation.vivo:Service", "service", "uri") diff --git a/pom.xml b/pom.xml index 336a6084..8e7258e9 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ com.googlecode.redbox-mint redbox-project - 1.10.1-SNAPSHOT + 1.10 parent/pom.xml @@ -122,7 +122,7 @@ com.googlecode.redbox-mint plugin-transaction-curation-redbox - 1.10-SNAPSHOT + 1.9