WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org
View all threadsHi everyone,
I had a question regarding the two forms for short identifiers,
specifically used for authorities in my situation. As I've previously
posted before, I'm working on an automated means where in a spreadsheet,
if you put in the label value of an authority, it will create the
appropriate xml code to make sure it references the authority value.
For example, for a cataloging, if i had an import spreadsheet where I
want to set a Material (under Object Description Information) to be
'paper' which is part of the material concept authority. If I want to
make sure it's referenced via XML, I would have to put:
I've been able to get the translation to take a string 'paper' and
create the short identifier version of it 'papercGFwZXI' (thanks to Mark
Cooper's csible tool). This was working well, until I ran into an
instance where that form of short identifer wasn't the form used by an
authority. I found out there's a short identifier form like
'PerformingArtsCenter1445028418' (made-up organization authority
example). From looking at the Short Identifier confluence page (seen
here:
https://wiki.collectionspace.org/display/collectionspace/Short+Identifier )
it says that 2nd one is the Automatically-created Short Identifier. So
right now, if the authority I'm trying to reference is using this form,
my translation will give the normal format of the short identifier, but
when I click on the link of 'Performing Arts Center' on the Terms Used
section of the cataloging record, it won't point to the organization
authority page because the short identifier is wrong.
So with this I was wondering on 3 things on this that could help for a
solution to this.
1.) I was wondering when the automatically created short identifiers are
used. Are these used when you add a new term to the authority through
the CS website? So then are these relegated to any new terms that have
been added to authorities since a new CS installation (and the ones with
the 'papercGFwZXI' format belong with pre-established authority terms?)
2.) Is there a way to convert either short identifier formats to the other?
3.) How is the automatically created short identifier format calculated?
I tried looking into the CS github to see where the calculation is done,
but was wondering on a reference of the lines of code that handles that.
Thank you again everyone
-Peter
3.) How is the automatically created short identifier format calculated?
I tried looking into the CS github to see where the calculation is done,
but was wondering on a reference of the lines of code that handles that.
The first command on this issue might be pertinent:
https://issues.collectionspace.org/browse/CSPACE-5872
The following issue, CSPACE-4767, was identified as having been resolved in
v4.3. If so, presumably then we could now make additional code changes, if
needed, to more readily accept user-supplied short identifiers, in one or
more scenarios where we currently use generated shortIDs:
https://issues.collectionspace.org/browse/CSPACE-4767
I had thought we had an issue to support that functionality, but haven't so
far been able to find it ... That functionality would be particularly
useful where user supplied shortIDs might be chosen from a code list, such
as ISO code lists for human languages, currencies, et al., much like as per
https://issues.collectionspace.org/browse/CSPACE-5046
Aron
On Wed, May 25, 2016 at 11:00 AM, Peter Tucker <
peter.tucker@granitehorizon.com> wrote:
Hi everyone,
I had a question regarding the two forms for short identifiers,
specifically used for authorities in my situation. As I've previously
posted before, I'm working on an automated means where in a spreadsheet, if
you put in the label value of an authority, it will create the appropriate
xml code to make sure it references the authority value.
For example, for a cataloging, if i had an import spreadsheet where I want
to set a Material (under Object Description Information) to be 'paper'
which is part of the material concept authority. If I want to make sure
it's referenced via XML, I would have to put:
I've been able to get the translation to take a string 'paper' and create
the short identifier version of it 'papercGFwZXI' (thanks to Mark Cooper's
csible tool). This was working well, until I ran into an instance where
that form of short identifer wasn't the form used by an authority. I found
out there's a short identifier form like 'PerformingArtsCenter1445028418'
(made-up organization authority example). From looking at the Short
Identifier confluence page (seen here:
https://wiki.collectionspace.org/display/collectionspace/Short+Identifier
) it says that 2nd one is the Automatically-created Short Identifier. So
right now, if the authority I'm trying to reference is using this form, my
translation will give the normal format of the short identifier, but when I
click on the link of 'Performing Arts Center' on the Terms Used section of
the cataloging record, it won't point to the organization authority page
because the short identifier is wrong.
So with this I was wondering on 3 things on this that could help for a
solution to this.
1.) I was wondering when the automatically created short identifiers are
used. Are these used when you add a new term to the authority through the
CS website? So then are these relegated to any new terms that have been
added to authorities since a new CS installation (and the ones with the
'papercGFwZXI' format belong with pre-established authority terms?)
2.) Is there a way to convert either short identifier formats to the other?
3.) How is the automatically created short identifier format calculated? I
tried looking into the CS github to see where the calculation is done, but
was wondering on a reference of the lines of code that handles that.
Thank you again everyone
-Peter
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
I wrote:
presumably then we could now make additional code changes, if needed, to
more readily accept user-supplied short identifiers, in one or more
scenarios where we currently use generated shortIDs:
https://issues.collectionspace.org/browse/CSPACE-4767
As a colleague noted, at least in the case of CollectionSpace REST API
create requests, when POST-ing an XML payload containing a user-supplied
<shortIdentifier> element, that user-supplied value is preserved in the
saved record, rather than being replaced by a generated shortID.
That has been my experience today, as well, at least when creating a new
Person record on the v4.3-based qa.collectionspace.org. (I might well have
mis-remembered that at some past point in CollectionSpace's development,
user-supplied shortIDs were discarded in favor of generated IDs.)
On Wed, May 25, 2016 at 11:39 AM, Aron Roberts aron@socrates.berkeley.edu
wrote:
3.) How is the automatically created short identifier format calculated?
I tried looking into the CS github to see where the calculation is done,
but was wondering on a reference of the lines of code that handles that.
The first command on this issue might be pertinent:
https://issues.collectionspace.org/browse/CSPACE-5872
The following issue, CSPACE-4767, was identified as having been resolved
in v4.3. If so, presumably then we could now make additional code changes,
if needed, to more readily accept user-supplied short identifiers, in one
or more scenarios where we currently use generated shortIDs:
https://issues.collectionspace.org/browse/CSPACE-4767
I had thought we had an issue to support that functionality, but haven't
so far been able to find it ... That functionality would be particularly
useful where user supplied shortIDs might be chosen from a code list, such
as ISO code lists for human languages, currencies, et al., much like as per
https://issues.collectionspace.org/browse/CSPACE-5046
Aron
On Wed, May 25, 2016 at 11:00 AM, Peter Tucker <
peter.tucker@granitehorizon.com> wrote:
Hi everyone,
I had a question regarding the two forms for short identifiers,
specifically used for authorities in my situation. As I've previously
posted before, I'm working on an automated means where in a spreadsheet, if
you put in the label value of an authority, it will create the appropriate
xml code to make sure it references the authority value.
For example, for a cataloging, if i had an import spreadsheet where I
want to set a Material (under Object Description Information) to be 'paper'
which is part of the material concept authority. If I want to make sure
it's referenced via XML, I would have to put:
I've been able to get the translation to take a string 'paper' and create
the short identifier version of it 'papercGFwZXI' (thanks to Mark Cooper's
csible tool). This was working well, until I ran into an instance where
that form of short identifer wasn't the form used by an authority. I found
out there's a short identifier form like 'PerformingArtsCenter1445028418'
(made-up organization authority example). From looking at the Short
Identifier confluence page (seen here:
https://wiki.collectionspace.org/display/collectionspace/Short+Identifier
) it says that 2nd one is the Automatically-created Short Identifier. So
right now, if the authority I'm trying to reference is using this form, my
translation will give the normal format of the short identifier, but when I
click on the link of 'Performing Arts Center' on the Terms Used section of
the cataloging record, it won't point to the organization authority page
because the short identifier is wrong.
So with this I was wondering on 3 things on this that could help for a
solution to this.
1.) I was wondering when the automatically created short identifiers are
used. Are these used when you add a new term to the authority through the
CS website? So then are these relegated to any new terms that have been
added to authorities since a new CS installation (and the ones with the
'papercGFwZXI' format belong with pre-established authority terms?)
2.) Is there a way to convert either short identifier formats to the
other?
3.) How is the automatically created short identifier format calculated?
I tried looking into the CS github to see where the calculation is done,
but was wondering on a reference of the lines of code that handles that.
Thank you again everyone
-Peter
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
Peter,
An authority's short ID and authority items' short IDs can be almost any string/text you want. There is no form or formal structure to short IDs. An authority's short ID should be unique amongst all authority instances of the same type -e.g., all Person authority instances should have unique short IDs in any given CollectionSpace repository. Authority items' short IDs should be unique amongst its siblings.
The CollectionSpace web app (aka, the UI) does not currently allow a user to supply short IDs, so they need to be auto-generated when a user adds a new authority item. The method to generate the short IDs is "private" and you shouldn't try to (or need to) reverse-engineer it. The format of an authority item refname is always the same format:
urn:cspace:{domain}:{authority}:name({authority_shortId}):item:name({item_shortid})'{displayName}'
If you are importing authority items and/or new authority instances, you can create your own short IDs. That means you could create user-friendly short IDs if you want as long as you satisfy the uniqueness constraints I outlined above.
I hope that help?
-Richard
From: Talk talk-bounces@lists.collectionspace.org on behalf of Peter Tucker peter.tucker@granitehorizon.com
Sent: Wednesday, May 25, 2016 11:00 AM
To: talk@lists.collectionspace.org
Subject: [Talk] Short Identifier Forms
Hi everyone,
I had a question regarding the two forms for short identifiers,
specifically used for authorities in my situation. As I've previously
posted before, I'm working on an automated means where in a spreadsheet,
if you put in the label value of an authority, it will create the
appropriate xml code to make sure it references the authority value.
For example, for a cataloging, if i had an import spreadsheet where I
want to set a Material (under Object Description Information) to be
'paper' which is part of the material concept authority. If I want to
make sure it's referenced via XML, I would have to put:
I've been able to get the translation to take a string 'paper' and
create the short identifier version of it 'papercGFwZXI' (thanks to Mark
Cooper's csible tool). This was working well, until I ran into an
instance where that form of short identifer wasn't the form used by an
authority. I found out there's a short identifier form like
'PerformingArtsCenter1445028418' (made-up organization authority
example). From looking at the Short Identifier confluence page (seen
here:
https://wiki.collectionspace.org/display/collectionspace/Short+Identifier )
it says that 2nd one is the Automatically-created Short Identifier. So
right now, if the authority I'm trying to reference is using this form,
my translation will give the normal format of the short identifier, but
when I click on the link of 'Performing Arts Center' on the Terms Used
section of the cataloging record, it won't point to the organization
authority page because the short identifier is wrong.
So with this I was wondering on 3 things on this that could help for a
solution to this.
1.) I was wondering when the automatically created short identifiers are
used. Are these used when you add a new term to the authority through
the CS website? So then are these relegated to any new terms that have
been added to authorities since a new CS installation (and the ones with
the 'papercGFwZXI' format belong with pre-established authority terms?)
2.) Is there a way to convert either short identifier formats to the other?
3.) How is the automatically created short identifier format calculated?
I tried looking into the CS github to see where the calculation is done,
but was wondering on a reference of the lines of code that handles that.
Thank you again everyone
-Peter
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
This definitely helps with understanding the usage of short IDs! Thanks
for the heads up on this. Probably from here on out for any new
identifiers, we will probably use a custom format for creating the new
short IDs for any new authority. However I guess with my question, the
authorities that were already in place where inconsistent with their
format, so it became hard to call on them if I were just given the label
of the authority, and somehow get the short ID to make the proper urn
reference. So what I did in my case is to make my own reference table
for existing authority vocabulary, where I have listed all of the short
IDs for every authority term, and a column for their corresponding
label, and use that as a key to reference the short ID. This has worked
out for now, but I guess this also helps in a learning process for next
time starting from scratch to make sure the short identifiers set up
have a consistent yet unique format on my end. Thanks again for the
information everyone.
-Peter
On 05/27/2016 03:07 PM, Richard Millet wrote:
Peter,
An authority's short ID and authority items' short IDs can be almost any string/text you want. There is no form or formal structure to short IDs. An authority's short ID should be unique amongst all authority instances of the same type -e.g., all Person authority instances should have unique short IDs in any given CollectionSpace repository. Authority items' short IDs should be unique amongst its siblings.
The CollectionSpace web app (aka, the UI) does not currently allow a user to supply short IDs, so they need to be auto-generated when a user adds a new authority item. The method to generate the short IDs is "private" and you shouldn't try to (or need to) reverse-engineer it. The format of an authority item refname is always the same format:
urn:cspace:{domain}:{authority}:name({authority_shortId}):item:name({item_shortid})'{displayName}'
If you are importing authority items and/or new authority instances, you can create your own short IDs. That means you could create user-friendly short IDs if you want as long as you satisfy the uniqueness constraints I outlined above.
I hope that help?
-Richard
From: Talk talk-bounces@lists.collectionspace.org on behalf of Peter Tucker peter.tucker@granitehorizon.com
Sent: Wednesday, May 25, 2016 11:00 AM
To: talk@lists.collectionspace.org
Subject: [Talk] Short Identifier Forms
Hi everyone,
I had a question regarding the two forms for short identifiers,
specifically used for authorities in my situation. As I've previously
posted before, I'm working on an automated means where in a spreadsheet,
if you put in the label value of an authority, it will create the
appropriate xml code to make sure it references the authority value.
For example, for a cataloging, if i had an import spreadsheet where I
want to set a Material (under Object Description Information) to be
'paper' which is part of the material concept authority. If I want to
make sure it's referenced via XML, I would have to put:
I've been able to get the translation to take a string 'paper' and
create the short identifier version of it 'papercGFwZXI' (thanks to Mark
Cooper's csible tool). This was working well, until I ran into an
instance where that form of short identifer wasn't the form used by an
authority. I found out there's a short identifier form like
'PerformingArtsCenter1445028418' (made-up organization authority
example). From looking at the Short Identifier confluence page (seen
here:
https://wiki.collectionspace.org/display/collectionspace/Short+Identifier )
it says that 2nd one is the Automatically-created Short Identifier. So
right now, if the authority I'm trying to reference is using this form,
my translation will give the normal format of the short identifier, but
when I click on the link of 'Performing Arts Center' on the Terms Used
section of the cataloging record, it won't point to the organization
authority page because the short identifier is wrong.
So with this I was wondering on 3 things on this that could help for a
solution to this.
1.) I was wondering when the automatically created short identifiers are
used. Are these used when you add a new term to the authority through
the CS website? So then are these relegated to any new terms that have
been added to authorities since a new CS installation (and the ones with
the 'papercGFwZXI' format belong with pre-established authority terms?)
2.) Is there a way to convert either short identifier formats to the other?
3.) How is the automatically created short identifier format calculated?
I tried looking into the CS github to see where the calculation is done,
but was wondering on a reference of the lines of code that handles that.
Thank you again everyone
-Peter
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org