This is an old thing I found in my notes. I have no idea when I wrote this down, but I wanted to capture it.
The refname used in the example below is the one I recorded when I noted the issue:
irb(main):003:0> "nagpraPahmaInventoryNames01)'AK-Alaska'"
=> "url:pahma.cspace.berkeley.edu:vocabularies:name(nagpraPahmaInventoryNames):item:name(nagpraPahmaInventoryNames01)'AK-Alaska'"
irb(main):004:0> CollectionSpace::RefName.parse(rn)
=> {:domain=>"url", :type=>"pahma.cspace.berkeley.edu", :subtype=>nil, :identifier=>nil, :label=>nil}
Non-standard refname formats that cannot be parsed into valid results should raise an exception instead of silently returning weird results.
Today I checked both PAHMA and OMCA's production CollectionSpace instances and vocabulary term refnames are the standard format beginning with urn:cspace:, so I'm not sure if this is variation we need to deal with or not.
This is an old thing I found in my notes. I have no idea when I wrote this down, but I wanted to capture it.
The refname used in the example below is the one I recorded when I noted the issue:
Non-standard refname formats that cannot be parsed into valid results should raise an exception instead of silently returning weird results.
Today I checked both PAHMA and OMCA's production CollectionSpace instances and vocabulary term refnames are the standard format beginning with
urn:cspace:, so I'm not sure if this is variation we need to deal with or not.