talk@lists.collectionspace.org

WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org

View all threads

changes in controlled list update procedure?

CM
Chris Martin
Thu, May 26, 2011 10:49 AM

ok I have gone thr the documentation
http://wiki.collectionspace.org/display/collectionspace/How+to+add+a+term+to+a+controlled+vocabularies
and improved it hopefully - but please feel free to suggest changes to
it to make more sense to an implementer.

And in the process I found the incredibly helpful functionality I wrote
to update a vocab from a list that you can just send in - which I think
will probably be a good solution for you.
I have also improved that functionality to allow specification of ID's
within that file but that wont be available til the 1.8 release
I also fixed a bug in the refresh functionality that wasn't deleting
options that had an ID automagically generated by the system, rather
than specified in the cspace-config - but once again that is in trunk
and wont be released til 1.8 but it is a very small patch so if you tell
me which release you are working on I could create you a patch or build
a war file with the changes for that release if it is useful

Sorry for the delay in getting you the answers, it's been a while since
I poked vocab generation and i had the initialize/refresh turned around
in my head - sorry.
I am hoping in 1.8 to create a call that will just reload the
cspace-config into an existing deployed collectionspace.war and thereby
reduce the paff of making changes, but it depends on other tasks as always.

Good luck and poke me if anything a) doesn't work, b) doesn't make sense

Chris

On 25/05/2011 22:37, Joe Slag wrote:

http://localhost:8180/collectionspace/chain/vocabularies/currency/initialize
does not seem to be doing the trick here. Anything you might dig up on
this tomorrow would be appreciated.

  • Joe

On Wed, May 25, 2011 at 4:20 PM, Chris Martincsm22@caret.cam.ac.uk  wrote:

instead of refresh try initialize that should delete any existing vocab of
that name and completely rewrite it.
so: collectionspace/chain/vocabularies/{your vocab here}/initialize

I know I wrote some doc about vocab initialization - I will try and dig it
out when I am at work tomorrow

Chris

ok I have gone thr the documentation http://wiki.collectionspace.org/display/collectionspace/How+to+add+a+term+to+a+controlled+vocabularies and improved it hopefully - but please feel free to suggest changes to it to make more sense to an implementer. And in the process I found the incredibly helpful functionality I wrote to update a vocab from a list that you can just send in - which I think will probably be a good solution for you. I have also improved that functionality to allow specification of ID's within that file but that wont be available til the 1.8 release I also fixed a bug in the refresh functionality that wasn't deleting options that had an ID automagically generated by the system, rather than specified in the cspace-config - but once again that is in trunk and wont be released til 1.8 but it is a very small patch so if you tell me which release you are working on I could create you a patch or build a war file with the changes for that release if it is useful Sorry for the delay in getting you the answers, it's been a while since I poked vocab generation and i had the initialize/refresh turned around in my head - sorry. I am hoping in 1.8 to create a call that will just reload the cspace-config into an existing deployed collectionspace.war and thereby reduce the paff of making changes, but it depends on other tasks as always. Good luck and poke me if anything a) doesn't work, b) doesn't make sense Chris On 25/05/2011 22:37, Joe Slag wrote: > http://localhost:8180/collectionspace/chain/vocabularies/currency/initialize > does not seem to be doing the trick here. Anything you might dig up on > this tomorrow would be appreciated. > > - Joe > > On Wed, May 25, 2011 at 4:20 PM, Chris Martin<csm22@caret.cam.ac.uk> wrote: >> instead of refresh try initialize that should delete any existing vocab of >> that name and completely rewrite it. >> so: collectionspace/chain/vocabularies/{your vocab here}/initialize >> >> I know I wrote some doc about vocab initialization - I will try and dig it >> out when I am at work tomorrow >> >> Chris >> >>
JS
Joe Slag
Thu, May 26, 2011 4:39 PM

Great, the cspace-config option is clearer now, and your new
file-based method seems very promising.

I've just realized that some of the trouble I was having figuring out
if new terms were getting picked up or not were likely due to cacheing
on the web UI side. Requesting the vocabulary via
{serverurl}/collectionspace/chain/vocabularies/currency seems to be
reflecting changes right away.

A wrinkle: when using the file-based method, it looks like the
contents of the file are appending themselves to the existing
vocabulary, rather than replacing the terms. So I now have four copies
of 'Euro' for example. There is a null pointer exception showing in
the logs; I'll open a bug and put that info in there.

thanks,
Joe

On Thu, May 26, 2011 at 5:49 AM, Chris Martin csm22@caret.cam.ac.uk wrote:

ok I have gone thr the documentation
http://wiki.collectionspace.org/display/collectionspace/How+to+add+a+term+to+a+controlled+vocabularies
and improved it hopefully - but please feel free to suggest changes to it to
make more sense to an implementer.

And in the process I found the incredibly helpful functionality I wrote to
update a vocab from a list that you can just send in - which I think will
probably be a good solution for you.
I have also improved that functionality to allow specification of ID's
within that file but that wont be available til the 1.8 release
I also fixed a bug in the refresh functionality that wasn't deleting options
that had an ID automagically generated by the system, rather than specified
in the cspace-config - but once again that is in trunk and wont be released
til 1.8 but it is a very small patch so if you tell me which release you are
working on I could create you a patch or build a war file with the changes
for that release if it is useful

Sorry for the delay in getting you the answers, it's been a while since I
poked vocab generation and i had the initialize/refresh turned around in my
head - sorry.
I am hoping in 1.8 to create a call that will just reload the cspace-config
into an existing deployed collectionspace.war and thereby reduce the paff of
making changes, but it depends on other tasks as always.

Good luck and poke me if anything a) doesn't work, b) doesn't make sense

Chris

On 25/05/2011 22:37, Joe Slag wrote:

http://localhost:8180/collectionspace/chain/vocabularies/currency/initialize
does not seem to be doing the trick here. Anything you might dig up on
this tomorrow would be appreciated.

  • Joe

On Wed, May 25, 2011 at 4:20 PM, Chris Martincsm22@caret.cam.ac.uk
 wrote:

instead of refresh try initialize that should delete any existing vocab
of
that name and completely rewrite it.
so: collectionspace/chain/vocabularies/{your vocab here}/initialize

I know I wrote some doc about vocab initialization - I will try and dig
it
out when I am at work tomorrow

Chris

Great, the cspace-config option is clearer now, and your new file-based method seems very promising. I've just realized that some of the trouble I was having figuring out if new terms were getting picked up or not were likely due to cacheing on the web UI side. Requesting the vocabulary via {serverurl}/collectionspace/chain/vocabularies/currency seems to be reflecting changes right away. A wrinkle: when using the file-based method, it looks like the contents of the file are appending themselves to the existing vocabulary, rather than replacing the terms. So I now have four copies of 'Euro' for example. There is a null pointer exception showing in the logs; I'll open a bug and put that info in there. thanks, Joe On Thu, May 26, 2011 at 5:49 AM, Chris Martin <csm22@caret.cam.ac.uk> wrote: > ok I have gone thr the documentation > http://wiki.collectionspace.org/display/collectionspace/How+to+add+a+term+to+a+controlled+vocabularies > and improved it hopefully - but please feel free to suggest changes to it to > make more sense to an implementer. > > And in the process I found the incredibly helpful functionality I wrote to > update a vocab from a list that you can just send in - which I think will > probably be a good solution for you. > I have also improved that functionality to allow specification of ID's > within that file but that wont be available til the 1.8 release > I also fixed a bug in the refresh functionality that wasn't deleting options > that had an ID automagically generated by the system, rather than specified > in the cspace-config - but once again that is in trunk and wont be released > til 1.8 but it is a very small patch so if you tell me which release you are > working on I could create you a patch or build a war file with the changes > for that release if it is useful > > Sorry for the delay in getting you the answers, it's been a while since I > poked vocab generation and i had the initialize/refresh turned around in my > head - sorry. > I am hoping in 1.8 to create a call that will just reload the cspace-config > into an existing deployed collectionspace.war and thereby reduce the paff of > making changes, but it depends on other tasks as always. > > Good luck and poke me if anything a) doesn't work, b) doesn't make sense > > Chris > > On 25/05/2011 22:37, Joe Slag wrote: >> >> >> http://localhost:8180/collectionspace/chain/vocabularies/currency/initialize >> does not seem to be doing the trick here. Anything you might dig up on >> this tomorrow would be appreciated. >> >> - Joe >> >> On Wed, May 25, 2011 at 4:20 PM, Chris Martin<csm22@caret.cam.ac.uk> >>  wrote: >>> >>> instead of refresh try initialize that should delete any existing vocab >>> of >>> that name and completely rewrite it. >>> so: collectionspace/chain/vocabularies/{your vocab here}/initialize >>> >>> I know I wrote some doc about vocab initialization - I will try and dig >>> it >>> out when I am at work tomorrow >>> >>> Chris >>> >>> >