anzsrc-for codes not mapping...

33 views
Skip to first unread message

Timothy O'Connor

unread,
Mar 20, 2015, 2:15:08 AM3/20/15
to redbo...@googlegroups.com
Hi all - Seem to be having a problem with getting anzsrc-for codes to map in the alert system.

Im using:

"//rif:registryObjects/rif:registryObject/rif:collection/rif:subject[@type='anzsrc-for']": "dc:subject.anzsrc:for.0.rdf:resource",

But when I have:

<subject type="anzsrc-for">039901</subject>
<subject type="anzsrc-for">060205</subject>
<subject type="anzsrc-for">060808</subject>


This is not mapping in the UI.

Any ideas?

Matthias Liffers

unread,
Mar 20, 2015, 2:20:23 AM3/20/15
to redbo...@googlegroups.com

Hi Timothy,

 

Been working on the same thing, but importing from CSVs as opposed to XML.

 

I’ve had success using the purl.org identifiers e.g.:

 

http://purl.org/asc/1297.0/2008/for/039901

http://purl.org/asc/1297.0/2008/for/060205

http://purl.org/asc/1297.0/2008/for/060808

 

You can find out the purl.org identifier by searching for the FOR code in Mint.

 

The ReDBox documentation says that the Alerts system isn’t smart enough to resolve FOR/SEO codes to Mint identifiers by itself.

 

Regards,

 

Matthias Liffers
BCompSc W.Aust. MInfoStud CSturt AALIA (CP)
Coordinator, Research Services | University Library

Curtin University
Tel | +61 8 9266 2439
Fax | +61 8 9266 4185

Email | matthias...@curtin.edu.au
Web | http://library.curtin.edu.au

Description: email_logo.png

--
-- Website: http://www.redboxresearchdata.com.au
 
You received this message because you are subscribed to the Google Groups ReDBox group. To post to this group, send email to redbo...@googlegroups.com. To unsubscribe from this group, send email to redbox-repo...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/redbox-repo?hl=en
---
You received this message because you are subscribed to the Google Groups "ReDBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redbox-repo...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Timothy O'Connor

unread,
Mar 22, 2015, 7:03:15 PM3/22/15
to redbo...@googlegroups.com, matthias...@curtin.edu.au
thanks - The problem is that if we are taking data in RIF-CS format from separate systems (including old records from ANDS) and putting them in redbox, it will be a big pain to have to re-add them.   I wish redbox would just leave the codes alone, because in the end they are just going back into ANDS.

Timothy O'Connor

unread,
Mar 22, 2015, 9:07:18 PM3/22/15
to redbo...@googlegroups.com, matthias...@curtin.edu.au
Hmm - Ive just put in a new record using the purl identifiers, and they are not being picked up either.  I suspect that the whole rif-cs import is more than a little unfinished...


On Friday, 20 March 2015 17:20:23 UTC+11, Matthias Liffers wrote:

James Moyon

unread,
Mar 23, 2015, 10:52:09 PM3/23/15
to redbo...@googlegroups.com

Hi Timothy,

 

We use the following configuration in our ReDBox rifXmlMap.json for FOR and SEO codes:

"/rif:registryObjects/rif:registryObject/rif:collection/rif:subject[@type='anzsrc-for']":{

    ".":"dc:subject.anzsrc:for.0.skos:prefLabel",

    "@termIdentifier":"dc:subject.anzsrc:for.0.rdf:resource"

},

"/rif:registryObjects/rif:registryObject/rif:collection/rif:subject[@type='anzsrc-seo']":{

    ".":"dc:subject.anzsrc:seo.0.skos:prefLabel",

    "@termIdentifier":"dc:subject.anzsrc:seo.0.rdf:resource"

},

 

This will successfully parse the following XML (similar for SEO codes):

<subject termIdentifier="http://purl.org/asc/1297.0/2008/for/120102" type="anzsrc-for">120102 - Architectural Heritage and Conservation</subject>

 

 

Kind regards,

 

James

 

James Moyon | Senior Information Technologist | Research and Data Management Support

University of South Australia | E: james...@unisa.edu.au

CRICOS Provider No: 00121B

Timothy O'Connor

unread,
Mar 24, 2015, 2:21:07 AM3/24/15
to redbo...@googlegroups.com
Thanks James - Does not seem to be working in my install.  The record seems to be harvested, but when I try to view it, I get:

Page content template error: display/package-dataset/detail
Traceback (most recent call last):
  File "default/redbox/scripts/display/package-dataset/detail.py", line 144, in getAnzsrcCode
AttributeError: 'NoneType' object has no attribute 'rfind'
Looking at the code above:

    def getAnzsrcCode(self, code):
        uri = code.get("rdf:resource")
        return uri[uri.rfind("/")+1:]

So 'code' is not being picked up by the looks of it.

Timothy O'Connor

unread,
Mar 24, 2015, 2:31:48 AM3/24/15
to redbo...@googlegroups.com
So I hard coded the return value of 'code' to the purl id.  That worked, but when I try to export this record to ANDS, the subject is:

<rif:subject type="local" xml:lang="en">test</rif:subject>

Redbox really does not want me to use the subject codes :)

Timothy O'Connor

unread,
Mar 24, 2015, 2:44:02 AM3/24/15
to redbo...@googlegroups.com
Actually 'test' is just appearing because I had a keyword set.  The 'for' code is missing in the rif output, so it appears that for some reason 
dc:subject.anzsrc:for.0.rdf:resource is not being set correctly.

Andrew Brazzatti

unread,
Mar 24, 2015, 9:30:01 PM3/24/15
to redbo...@googlegroups.com
Hi Tim (& others working with alerts),

A couple of tips that will help with debugging issues that you're having with harvesting in RIF-CS via alerts:
  1. Essentially alerts is trying to create a tfpackage file in the same format as what the form does. This is the main metadata file in an record's package. Creating a test record via the interface and comparing the tfpackage file with the one that's produced via alerts can help work out where the mapping is going wrong. You can see the tfpackage file when you go the details page as an administrator and open the datastreams box on the left hand side.
  2. If you find that a record that you created via alerts is turning up in storage but not showing up on the interface, this is because there is an issue with indexing the record in solr. Check the transactionManager.log or the solrwrapper.log to see if there are any errors.
For your issue Tim, there may be an issue with the mapping of the dc:subject.anzsrc:for.0.rdf:resource. The configuration that James provided should work fine for records that have been exported out of RDA but potentially the RIF-CS you're needing to import is a different version and may need some tweaks.

Thanks,
Andrew

Timothy O'Connor

unread,
Mar 24, 2015, 10:44:52 PM3/24/15
to redbo...@googlegroups.com
Thanks Andrew - there are no errors at all in the solrwrapper.log or transactionManager. - just does not seem to be picking up 'dc:subject.anzsrc:for.0.rdf:resource' at all, and I'm testing with James's xml tag:

<subject termIdentifier="http://purl.org/asc/1297.0/2008/for/120102" type="anzsrc-for">120102 - Architectural Heritage and Conservation</subject>

and using the following in the xml config.

"/rif:registryObjects/rif:registryObject/rif:collection/rif:subject[@type='anzsrc-for']":{
            ".":"dc:subject.anzsrc:for.0.skos:prefLabel",
            "@termIdentifier":"dc:subject.anzsrc:for.0.rdf:resource"

        },

2015-03-25 13:30:14,449 transactionManager DEBUG  SolrIndexer          Array Field name is:reporting_dc:relation.swrc:Publication.dc:note  from: dc:relation.swrc:Publication.2.dc:note, with value:Alquezar, R, Boyd, W & Bunce, A 2007. Coral community extent and mapping of coastal fringing reefs: field validation techniques. A report to the Burnett Mary Regional Group. Centre for Environmental Management, Central Queensland University, Gladstone Queensland, http://hdl.cqu.edu.au/10018/57905
2015-03-25 13:30:14,455 transactionManager DEBUG  SolrIndexer          Set created date to :2011-06-16T00:00:00Z
2015-03-25 13:30:14,457 transactionManager DEBUG  SolrIndexer          Array Field name is:reporting_dc:coverage.vivo:GeographicLocation.rdf:PlainLiteral  from: dc:coverage.vivo:GeographicLocation.1.rdf:PlainLiteral, with value:Hummock Hill Reef (HHR), located adjacent to Hummock Hill Island (23.99S; 151.48E)
2015-03-25 13:30:14,464 transactionManager DEBUG  SolrIndexer          Array Field name is:reporting_dc:coverage.vivo:GeographicLocation.rdf:PlainLiteral  from: dc:coverage.vivo:GeographicLocation.2.rdf:PlainLiteral, with value:Stringers Reef (SR), located 1.6 km North of the Rules Beach, beach access track, near the mouth of Baffle Creek (24.48S; 152.03E)
2015-03-25 13:30:14,465 transactionManager DEBUG  SolrIndexer          Array Field name is:reporting_dc:coverage.vivo:GeographicLocation.rdf:PlainLiteral  from: dc:coverage.vivo:GeographicLocation.3.rdf:PlainLiteral, with value:152.030000,-24.480000
2015-03-25 13:30:14,466 transactionManager DEBUG  SolrIndexer          Array Field name is:reporting_dc:coverage.vivo:GeographicLocation.rdf:PlainLiteral  from: dc:coverage.vivo:GeographicLocation.4.rdf:PlainLiteral, with value:151.5484396,-23.9829154 151.4203802,-23.9829154 151.4203802,-24.064447 151.5484396,-24.064447 151.5484396,-23.9829154
2015-03-25 13:30:14,472 transactionManager DEBUG  SolrIndexer          Array Field name is:reporting_dc:subject.anzsrc:for.skos:prefLabel  from: dc:subject.anzsrc:for.1.skos:prefLabel, with value:120102 - Architectural Heritage and Conservation
2015-03-25 13:30:14,923 transactionManager DEBUG  SolrIndexer          Indexing Metadata Record 'a9ca93a2200011aefe1594c6302ec526' 'rif1.3.xml'
2015-03-25 13:30:14,954 transactionManager DEBUG  SolrIndexer          Indexing Metadata Record 'a9ca93a2200011aefe1594c6302ec526' 'oai_dc.xml'
Reply all
Reply to author
Forward
0 new messages