talk@lists.collectionspace.org

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

View all threads

adding new fields to collectionobject

SS
Susan Stone
Fri, Feb 4, 2011 2:26 AM

Chris (Pott),

Actually Patrick Schmitz is encouraging us to create XML payloads to use
with forthcoming import tools rather than continuing to use the java
client. Are you still using the Advanced XML step in Talend to create
your XML? Is it proving useful for creating all the structure that we
need in the XML for CSpace (earlier you said it didn't really support
multiple repeating fields, etc.)? Is there a way to save a sample
transformation that shows how you create XML from the data that comes
out of your database? I'm still struggling with how to use an ETL tool
for this.

Thanks,
Susan Stone
Informatics Group, Data Services, Berkeley

On 02/03/2011 02:05 AM, Christopher Pott wrote:

Hi Chris,

I've had no responses other than the ones on the list. I've yet to
follow up on the hint to check out the Persons schema.

For data loading, I'm currently using the CS Services API from within
Talend Open Studio. I'm using the JAXB jars from CS to help with the
field mapping and building the requests using the Jersey library
(although it would make more sense to use the CS Java Client library for
this). The decision to use Services API was partly so I could get to
know the API and partly because I prefer the feedback I get - if the
load fails, it's much easier to find out what went wrong. Nuxeo shell
import would sometimes fail and I had no idea how far I had got or which
record had caused the problem.

We have about 33,000 artworks and these have been imported. If I
remember correctly this takes 4-5 hours. I'm afraid I haven't timed the
imports accurately, I'm just trying to remember roughly how long it
takes. I've also imported persons (artists and featured persons),
movement records, intake records, acquistion records, vocabularies and
relations between these. Each of these took 'hours' spread over a number
of weeks. I've not attempted the whole lot in a single job.

I had supposed that the collectionobject records would represent the
greatest load because they contain the most data but it appears that the
overhead for an operation on a record (ie. waiting for a http response)
is taking the most time and that the amount of data in a record is not
so significant. So it's all the relations that are taking the most time
(especially movement relations as there can be many movements for each
work and I create a relation in each direction). I may end with
generating records and using the CS 'import' functionality if this
proves faster.

All the above was on CS version 1.0b. We've recently switched to 1.3 but
currently I'm working on schema extension rather than importing so I
don't have many records loaded. Just ask if you've any more questions or
if anything is not clear...

Regards,
Chris

-----Oprindelig meddelelse-----
Fra: Chris Hoffman [mailto:chris.hoffman@berkeley.edu]
Sendt: 2. februar 2011 19:11
Til: Christopher Pott
Cc: talk@lists.collectionspace.org
Emne: Re: [Talk] adding new fields to collectionobject

Hi Chris,

It's great to hear about your success with schema extensions!  We've
been doing a lot of work with the UCJEPS herbaria on extending the
collectionobject schema to add fields useful for herbaria and other
natural history collections.

Did anyone reply to your question about boolean fields?

We're experimenting with loading some larger data volumes into a CSpace
1.0 instance, and I'm wondering what you are doing with data loading.
How are you doing data import at this point?  Are you still creating XML
records and loading via the nuxeo shell?  How many records have you
loaded into your instance?  And what version of CSpace are you using?

Thanks,
Chris

On Feb 1, 2011, at 1:30 AM, Christopher Pott wrote:

Hi all,

Thanks to the instructions at

ld+or+group+of+fields (and the related pages) I've just been able to

add

new local and domain (finearts) schemas to extend collectionobject. It
took me longer than it probably should have but this was only due to

my

inability to slow down and read the instructions properly. Although I
knew the intention was to make configuration straightforward, I was
still surprised to see how simple the process was (ie. no coding
required) and was really impressed to see the new (text) fields up and
working so quickly and the new content being saved and searched.

My main outstanding issue now is that I get some unexpected results

when

adding new fields of type boolean. These fields are defined in the xsd
as xs:boolean, represented in mySql as bit(1) and implemented in the

UI

as checkboxes. My problem is that whatever the state of the checkbox
when saved, "false" is always returned by chain and the box is always
checked upon reload. As there are no boolean fields in the current
schemas could someone please help me with an example of how they

should

be correctly configured?

Cheers,
Chris

Developer, Corpus Project
Statens Museum for Kunst (National Gallery of Denmark)


Talk mailing list
Talk@lists.collectionspace.org

Chris (Pott), Actually Patrick Schmitz is encouraging us to create XML payloads to use with forthcoming import tools rather than continuing to use the java client. Are you still using the Advanced XML step in Talend to create your XML? Is it proving useful for creating all the structure that we need in the XML for CSpace (earlier you said it didn't really support multiple repeating fields, etc.)? Is there a way to save a sample transformation that shows how you create XML from the data that comes out of your database? I'm still struggling with how to use an ETL tool for this. Thanks, Susan Stone Informatics Group, Data Services, Berkeley On 02/03/2011 02:05 AM, Christopher Pott wrote: > Hi Chris, > > I've had no responses other than the ones on the list. I've yet to > follow up on the hint to check out the Persons schema. > > For data loading, I'm currently using the CS Services API from within > Talend Open Studio. I'm using the JAXB jars from CS to help with the > field mapping and building the requests using the Jersey library > (although it would make more sense to use the CS Java Client library for > this). The decision to use Services API was partly so I could get to > know the API and partly because I prefer the feedback I get - if the > load fails, it's much easier to find out what went wrong. Nuxeo shell > import would sometimes fail and I had no idea how far I had got or which > record had caused the problem. > > We have about 33,000 artworks and these have been imported. If I > remember correctly this takes 4-5 hours. I'm afraid I haven't timed the > imports accurately, I'm just trying to remember roughly how long it > takes. I've also imported persons (artists and featured persons), > movement records, intake records, acquistion records, vocabularies and > relations between these. Each of these took 'hours' spread over a number > of weeks. I've not attempted the whole lot in a single job. > > I had supposed that the collectionobject records would represent the > greatest load because they contain the most data but it appears that the > overhead for an operation on a record (ie. waiting for a http response) > is taking the most time and that the amount of data in a record is not > so significant. So it's all the relations that are taking the most time > (especially movement relations as there can be many movements for each > work and I create a relation in each direction). I may end with > generating records and using the CS 'import' functionality if this > proves faster. > > All the above was on CS version 1.0b. We've recently switched to 1.3 but > currently I'm working on schema extension rather than importing so I > don't have many records loaded. Just ask if you've any more questions or > if anything is not clear... > > Regards, > Chris > > > -----Oprindelig meddelelse----- > Fra: Chris Hoffman [mailto:chris.hoffman@berkeley.edu] > Sendt: 2. februar 2011 19:11 > Til: Christopher Pott > Cc: talk@lists.collectionspace.org > Emne: Re: [Talk] adding new fields to collectionobject > > Hi Chris, > > It's great to hear about your success with schema extensions! We've > been doing a lot of work with the UCJEPS herbaria on extending the > collectionobject schema to add fields useful for herbaria and other > natural history collections. > > Did anyone reply to your question about boolean fields? > > We're experimenting with loading some larger data volumes into a CSpace > 1.0 instance, and I'm wondering what you are doing with data loading. > How are you doing data import at this point? Are you still creating XML > records and loading via the nuxeo shell? How many records have you > loaded into your instance? And what version of CSpace are you using? > > Thanks, > Chris > > On Feb 1, 2011, at 1:30 AM, Christopher Pott wrote: > >> Hi all, >> >> Thanks to the instructions at >> > http://wiki.collectionspace.org/display/collectionspace/How+to+add+a+fie >> ld+or+group+of+fields (and the related pages) I've just been able to > add >> new local and domain (finearts) schemas to extend collectionobject. It >> took me longer than it probably should have but this was only due to > my >> inability to slow down and read the instructions properly. Although I >> knew the intention was to make configuration straightforward, I was >> still surprised to see how simple the process was (ie. no coding >> required) and was really impressed to see the new (text) fields up and >> working so quickly and the new content being saved and searched. >> >> My main outstanding issue now is that I get some unexpected results > when >> adding new fields of type boolean. These fields are defined in the xsd >> as xs:boolean, represented in mySql as bit(1) and implemented in the > UI >> as checkboxes. My problem is that whatever the state of the checkbox >> when saved, "false" is always returned by chain and the box is always >> checked upon reload. As there are no boolean fields in the current >> schemas could someone please help me with an example of how they > should >> be correctly configured? >> >> Cheers, >> Chris >> >> Developer, Corpus Project >> Statens Museum for Kunst (National Gallery of Denmark) >> >> >> >> >> >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collections > pace.org > > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
CP
Christopher Pott
Fri, Feb 4, 2011 11:03 AM

Hi Chris,

(I think we should change the name of this mailing list to the chris-
collectionspace-list!)

At least it looks to the casual observer like 'chris' is a really busy
worker :-)

As Susan raised some similar questions (about mapping and repeatablity
etc.) I thought I'd start a page on the CS wiki detailing how I'm
mapping data using Talend.

Hopefully as others start mapping we can all contribute to this page and
try to build up some kind of 'best practice' and common modules we can
share.

Cheers,
Chris

-----Oprindelig meddelelse-----
Fra: Chris Hoffman [mailto:chris.hoffman@berkeley.edu]
Sendt: 3. februar 2011 19:03
Til: Christopher Pott
Cc: talk@lists.collectionspace.org
Emne: Loading data

Hi Chris (Pott),

(I think we should change the name of this mailing list to the chris-
collectionspace-list!)

Thanks so much for this good information about data loading.  It's

very

helpful, and we will look into the approach you described.  The
CollectionSpace roadmap shows some new work on import and export in

the

1.5 timeframe.

2.0
We will be keeping a close eye on this too.

Like you, we have also found that performance is heavily affected by

the

number of relations something has.  Another challenging area for data
loading seems to be repeating fields.  If an object has multiple

object

names for instance, what is the best way to import that information?

With

the original create transaction or as an update?  We've talked a bit

with

the services team here at UCB, and they are thinking about using XML

to

represent these kinds of relationships, probably using something like
Talend or Kettle to create the XML information from data files or from

the

database itself.  We haven't really explored this yet, but we will

have to

soon.

Anyway, it's good to hear what you all are doing.  We'll talk again

soon

on the chris-collectionspace-list :-)

Chris (Hoffman)

On Feb 3, 2011, at 2:05 AM, Christopher Pott wrote:

Hi Chris,

I've had no responses other than the ones on the list. I've yet to
follow up on the hint to check out the Persons schema.

For data loading, I'm currently using the CS Services API from

within

Talend Open Studio. I'm using the JAXB jars from CS to help with the
field mapping and building the requests using the Jersey library
(although it would make more sense to use the CS Java Client library

for

this). The decision to use Services API was partly so I could get to
know the API and partly because I prefer the feedback I get - if the
load fails, it's much easier to find out what went wrong. Nuxeo

shell

import would sometimes fail and I had no idea how far I had got or

which

record had caused the problem.

We have about 33,000 artworks and these have been imported. If I
remember correctly this takes 4-5 hours. I'm afraid I haven't timed

the

imports accurately, I'm just trying to remember roughly how long it
takes. I've also imported persons (artists and featured persons),
movement records, intake records, acquistion records, vocabularies

and

relations between these. Each of these took 'hours' spread over a

number

of weeks. I've not attempted the whole lot in a single job.

I had supposed that the collectionobject records would represent the
greatest load because they contain the most data but it appears that

the

overhead for an operation on a record (ie. waiting for a http

response)

is taking the most time and that the amount of data in a record is

not

so significant. So it's all the relations that are taking the most

time

(especially movement relations as there can be many movements for

each

work and I create a relation in each direction). I may end with
generating records and using the CS 'import' functionality if this
proves faster.

All the above was on CS version 1.0b. We've recently switched to 1.3

but

currently I'm working on schema extension rather than importing so I
don't have many records loaded. Just ask if you've any more

questions or

if anything is not clear...

Regards,
Chris

-----Oprindelig meddelelse-----
Fra: Chris Hoffman [mailto:chris.hoffman@berkeley.edu]
Sendt: 2. februar 2011 19:11
Til: Christopher Pott
Cc: talk@lists.collectionspace.org
Emne: Re: [Talk] adding new fields to collectionobject

Hi Chris,

It's great to hear about your success with schema extensions!  We've
been doing a lot of work with the UCJEPS herbaria on extending the
collectionobject schema to add fields useful for herbaria and other
natural history collections.

Did anyone reply to your question about boolean fields?

We're experimenting with loading some larger data volumes into a

CSpace

1.0 instance, and I'm wondering what you are doing with data

loading.

How are you doing data import at this point?  Are you still creating

XML

records and loading via the nuxeo shell?  How many records have you
loaded into your instance?  And what version of CSpace are you

using?

Thanks,
Chris

On Feb 1, 2011, at 1:30 AM, Christopher Pott wrote:

Hi all,

Thanks to the instructions at

ld+or+group+of+fields (and the related pages) I've just been able

to

add

new local and domain (finearts) schemas to extend collectionobject.

It

took me longer than it probably should have but this was only due

to

my

inability to slow down and read the instructions properly. Although

I

knew the intention was to make configuration straightforward, I was
still surprised to see how simple the process was (ie. no coding
required) and was really impressed to see the new (text) fields up

and

working so quickly and the new content being saved and searched.

My main outstanding issue now is that I get some unexpected results

when

adding new fields of type boolean. These fields are defined in the

xsd

as xs:boolean, represented in mySql as bit(1) and implemented in

the

UI

as checkboxes. My problem is that whatever the state of the

checkbox

when saved, "false" is always returned by chain and the box is

always

checked upon reload. As there are no boolean fields in the current
schemas could someone please help me with an example of how they

should

be correctly configured?

Cheers,
Chris

Developer, Corpus Project
Statens Museum for Kunst (National Gallery of Denmark)


Talk mailing list
Talk@lists.collectionspace.org

pace.org

Hi Chris, > (I think we should change the name of this mailing list to the chris- > collectionspace-list!) At least it looks to the casual observer like 'chris' is a really busy worker :-) As Susan raised some similar questions (about mapping and repeatablity etc.) I thought I'd start a page on the CS wiki detailing how I'm mapping data using Talend. Hopefully as others start mapping we can all contribute to this page and try to build up some kind of 'best practice' and common modules we can share. Cheers, Chris > -----Oprindelig meddelelse----- > Fra: Chris Hoffman [mailto:chris.hoffman@berkeley.edu] > Sendt: 3. februar 2011 19:03 > Til: Christopher Pott > Cc: talk@lists.collectionspace.org > Emne: Loading data > > Hi Chris (Pott), > > (I think we should change the name of this mailing list to the chris- > collectionspace-list!) > > Thanks so much for this good information about data loading. It's very > helpful, and we will look into the approach you described. The > CollectionSpace roadmap shows some new work on import and export in the > 1.5 timeframe. > > https://wiki.collectionspace.org:8444/display/collectionspace/Road+Map+t o+ > 2.0 > We will be keeping a close eye on this too. > > Like you, we have also found that performance is heavily affected by the > number of relations something has. Another challenging area for data > loading seems to be repeating fields. If an object has multiple object > names for instance, what is the best way to import that information? With > the original create transaction or as an update? We've talked a bit with > the services team here at UCB, and they are thinking about using XML to > represent these kinds of relationships, probably using something like > Talend or Kettle to create the XML information from data files or from the > database itself. We haven't really explored this yet, but we will have to > soon. > > Anyway, it's good to hear what you all are doing. We'll talk again soon > on the chris-collectionspace-list :-) > > Chris (Hoffman) > > On Feb 3, 2011, at 2:05 AM, Christopher Pott wrote: > > > Hi Chris, > > > > I've had no responses other than the ones on the list. I've yet to > > follow up on the hint to check out the Persons schema. > > > > For data loading, I'm currently using the CS Services API from within > > Talend Open Studio. I'm using the JAXB jars from CS to help with the > > field mapping and building the requests using the Jersey library > > (although it would make more sense to use the CS Java Client library for > > this). The decision to use Services API was partly so I could get to > > know the API and partly because I prefer the feedback I get - if the > > load fails, it's much easier to find out what went wrong. Nuxeo shell > > import would sometimes fail and I had no idea how far I had got or which > > record had caused the problem. > > > > We have about 33,000 artworks and these have been imported. If I > > remember correctly this takes 4-5 hours. I'm afraid I haven't timed the > > imports accurately, I'm just trying to remember roughly how long it > > takes. I've also imported persons (artists and featured persons), > > movement records, intake records, acquistion records, vocabularies and > > relations between these. Each of these took 'hours' spread over a number > > of weeks. I've not attempted the whole lot in a single job. > > > > I had supposed that the collectionobject records would represent the > > greatest load because they contain the most data but it appears that the > > overhead for an operation on a record (ie. waiting for a http response) > > is taking the most time and that the amount of data in a record is not > > so significant. So it's all the relations that are taking the most time > > (especially movement relations as there can be many movements for each > > work and I create a relation in each direction). I may end with > > generating records and using the CS 'import' functionality if this > > proves faster. > > > > All the above was on CS version 1.0b. We've recently switched to 1.3 but > > currently I'm working on schema extension rather than importing so I > > don't have many records loaded. Just ask if you've any more questions or > > if anything is not clear... > > > > Regards, > > Chris > > > > > > -----Oprindelig meddelelse----- > > Fra: Chris Hoffman [mailto:chris.hoffman@berkeley.edu] > > Sendt: 2. februar 2011 19:11 > > Til: Christopher Pott > > Cc: talk@lists.collectionspace.org > > Emne: Re: [Talk] adding new fields to collectionobject > > > > Hi Chris, > > > > It's great to hear about your success with schema extensions! We've > > been doing a lot of work with the UCJEPS herbaria on extending the > > collectionobject schema to add fields useful for herbaria and other > > natural history collections. > > > > Did anyone reply to your question about boolean fields? > > > > We're experimenting with loading some larger data volumes into a CSpace > > 1.0 instance, and I'm wondering what you are doing with data loading. > > How are you doing data import at this point? Are you still creating XML > > records and loading via the nuxeo shell? How many records have you > > loaded into your instance? And what version of CSpace are you using? > > > > Thanks, > > Chris > > > > On Feb 1, 2011, at 1:30 AM, Christopher Pott wrote: > > > >> Hi all, > >> > >> Thanks to the instructions at > >> > > http://wiki.collectionspace.org/display/collectionspace/How+to+add+a+fie > >> ld+or+group+of+fields (and the related pages) I've just been able to > > add > >> new local and domain (finearts) schemas to extend collectionobject. It > >> took me longer than it probably should have but this was only due to > > my > >> inability to slow down and read the instructions properly. Although I > >> knew the intention was to make configuration straightforward, I was > >> still surprised to see how simple the process was (ie. no coding > >> required) and was really impressed to see the new (text) fields up and > >> working so quickly and the new content being saved and searched. > >> > >> My main outstanding issue now is that I get some unexpected results > > when > >> adding new fields of type boolean. These fields are defined in the xsd > >> as xs:boolean, represented in mySql as bit(1) and implemented in the > > UI > >> as checkboxes. My problem is that whatever the state of the checkbox > >> when saved, "false" is always returned by chain and the box is always > >> checked upon reload. As there are no boolean fields in the current > >> schemas could someone please help me with an example of how they > > should > >> be correctly configured? > >> > >> Cheers, > >> Chris > >> > >> Developer, Corpus Project > >> Statens Museum for Kunst (National Gallery of Denmark) > >> > >> > >> > >> > >> > >> > >> _______________________________________________ > >> Talk mailing list > >> Talk@lists.collectionspace.org > >> > > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collections > > pace.org > >
CP
Christopher Pott
Fri, Feb 4, 2011 11:04 AM

Hi Susan,

Actually Patrick Schmitz is encouraging us to create XML payloads to

use

with forthcoming import tools rather than continuing to use the java
client.

Yes, I'm also hoping this will prove to be much faster.

Are you still using the Advanced XML step in Talend to create
your XML?

I'm using it for collectionobjects, but nothing else. This is because I
later found another method (tJavaRow + importing the CS JAXB libraries)
which I preferred.

Is it proving useful for creating all the structure that we
need in the XML for CSpace (earlier you said it didn't really support
multiple repeating fields, etc.)?

I create repeating fields both using Talends Advanced XML and by just
using Java (in Talend). Both methods result in a complete xml file but
so far the Java approach has been a lot less work and is more reliable.

Is there a way to save a sample
transformation that shows how you create XML from the data that comes
out of your database? I'm still struggling with how to use an ETL tool
for this.

Yes, I'll create a page on the wiki which shows how I'm approaching it.

Cheers,
Chris

-----Oprindelig meddelelse-----
Fra: Susan Stone [mailto:sstone@socrates.berkeley.edu]
Sendt: 4. februar 2011 03:27
Til: Christopher Pott
Cc: Chris Hoffman; talk@lists.collectionspace.org
Emne: Re: [Talk] adding new fields to collectionobject

Chris (Pott),

Actually Patrick Schmitz is encouraging us to create XML payloads to

use

with forthcoming import tools rather than continuing to use the java
client. Are you still using the Advanced XML step in Talend to create
your XML? Is it proving useful for creating all the structure that we
need in the XML for CSpace (earlier you said it didn't really support
multiple repeating fields, etc.)? Is there a way to save a sample
transformation that shows how you create XML from the data that comes
out of your database? I'm still struggling with how to use an ETL tool
for this.

Thanks,
Susan Stone
Informatics Group, Data Services, Berkeley

On 02/03/2011 02:05 AM, Christopher Pott wrote:

Hi Chris,

I've had no responses other than the ones on the list. I've yet to
follow up on the hint to check out the Persons schema.

For data loading, I'm currently using the CS Services API from

within

Talend Open Studio. I'm using the JAXB jars from CS to help with the
field mapping and building the requests using the Jersey library
(although it would make more sense to use the CS Java Client library

for

this). The decision to use Services API was partly so I could get to
know the API and partly because I prefer the feedback I get - if the
load fails, it's much easier to find out what went wrong. Nuxeo

shell

import would sometimes fail and I had no idea how far I had got or

which

record had caused the problem.

We have about 33,000 artworks and these have been imported. If I
remember correctly this takes 4-5 hours. I'm afraid I haven't timed

the

imports accurately, I'm just trying to remember roughly how long it
takes. I've also imported persons (artists and featured persons),
movement records, intake records, acquistion records, vocabularies

and

relations between these. Each of these took 'hours' spread over a

number

of weeks. I've not attempted the whole lot in a single job.

I had supposed that the collectionobject records would represent the
greatest load because they contain the most data but it appears that

the

overhead for an operation on a record (ie. waiting for a http

response)

is taking the most time and that the amount of data in a record is

not

so significant. So it's all the relations that are taking the most

time

(especially movement relations as there can be many movements for

each

work and I create a relation in each direction). I may end with
generating records and using the CS 'import' functionality if this
proves faster.

All the above was on CS version 1.0b. We've recently switched to 1.3

but

currently I'm working on schema extension rather than importing so I
don't have many records loaded. Just ask if you've any more

questions or

if anything is not clear...

Regards,
Chris

-----Oprindelig meddelelse-----
Fra: Chris Hoffman [mailto:chris.hoffman@berkeley.edu]
Sendt: 2. februar 2011 19:11
Til: Christopher Pott
Cc: talk@lists.collectionspace.org
Emne: Re: [Talk] adding new fields to collectionobject

Hi Chris,

It's great to hear about your success with schema extensions!  We've
been doing a lot of work with the UCJEPS herbaria on extending the
collectionobject schema to add fields useful for herbaria and other
natural history collections.

Did anyone reply to your question about boolean fields?

We're experimenting with loading some larger data volumes into a

CSpace

1.0 instance, and I'm wondering what you are doing with data

loading.

How are you doing data import at this point?  Are you still creating

XML

records and loading via the nuxeo shell?  How many records have you
loaded into your instance?  And what version of CSpace are you

using?

Thanks,
Chris

On Feb 1, 2011, at 1:30 AM, Christopher Pott wrote:

Hi all,

Thanks to the instructions at

ld+or+group+of+fields (and the related pages) I've just been able

to

add

new local and domain (finearts) schemas to extend collectionobject.

It

took me longer than it probably should have but this was only due

to

my

inability to slow down and read the instructions properly. Although

I

knew the intention was to make configuration straightforward, I was
still surprised to see how simple the process was (ie. no coding
required) and was really impressed to see the new (text) fields up

and

working so quickly and the new content being saved and searched.

My main outstanding issue now is that I get some unexpected results

when

adding new fields of type boolean. These fields are defined in the

xsd

as xs:boolean, represented in mySql as bit(1) and implemented in

the

UI

as checkboxes. My problem is that whatever the state of the

checkbox

when saved, "false" is always returned by chain and the box is

always

checked upon reload. As there are no boolean fields in the current
schemas could someone please help me with an example of how they

should

be correctly configured?

Cheers,
Chris

Developer, Corpus Project
Statens Museum for Kunst (National Gallery of Denmark)


Talk mailing list
Talk@lists.collectionspace.org

pace.org


Talk mailing list
Talk@lists.collectionspace.org

ce.org

Hi Susan, > Actually Patrick Schmitz is encouraging us to create XML payloads to use > with forthcoming import tools rather than continuing to use the java > client. Yes, I'm also hoping this will prove to be much faster. > Are you still using the Advanced XML step in Talend to create > your XML? I'm using it for collectionobjects, but nothing else. This is because I later found another method (tJavaRow + importing the CS JAXB libraries) which I preferred. > Is it proving useful for creating all the structure that we > need in the XML for CSpace (earlier you said it didn't really support > multiple repeating fields, etc.)? I create repeating fields both using Talends Advanced XML and by just using Java (in Talend). Both methods result in a complete xml file but so far the Java approach has been a lot less work and is more reliable. > Is there a way to save a sample > transformation that shows how you create XML from the data that comes > out of your database? I'm still struggling with how to use an ETL tool > for this. Yes, I'll create a page on the wiki which shows how I'm approaching it. Cheers, Chris > -----Oprindelig meddelelse----- > Fra: Susan Stone [mailto:sstone@socrates.berkeley.edu] > Sendt: 4. februar 2011 03:27 > Til: Christopher Pott > Cc: Chris Hoffman; talk@lists.collectionspace.org > Emne: Re: [Talk] adding new fields to collectionobject > > Chris (Pott), > > Actually Patrick Schmitz is encouraging us to create XML payloads to use > with forthcoming import tools rather than continuing to use the java > client. Are you still using the Advanced XML step in Talend to create > your XML? Is it proving useful for creating all the structure that we > need in the XML for CSpace (earlier you said it didn't really support > multiple repeating fields, etc.)? Is there a way to save a sample > transformation that shows how you create XML from the data that comes > out of your database? I'm still struggling with how to use an ETL tool > for this. > > Thanks, > Susan Stone > Informatics Group, Data Services, Berkeley > > On 02/03/2011 02:05 AM, Christopher Pott wrote: > > Hi Chris, > > > > I've had no responses other than the ones on the list. I've yet to > > follow up on the hint to check out the Persons schema. > > > > For data loading, I'm currently using the CS Services API from within > > Talend Open Studio. I'm using the JAXB jars from CS to help with the > > field mapping and building the requests using the Jersey library > > (although it would make more sense to use the CS Java Client library for > > this). The decision to use Services API was partly so I could get to > > know the API and partly because I prefer the feedback I get - if the > > load fails, it's much easier to find out what went wrong. Nuxeo shell > > import would sometimes fail and I had no idea how far I had got or which > > record had caused the problem. > > > > We have about 33,000 artworks and these have been imported. If I > > remember correctly this takes 4-5 hours. I'm afraid I haven't timed the > > imports accurately, I'm just trying to remember roughly how long it > > takes. I've also imported persons (artists and featured persons), > > movement records, intake records, acquistion records, vocabularies and > > relations between these. Each of these took 'hours' spread over a number > > of weeks. I've not attempted the whole lot in a single job. > > > > I had supposed that the collectionobject records would represent the > > greatest load because they contain the most data but it appears that the > > overhead for an operation on a record (ie. waiting for a http response) > > is taking the most time and that the amount of data in a record is not > > so significant. So it's all the relations that are taking the most time > > (especially movement relations as there can be many movements for each > > work and I create a relation in each direction). I may end with > > generating records and using the CS 'import' functionality if this > > proves faster. > > > > All the above was on CS version 1.0b. We've recently switched to 1.3 but > > currently I'm working on schema extension rather than importing so I > > don't have many records loaded. Just ask if you've any more questions or > > if anything is not clear... > > > > Regards, > > Chris > > > > > > -----Oprindelig meddelelse----- > > Fra: Chris Hoffman [mailto:chris.hoffman@berkeley.edu] > > Sendt: 2. februar 2011 19:11 > > Til: Christopher Pott > > Cc: talk@lists.collectionspace.org > > Emne: Re: [Talk] adding new fields to collectionobject > > > > Hi Chris, > > > > It's great to hear about your success with schema extensions! We've > > been doing a lot of work with the UCJEPS herbaria on extending the > > collectionobject schema to add fields useful for herbaria and other > > natural history collections. > > > > Did anyone reply to your question about boolean fields? > > > > We're experimenting with loading some larger data volumes into a CSpace > > 1.0 instance, and I'm wondering what you are doing with data loading. > > How are you doing data import at this point? Are you still creating XML > > records and loading via the nuxeo shell? How many records have you > > loaded into your instance? And what version of CSpace are you using? > > > > Thanks, > > Chris > > > > On Feb 1, 2011, at 1:30 AM, Christopher Pott wrote: > > > >> Hi all, > >> > >> Thanks to the instructions at > >> > > http://wiki.collectionspace.org/display/collectionspace/How+to+add+a+fie > >> ld+or+group+of+fields (and the related pages) I've just been able to > > add > >> new local and domain (finearts) schemas to extend collectionobject. It > >> took me longer than it probably should have but this was only due to > > my > >> inability to slow down and read the instructions properly. Although I > >> knew the intention was to make configuration straightforward, I was > >> still surprised to see how simple the process was (ie. no coding > >> required) and was really impressed to see the new (text) fields up and > >> working so quickly and the new content being saved and searched. > >> > >> My main outstanding issue now is that I get some unexpected results > > when > >> adding new fields of type boolean. These fields are defined in the xsd > >> as xs:boolean, represented in mySql as bit(1) and implemented in the > > UI > >> as checkboxes. My problem is that whatever the state of the checkbox > >> when saved, "false" is always returned by chain and the box is always > >> checked upon reload. As there are no boolean fields in the current > >> schemas could someone please help me with an example of how they > > should > >> be correctly configured? > >> > >> Cheers, > >> Chris > >> > >> Developer, Corpus Project > >> Statens Museum for Kunst (National Gallery of Denmark) > >> > >> > >> > >> > >> > >> > >> _______________________________________________ > >> Talk mailing list > >> Talk@lists.collectionspace.org > >> > > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collections > > pace.org > > > > > > _______________________________________________ > > Talk mailing list > > Talk@lists.collectionspace.org > > > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collections pa > ce.org
PS
Patrick Schmitz
Fri, Feb 4, 2011 4:10 PM

This is great Chris - really appreciate your taking the lead on this. I'll
talk to Jesse about renaming the list ;^)

Patrick

-----Original Message-----
From: talk-bounces@lists.collectionspace.org
[mailto:talk-bounces@lists.collectionspace.org] On Behalf Of
Christopher Pott
Sent: Friday, February 04, 2011 3:03 AM
To: Chris Hoffman
Cc: talk@lists.collectionspace.org
Subject: Re: [Talk] Loading data

Hi Chris,

(I think we should change the name of this mailing list to

the chris-

collectionspace-list!)

At least it looks to the casual observer like 'chris' is a
really busy worker :-)

As Susan raised some similar questions (about mapping and repeatablity
etc.) I thought I'd start a page on the CS wiki detailing how
I'm mapping data using Talend.

Hopefully as others start mapping we can all contribute to
this page and try to build up some kind of 'best practice'
and common modules we can share.

Cheers,
Chris

-----Oprindelig meddelelse-----
Fra: Chris Hoffman [mailto:chris.hoffman@berkeley.edu]
Sendt: 3. februar 2011 19:03
Til: Christopher Pott
Cc: talk@lists.collectionspace.org
Emne: Loading data

Hi Chris (Pott),

(I think we should change the name of this mailing list to

the chris-

collectionspace-list!)

Thanks so much for this good information about data loading.  It's

very

helpful, and we will look into the approach you described.  The
CollectionSpace roadmap shows some new work on import and export in

the

1.5 timeframe.

2.0
We will be keeping a close eye on this too.

Like you, we have also found that performance is heavily affected by

the

number of relations something has.  Another challenging

area for data

loading seems to be repeating fields.  If an object has multiple

object

names for instance, what is the best way to import that information?

With

the original create transaction or as an update?  We've talked a bit

with

the services team here at UCB, and they are thinking about using XML

to

represent these kinds of relationships, probably using

something like

Talend or Kettle to create the XML information from data

files or from
the

database itself.  We haven't really explored this yet, but we will

have to

soon.

Anyway, it's good to hear what you all are doing.  We'll talk again

soon

on the chris-collectionspace-list :-)

Chris (Hoffman)

On Feb 3, 2011, at 2:05 AM, Christopher Pott wrote:

Hi Chris,

I've had no responses other than the ones on the list.

I've yet to

follow up on the hint to check out the Persons schema.

For data loading, I'm currently using the CS Services API from

within

Talend Open Studio. I'm using the JAXB jars from CS to

help with the

field mapping and building the requests using the Jersey library
(although it would make more sense to use the CS Java

Client library
for

this). The decision to use Services API was partly so I

could get to

know the API and partly because I prefer the feedback I

get - if the

load fails, it's much easier to find out what went wrong. Nuxeo

shell

import would sometimes fail and I had no idea how far I had got or

which

record had caused the problem.

We have about 33,000 artworks and these have been imported. If I
remember correctly this takes 4-5 hours. I'm afraid I

haven't timed
the

imports accurately, I'm just trying to remember roughly

how long it

takes. I've also imported persons (artists and featured persons),
movement records, intake records, acquistion records, vocabularies

and

relations between these. Each of these took 'hours' spread over a

number

of weeks. I've not attempted the whole lot in a single job.

I had supposed that the collectionobject records would

represent the

greatest load because they contain the most data but it

appears that
the

overhead for an operation on a record (ie. waiting for a http

response)

is taking the most time and that the amount of data in a record is

not

so significant. So it's all the relations that are taking the most

time

(especially movement relations as there can be many movements for

each

work and I create a relation in each direction). I may end with
generating records and using the CS 'import'

functionality if this

proves faster.

All the above was on CS version 1.0b. We've recently

switched to 1.3
but

currently I'm working on schema extension rather than

importing so I

don't have many records loaded. Just ask if you've any more

questions or

if anything is not clear...

Regards,
Chris

-----Oprindelig meddelelse-----
Fra: Chris Hoffman [mailto:chris.hoffman@berkeley.edu]
Sendt: 2. februar 2011 19:11
Til: Christopher Pott
Cc: talk@lists.collectionspace.org
Emne: Re: [Talk] adding new fields to collectionobject

Hi Chris,

It's great to hear about your success with schema

extensions!  We've

been doing a lot of work with the UCJEPS herbaria on

extending the

collectionobject schema to add fields useful for herbaria

and other

natural history collections.

Did anyone reply to your question about boolean fields?

We're experimenting with loading some larger data volumes into a

CSpace

1.0 instance, and I'm wondering what you are doing with data

loading.

How are you doing data import at this point?  Are you

still creating
XML

records and loading via the nuxeo shell?  How many

records have you

loaded into your instance?  And what version of CSpace are you

using?

Thanks,
Chris

On Feb 1, 2011, at 1:30 AM, Christopher Pott wrote:

Hi all,

Thanks to the instructions at

ld+or+group+of+fields (and the related pages) I've just been able

to

add

new local and domain (finearts) schemas to extend

collectionobject.
It

took me longer than it probably should have but this was only due

to

my

inability to slow down and read the instructions

properly. Although
I

knew the intention was to make configuration

straightforward, I was

still surprised to see how simple the process was (ie. no coding
required) and was really impressed to see the new (text)

fields up
and

working so quickly and the new content being saved and searched.

My main outstanding issue now is that I get some

unexpected results

when

adding new fields of type boolean. These fields are

defined in the
xsd

as xs:boolean, represented in mySql as bit(1) and implemented in

the

UI

as checkboxes. My problem is that whatever the state of the

checkbox

when saved, "false" is always returned by chain and the box is

always

checked upon reload. As there are no boolean fields in

the current

schemas could someone please help me with an example of how they

should

be correctly configured?

Cheers,
Chris

Developer, Corpus Project
Statens Museum for Kunst (National Gallery of Denmark)


Talk mailing list
Talk@lists.collectionspace.org

pace.org

This is great Chris - really appreciate your taking the lead on this. I'll talk to Jesse about renaming the list ;^) Patrick > -----Original Message----- > From: talk-bounces@lists.collectionspace.org > [mailto:talk-bounces@lists.collectionspace.org] On Behalf Of > Christopher Pott > Sent: Friday, February 04, 2011 3:03 AM > To: Chris Hoffman > Cc: talk@lists.collectionspace.org > Subject: Re: [Talk] Loading data > > Hi Chris, > > > (I think we should change the name of this mailing list to > the chris- > > collectionspace-list!) > > At least it looks to the casual observer like 'chris' is a > really busy worker :-) > > As Susan raised some similar questions (about mapping and repeatablity > etc.) I thought I'd start a page on the CS wiki detailing how > I'm mapping data using Talend. > > Hopefully as others start mapping we can all contribute to > this page and try to build up some kind of 'best practice' > and common modules we can share. > > Cheers, > Chris > > > -----Oprindelig meddelelse----- > > Fra: Chris Hoffman [mailto:chris.hoffman@berkeley.edu] > > Sendt: 3. februar 2011 19:03 > > Til: Christopher Pott > > Cc: talk@lists.collectionspace.org > > Emne: Loading data > > > > Hi Chris (Pott), > > > > (I think we should change the name of this mailing list to > the chris- > > collectionspace-list!) > > > > Thanks so much for this good information about data loading. It's > very > > helpful, and we will look into the approach you described. The > > CollectionSpace roadmap shows some new work on import and export in > the > > 1.5 timeframe. > > > > > https://wiki.collectionspace.org:8444/display/collectionspace/ > Road+Map+t > o+ > > 2.0 > > We will be keeping a close eye on this too. > > > > Like you, we have also found that performance is heavily affected by > the > > number of relations something has. Another challenging > area for data > > loading seems to be repeating fields. If an object has multiple > object > > names for instance, what is the best way to import that information? > With > > the original create transaction or as an update? We've talked a bit > with > > the services team here at UCB, and they are thinking about using XML > to > > represent these kinds of relationships, probably using > something like > > Talend or Kettle to create the XML information from data > files or from > the > > database itself. We haven't really explored this yet, but we will > have to > > soon. > > > > Anyway, it's good to hear what you all are doing. We'll talk again > soon > > on the chris-collectionspace-list :-) > > > > Chris (Hoffman) > > > > On Feb 3, 2011, at 2:05 AM, Christopher Pott wrote: > > > > > Hi Chris, > > > > > > I've had no responses other than the ones on the list. > I've yet to > > > follow up on the hint to check out the Persons schema. > > > > > > For data loading, I'm currently using the CS Services API from > within > > > Talend Open Studio. I'm using the JAXB jars from CS to > help with the > > > field mapping and building the requests using the Jersey library > > > (although it would make more sense to use the CS Java > Client library > for > > > this). The decision to use Services API was partly so I > could get to > > > know the API and partly because I prefer the feedback I > get - if the > > > load fails, it's much easier to find out what went wrong. Nuxeo > shell > > > import would sometimes fail and I had no idea how far I had got or > which > > > record had caused the problem. > > > > > > We have about 33,000 artworks and these have been imported. If I > > > remember correctly this takes 4-5 hours. I'm afraid I > haven't timed > the > > > imports accurately, I'm just trying to remember roughly > how long it > > > takes. I've also imported persons (artists and featured persons), > > > movement records, intake records, acquistion records, vocabularies > and > > > relations between these. Each of these took 'hours' spread over a > number > > > of weeks. I've not attempted the whole lot in a single job. > > > > > > I had supposed that the collectionobject records would > represent the > > > greatest load because they contain the most data but it > appears that > the > > > overhead for an operation on a record (ie. waiting for a http > response) > > > is taking the most time and that the amount of data in a record is > not > > > so significant. So it's all the relations that are taking the most > time > > > (especially movement relations as there can be many movements for > each > > > work and I create a relation in each direction). I may end with > > > generating records and using the CS 'import' > functionality if this > > > proves faster. > > > > > > All the above was on CS version 1.0b. We've recently > switched to 1.3 > but > > > currently I'm working on schema extension rather than > importing so I > > > don't have many records loaded. Just ask if you've any more > questions or > > > if anything is not clear... > > > > > > Regards, > > > Chris > > > > > > > > > -----Oprindelig meddelelse----- > > > Fra: Chris Hoffman [mailto:chris.hoffman@berkeley.edu] > > > Sendt: 2. februar 2011 19:11 > > > Til: Christopher Pott > > > Cc: talk@lists.collectionspace.org > > > Emne: Re: [Talk] adding new fields to collectionobject > > > > > > Hi Chris, > > > > > > It's great to hear about your success with schema > extensions! We've > > > been doing a lot of work with the UCJEPS herbaria on > extending the > > > collectionobject schema to add fields useful for herbaria > and other > > > natural history collections. > > > > > > Did anyone reply to your question about boolean fields? > > > > > > We're experimenting with loading some larger data volumes into a > CSpace > > > 1.0 instance, and I'm wondering what you are doing with data > loading. > > > How are you doing data import at this point? Are you > still creating > XML > > > records and loading via the nuxeo shell? How many > records have you > > > loaded into your instance? And what version of CSpace are you > using? > > > > > > Thanks, > > > Chris > > > > > > On Feb 1, 2011, at 1:30 AM, Christopher Pott wrote: > > > > > >> Hi all, > > >> > > >> Thanks to the instructions at > > >> > > > > http://wiki.collectionspace.org/display/collectionspace/How+to > +add+a+fie > > >> ld+or+group+of+fields (and the related pages) I've just been able > to > > > add > > >> new local and domain (finearts) schemas to extend > collectionobject. > It > > >> took me longer than it probably should have but this was only due > to > > > my > > >> inability to slow down and read the instructions > properly. Although > I > > >> knew the intention was to make configuration > straightforward, I was > > >> still surprised to see how simple the process was (ie. no coding > > >> required) and was really impressed to see the new (text) > fields up > and > > >> working so quickly and the new content being saved and searched. > > >> > > >> My main outstanding issue now is that I get some > unexpected results > > > when > > >> adding new fields of type boolean. These fields are > defined in the > xsd > > >> as xs:boolean, represented in mySql as bit(1) and implemented in > the > > > UI > > >> as checkboxes. My problem is that whatever the state of the > checkbox > > >> when saved, "false" is always returned by chain and the box is > always > > >> checked upon reload. As there are no boolean fields in > the current > > >> schemas could someone please help me with an example of how they > > > should > > >> be correctly configured? > > >> > > >> Cheers, > > >> Chris > > >> > > >> Developer, Corpus Project > > >> Statens Museum for Kunst (National Gallery of Denmark) > > >> > > >> > > >> > > >> > > >> > > >> > > >> _______________________________________________ > > >> Talk mailing list > > >> Talk@lists.collectionspace.org > > >> > > > > http://lists.collectionspace.org/mailman/listinfo/talk_lists.c > ollections > > > pace.org > > > > > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > http://lists.collectionspace.org/mailman/listinfo/talk_lists.c > ollectionspace.org >
CM
Chris Martin
Fri, Feb 4, 2011 4:37 PM

which Chris is taking the lead... it is all so confusing.

Chris

On 04/02/2011 16:10, Patrick Schmitz wrote:

This is great Chris - really appreciate your taking the lead on this. I'll
talk to Jesse about renaming the list ;^)

Patrick

-----Original Message-----
From: talk-bounces@lists.collectionspace.org
[mailto:talk-bounces@lists.collectionspace.org] On Behalf Of
Christopher Pott
Sent: Friday, February 04, 2011 3:03 AM
To: Chris Hoffman
Cc: talk@lists.collectionspace.org
Subject: Re: [Talk] Loading data

Hi Chris,

(I think we should change the name of this mailing list to

the chris-

collectionspace-list!)

At least it looks to the casual observer like 'chris' is a
really busy worker :-)

As Susan raised some similar questions (about mapping and repeatablity
etc.) I thought I'd start a page on the CS wiki detailing how
I'm mapping data using Talend.

Hopefully as others start mapping we can all contribute to
this page and try to build up some kind of 'best practice'
and common modules we can share.

Cheers,
Chris

-----Oprindelig meddelelse-----
Fra: Chris Hoffman [mailto:chris.hoffman@berkeley.edu]
Sendt: 3. februar 2011 19:03
Til: Christopher Pott
Cc: talk@lists.collectionspace.org
Emne: Loading data

Hi Chris (Pott),

(I think we should change the name of this mailing list to

the chris-

collectionspace-list!)

Thanks so much for this good information about data loading.  It's

very

helpful, and we will look into the approach you described.  The
CollectionSpace roadmap shows some new work on import and export in

the

1.5 timeframe.

2.0
We will be keeping a close eye on this too.

Like you, we have also found that performance is heavily affected by

the

number of relations something has.  Another challenging

area for data

loading seems to be repeating fields.  If an object has multiple

object

names for instance, what is the best way to import that information?

With

the original create transaction or as an update?  We've talked a bit

with

the services team here at UCB, and they are thinking about using XML

to

represent these kinds of relationships, probably using

something like

Talend or Kettle to create the XML information from data

files or from
the

database itself.  We haven't really explored this yet, but we will

have to

soon.

Anyway, it's good to hear what you all are doing.  We'll talk again

soon

on the chris-collectionspace-list :-)

Chris (Hoffman)

On Feb 3, 2011, at 2:05 AM, Christopher Pott wrote:

Hi Chris,

I've had no responses other than the ones on the list.

I've yet to

follow up on the hint to check out the Persons schema.

For data loading, I'm currently using the CS Services API from

within

Talend Open Studio. I'm using the JAXB jars from CS to

help with the

field mapping and building the requests using the Jersey library
(although it would make more sense to use the CS Java

Client library
for

this). The decision to use Services API was partly so I

could get to

know the API and partly because I prefer the feedback I

get - if the

load fails, it's much easier to find out what went wrong. Nuxeo

shell

import would sometimes fail and I had no idea how far I had got or

which

record had caused the problem.

We have about 33,000 artworks and these have been imported. If I
remember correctly this takes 4-5 hours. I'm afraid I

haven't timed
the

imports accurately, I'm just trying to remember roughly

how long it

takes. I've also imported persons (artists and featured persons),
movement records, intake records, acquistion records, vocabularies

and

relations between these. Each of these took 'hours' spread over a

number

of weeks. I've not attempted the whole lot in a single job.

I had supposed that the collectionobject records would

represent the

greatest load because they contain the most data but it

appears that
the

overhead for an operation on a record (ie. waiting for a http

response)

is taking the most time and that the amount of data in a record is

not

so significant. So it's all the relations that are taking the most

time

(especially movement relations as there can be many movements for

each

work and I create a relation in each direction). I may end with
generating records and using the CS 'import'

functionality if this

proves faster.

All the above was on CS version 1.0b. We've recently

switched to 1.3
but

currently I'm working on schema extension rather than

importing so I

don't have many records loaded. Just ask if you've any more

questions or

if anything is not clear...

Regards,
Chris

-----Oprindelig meddelelse-----
Fra: Chris Hoffman [mailto:chris.hoffman@berkeley.edu]
Sendt: 2. februar 2011 19:11
Til: Christopher Pott
Cc: talk@lists.collectionspace.org
Emne: Re: [Talk] adding new fields to collectionobject

Hi Chris,

It's great to hear about your success with schema

extensions!  We've

been doing a lot of work with the UCJEPS herbaria on

extending the

collectionobject schema to add fields useful for herbaria

and other

natural history collections.

Did anyone reply to your question about boolean fields?

We're experimenting with loading some larger data volumes into a

CSpace

1.0 instance, and I'm wondering what you are doing with data

loading.

How are you doing data import at this point?  Are you

still creating
XML

records and loading via the nuxeo shell?  How many

records have you

loaded into your instance?  And what version of CSpace are you

using?

Thanks,
Chris

On Feb 1, 2011, at 1:30 AM, Christopher Pott wrote:

Hi all,

Thanks to the instructions at

ld+or+group+of+fields (and the related pages) I've just been able

to

add

new local and domain (finearts) schemas to extend

collectionobject.
It

took me longer than it probably should have but this was only due

to

my

inability to slow down and read the instructions

properly. Although
I

knew the intention was to make configuration

straightforward, I was

still surprised to see how simple the process was (ie. no coding
required) and was really impressed to see the new (text)

fields up
and

working so quickly and the new content being saved and searched.

My main outstanding issue now is that I get some

unexpected results

when

adding new fields of type boolean. These fields are

defined in the
xsd

as xs:boolean, represented in mySql as bit(1) and implemented in

the

UI

as checkboxes. My problem is that whatever the state of the

checkbox

when saved, "false" is always returned by chain and the box is

always

checked upon reload. As there are no boolean fields in

the current

schemas could someone please help me with an example of how they

should

be correctly configured?

Cheers,
Chris

Developer, Corpus Project
Statens Museum for Kunst (National Gallery of Denmark)


Talk mailing list
Talk@lists.collectionspace.org

pace.org

which Chris is taking the lead... it is all so confusing. Chris On 04/02/2011 16:10, Patrick Schmitz wrote: > This is great Chris - really appreciate your taking the lead on this. I'll > talk to Jesse about renaming the list ;^) > > Patrick > >> -----Original Message----- >> From: talk-bounces@lists.collectionspace.org >> [mailto:talk-bounces@lists.collectionspace.org] On Behalf Of >> Christopher Pott >> Sent: Friday, February 04, 2011 3:03 AM >> To: Chris Hoffman >> Cc: talk@lists.collectionspace.org >> Subject: Re: [Talk] Loading data >> >> Hi Chris, >> >>> (I think we should change the name of this mailing list to >> the chris- >>> collectionspace-list!) >> At least it looks to the casual observer like 'chris' is a >> really busy worker :-) >> >> As Susan raised some similar questions (about mapping and repeatablity >> etc.) I thought I'd start a page on the CS wiki detailing how >> I'm mapping data using Talend. >> >> Hopefully as others start mapping we can all contribute to >> this page and try to build up some kind of 'best practice' >> and common modules we can share. >> >> Cheers, >> Chris >> >>> -----Oprindelig meddelelse----- >>> Fra: Chris Hoffman [mailto:chris.hoffman@berkeley.edu] >>> Sendt: 3. februar 2011 19:03 >>> Til: Christopher Pott >>> Cc: talk@lists.collectionspace.org >>> Emne: Loading data >>> >>> Hi Chris (Pott), >>> >>> (I think we should change the name of this mailing list to >> the chris- >>> collectionspace-list!) >>> >>> Thanks so much for this good information about data loading. It's >> very >>> helpful, and we will look into the approach you described. The >>> CollectionSpace roadmap shows some new work on import and export in >> the >>> 1.5 timeframe. >>> >>> >> https://wiki.collectionspace.org:8444/display/collectionspace/ >> Road+Map+t >> o+ >>> 2.0 >>> We will be keeping a close eye on this too. >>> >>> Like you, we have also found that performance is heavily affected by >> the >>> number of relations something has. Another challenging >> area for data >>> loading seems to be repeating fields. If an object has multiple >> object >>> names for instance, what is the best way to import that information? >> With >>> the original create transaction or as an update? We've talked a bit >> with >>> the services team here at UCB, and they are thinking about using XML >> to >>> represent these kinds of relationships, probably using >> something like >>> Talend or Kettle to create the XML information from data >> files or from >> the >>> database itself. We haven't really explored this yet, but we will >> have to >>> soon. >>> >>> Anyway, it's good to hear what you all are doing. We'll talk again >> soon >>> on the chris-collectionspace-list :-) >>> >>> Chris (Hoffman) >>> >>> On Feb 3, 2011, at 2:05 AM, Christopher Pott wrote: >>> >>>> Hi Chris, >>>> >>>> I've had no responses other than the ones on the list. >> I've yet to >>>> follow up on the hint to check out the Persons schema. >>>> >>>> For data loading, I'm currently using the CS Services API from >> within >>>> Talend Open Studio. I'm using the JAXB jars from CS to >> help with the >>>> field mapping and building the requests using the Jersey library >>>> (although it would make more sense to use the CS Java >> Client library >> for >>>> this). The decision to use Services API was partly so I >> could get to >>>> know the API and partly because I prefer the feedback I >> get - if the >>>> load fails, it's much easier to find out what went wrong. Nuxeo >> shell >>>> import would sometimes fail and I had no idea how far I had got or >> which >>>> record had caused the problem. >>>> >>>> We have about 33,000 artworks and these have been imported. If I >>>> remember correctly this takes 4-5 hours. I'm afraid I >> haven't timed >> the >>>> imports accurately, I'm just trying to remember roughly >> how long it >>>> takes. I've also imported persons (artists and featured persons), >>>> movement records, intake records, acquistion records, vocabularies >> and >>>> relations between these. Each of these took 'hours' spread over a >> number >>>> of weeks. I've not attempted the whole lot in a single job. >>>> >>>> I had supposed that the collectionobject records would >> represent the >>>> greatest load because they contain the most data but it >> appears that >> the >>>> overhead for an operation on a record (ie. waiting for a http >> response) >>>> is taking the most time and that the amount of data in a record is >> not >>>> so significant. So it's all the relations that are taking the most >> time >>>> (especially movement relations as there can be many movements for >> each >>>> work and I create a relation in each direction). I may end with >>>> generating records and using the CS 'import' >> functionality if this >>>> proves faster. >>>> >>>> All the above was on CS version 1.0b. We've recently >> switched to 1.3 >> but >>>> currently I'm working on schema extension rather than >> importing so I >>>> don't have many records loaded. Just ask if you've any more >> questions or >>>> if anything is not clear... >>>> >>>> Regards, >>>> Chris >>>> >>>> >>>> -----Oprindelig meddelelse----- >>>> Fra: Chris Hoffman [mailto:chris.hoffman@berkeley.edu] >>>> Sendt: 2. februar 2011 19:11 >>>> Til: Christopher Pott >>>> Cc: talk@lists.collectionspace.org >>>> Emne: Re: [Talk] adding new fields to collectionobject >>>> >>>> Hi Chris, >>>> >>>> It's great to hear about your success with schema >> extensions! We've >>>> been doing a lot of work with the UCJEPS herbaria on >> extending the >>>> collectionobject schema to add fields useful for herbaria >> and other >>>> natural history collections. >>>> >>>> Did anyone reply to your question about boolean fields? >>>> >>>> We're experimenting with loading some larger data volumes into a >> CSpace >>>> 1.0 instance, and I'm wondering what you are doing with data >> loading. >>>> How are you doing data import at this point? Are you >> still creating >> XML >>>> records and loading via the nuxeo shell? How many >> records have you >>>> loaded into your instance? And what version of CSpace are you >> using? >>>> Thanks, >>>> Chris >>>> >>>> On Feb 1, 2011, at 1:30 AM, Christopher Pott wrote: >>>> >>>>> Hi all, >>>>> >>>>> Thanks to the instructions at >>>>> >> http://wiki.collectionspace.org/display/collectionspace/How+to >> +add+a+fie >>>>> ld+or+group+of+fields (and the related pages) I've just been able >> to >>>> add >>>>> new local and domain (finearts) schemas to extend >> collectionobject. >> It >>>>> took me longer than it probably should have but this was only due >> to >>>> my >>>>> inability to slow down and read the instructions >> properly. Although >> I >>>>> knew the intention was to make configuration >> straightforward, I was >>>>> still surprised to see how simple the process was (ie. no coding >>>>> required) and was really impressed to see the new (text) >> fields up >> and >>>>> working so quickly and the new content being saved and searched. >>>>> >>>>> My main outstanding issue now is that I get some >> unexpected results >>>> when >>>>> adding new fields of type boolean. These fields are >> defined in the >> xsd >>>>> as xs:boolean, represented in mySql as bit(1) and implemented in >> the >>>> UI >>>>> as checkboxes. My problem is that whatever the state of the >> checkbox >>>>> when saved, "false" is always returned by chain and the box is >> always >>>>> checked upon reload. As there are no boolean fields in >> the current >>>>> schemas could someone please help me with an example of how they >>>> should >>>>> be correctly configured? >>>>> >>>>> Cheers, >>>>> Chris >>>>> >>>>> Developer, Corpus Project >>>>> Statens Museum for Kunst (National Gallery of Denmark) >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Talk mailing list >>>>> Talk@lists.collectionspace.org >>>>> >> http://lists.collectionspace.org/mailman/listinfo/talk_lists.c >> ollections >>>> pace.org >>>> >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> http://lists.collectionspace.org/mailman/listinfo/talk_lists.c >> ollectionspace.org >> > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
ZY
Zenevich, Yura
Wed, Feb 9, 2011 3:14 PM

Chris,

I am pretty sure that the value has to be boolean since javascript will interpret the non empty string as truthy and thing like that will always look like true where the boolean is actually needed. In regards to whether we need an array or not it would be great to see how the generated uispec looks like for that field, but my first reaction is to say the we probably don't need an array there and just boolean should be sufficient enough.

Yura


From: Chris Martin [csm22@caret.cam.ac.uk]
Sent: Thursday, February 03, 2011 8:46 AM
To: Christopher Pott
Cc: talk@lists.collectionspace.org; Zenevich, Yura
Subject: Re: SV: [Talk] adding new fields to collectionobject

ok so I think I see what is happening.
the app sends the UI :
"smkVerso": "false",
and the UI sends the app: "smkVerso":["true"] or "smkVerso":[] for a
false value.

This suggests that the UI is expecting an array, I need to confirm with
yura whether an array is the expected behaviour for a boolean value. And
whether the uischema needs to be tweaked so it specifies boolean instead
of string.

If an array is not the expect format for the UI then I suspect yura will
have to look into what needs to be changed from an UI point of view but
if that is the required format then I can quickly extend the App to
correctly deal with  booleans and return an array and then convert that
back into a string for the services.

It seems to be that it is checking the checkbox if anything other than
an empty array is returned. Am I right in assuming that when you create
a collectionobject that the checkbox is not checked?

Am I right in assuming you are working with v1.3 build or is it an
earlier build?

Chris

On 03/02/2011 12:29, Christopher Pott wrote:

Hi Chris,

I've attached a bunch of files containing the data you requested, I hope
they're pretty self explanatory. I noticed that....
*The chain GET seems to be correct
*The uischema shows the type of the new boolean field as "string"

Some extra info.....

In collectionobjects_smk.xsd;
<xs:element name="smkVerso" type="xs:boolean" />

In cspace-config.xml:
<field id="smkVerso" section="smk">
<selector>csc-smk-verso</selector>
</field>

In ObjectEntryTemplate.html:

<div class="info-pair"> <div class="header"> <div class="label">Verso</div> </div> <div class="content" //also tried "checkbox" here <input type="checkbox" class="csc-smk-verso"/> </div> </div>

Thanks for the help,
Chris


Fra: Chris Martin [mailto:csm22@caret.cam.ac.uk]
Sendt: 3. februar 2011 11:27
Til: Christopher Pott; talk@lists.collectionspace.org
Emne: Re: [Talk] adding new fields to collectionobject

Hi Chris,

Sorry for not replying to you earlier but I have had my head stuck in
config simplification.

My name is Chris and I work mainly with the App layer. Which is really
just a glue layer to allow the UI to talk in JSON and the Service layer
to talk in XML and everyone to understand each other. So from my point
of view it would be interesting to see what everyone is saying and
seeing if we are having some mis-communication between the layers.

Is there a way for me to see your UI interface? Because what would be
useful is to look at some of the payloads that are being passed between
the UI and the app. And to be able to mock up some calls to the service
layer so I can see what they are saying. If your UI doesn't have an
externally accessible URL could you do some triage for me and send me
the payloads
(this page is something I quickly put together, that I know needs help
and more info:
http://wiki.collectionspace.org/display/collectionspace/Guidelines+for+B
ug+Triage)
What I am most interested in would be the GET and POST/PUT calls
to /chain/{recordtype}/{csid} that get called when you load up an object
and save it.
If you could specify which is the boolean field and what you believe
ought to be the value in each payload that would be great. It would be
useful to have a payload where you would expect the boolean to be true
and also a second one where you expect it to be false.
And then a second call where the data would be helpful is
/cspace-services/{recordtype in the plural}/{csid}
which should return an xml payload that the services is sending and that
should help diagnose how the service layer is pushing the boolean value
back.

if you could also send me
/chain/{recordid}/uischema
and
/chain/{recordid}/uispec

I can see if the UI is initializing the fields correctly.

So if the value sent in the /chain/ POST/PUT is incorrect but /chain/
GET is correct then the most likely issue is with the UI but if the
schema and uispec aren't being set up correct then the issue might be in
the App not telling the UI to be boolean. However, /cspace-services/
call might not be passing the data initially in a format the App is
expecting.
Or it might just be that the underlying fluid framework in the UI hasn't
been set up to look for checkboxes.

This should be fun.

So any and all info would be really useful

Thanks for your time in this matter.
Chris

On 01/02/2011 09:30, Christopher Pott wrote:
Hi all,

Thanks to the instructions at
http://wiki.collectionspace.org/display/collectionspace/How+to+add+a+fie
ld+or+group+of+fields (and the related pages) I've just been able to add
new local and domain (finearts) schemas to extend collectionobject. It
took me longer than it probably should have but this was only due to my
inability to slow down and read the instructions properly. Although I
knew the intention was to make configuration straightforward, I was
still surprised to see how simple the process was (ie. no coding
required) and was really impressed to see the new (text) fields up and
working so quickly and the new content being saved and searched.

My main outstanding issue now is that I get some unexpected results when
adding new fields of type boolean. These fields are defined in the xsd
as xs:boolean, represented in mySql as bit(1) and implemented in the UI
as checkboxes. My problem is that whatever the state of the checkbox
when saved, "false" is always returned by chain and the box is always
checked upon reload. As there are no boolean fields in the current
schemas could someone please help me with an example of how they should
be correctly configured?

Cheers,
Chris

Developer, Corpus Project
Statens Museum for Kunst (National Gallery of Denmark)


Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collections
pace.org

Chris, I am pretty sure that the value has to be boolean since javascript will interpret the non empty string as truthy and thing like that will always look like true where the boolean is actually needed. In regards to whether we need an array or not it would be great to see how the generated uispec looks like for that field, but my first reaction is to say the we probably don't need an array there and just boolean should be sufficient enough. Yura ________________________________________ From: Chris Martin [csm22@caret.cam.ac.uk] Sent: Thursday, February 03, 2011 8:46 AM To: Christopher Pott Cc: talk@lists.collectionspace.org; Zenevich, Yura Subject: Re: SV: [Talk] adding new fields to collectionobject ok so I think I see what is happening. the app sends the UI : "smkVerso": "false", and the UI sends the app: "smkVerso":["true"] or "smkVerso":[] for a false value. This suggests that the UI is expecting an array, I need to confirm with yura whether an array is the expected behaviour for a boolean value. And whether the uischema needs to be tweaked so it specifies boolean instead of string. If an array is not the expect format for the UI then I suspect yura will have to look into what needs to be changed from an UI point of view but if that is the required format then I can quickly extend the App to correctly deal with booleans and return an array and then convert that back into a string for the services. It seems to be that it is checking the checkbox if anything other than an empty array is returned. Am I right in assuming that when you create a collectionobject that the checkbox is not checked? Am I right in assuming you are working with v1.3 build or is it an earlier build? Chris On 03/02/2011 12:29, Christopher Pott wrote: > Hi Chris, > > I've attached a bunch of files containing the data you requested, I hope > they're pretty self explanatory. I noticed that.... > *The chain GET seems to be correct > *The uischema shows the type of the new boolean field as "string" > > Some extra info..... > > In collectionobjects_smk.xsd; > <xs:element name="smkVerso" type="xs:boolean" /> > > In cspace-config.xml: > <field id="smkVerso" section="smk"> > <selector>csc-smk-verso</selector> > </field> > > In ObjectEntryTemplate.html: > <div class="info-pair"> > <div class="header"> > <div class="label">Verso</div> > </div> > <div class="content" //also tried "checkbox" here > <input type="checkbox" class="csc-smk-verso"/> > </div> > </div> > > Thanks for the help, > Chris > ________________________________________ > Fra: Chris Martin [mailto:csm22@caret.cam.ac.uk] > Sendt: 3. februar 2011 11:27 > Til: Christopher Pott; talk@lists.collectionspace.org > Emne: Re: [Talk] adding new fields to collectionobject > > Hi Chris, > > Sorry for not replying to you earlier but I have had my head stuck in > config simplification. > > My name is Chris and I work mainly with the App layer. Which is really > just a glue layer to allow the UI to talk in JSON and the Service layer > to talk in XML and everyone to understand each other. So from my point > of view it would be interesting to see what everyone is saying and > seeing if we are having some mis-communication between the layers. > > Is there a way for me to see your UI interface? Because what would be > useful is to look at some of the payloads that are being passed between > the UI and the app. And to be able to mock up some calls to the service > layer so I can see what they are saying. If your UI doesn't have an > externally accessible URL could you do some triage for me and send me > the payloads > (this page is something I quickly put together, that I know needs help > and more info: > http://wiki.collectionspace.org/display/collectionspace/Guidelines+for+B > ug+Triage) > What I am most interested in would be the GET and POST/PUT calls > to /chain/{recordtype}/{csid} that get called when you load up an object > and save it. > If you could specify which is the boolean field and what you believe > ought to be the value in each payload that would be great. It would be > useful to have a payload where you would expect the boolean to be true > and also a second one where you expect it to be false. > And then a second call where the data would be helpful is > /cspace-services/{recordtype in the plural}/{csid} > which should return an xml payload that the services is sending and that > should help diagnose how the service layer is pushing the boolean value > back. > > if you could also send me > /chain/{recordid}/uischema > and > /chain/{recordid}/uispec > > I can see if the UI is initializing the fields correctly. > > So if the value sent in the /chain/ POST/PUT is incorrect but /chain/ > GET is correct then the most likely issue is with the UI but if the > schema and uispec aren't being set up correct then the issue might be in > the App not telling the UI to be boolean. However, /cspace-services/ > call might not be passing the data initially in a format the App is > expecting. > Or it might just be that the underlying fluid framework in the UI hasn't > been set up to look for checkboxes. > > This should be fun. > > So any and all info would be really useful > > Thanks for your time in this matter. > Chris > > > On 01/02/2011 09:30, Christopher Pott wrote: > Hi all, > > Thanks to the instructions at > http://wiki.collectionspace.org/display/collectionspace/How+to+add+a+fie > ld+or+group+of+fields (and the related pages) I've just been able to add > new local and domain (finearts) schemas to extend collectionobject. It > took me longer than it probably should have but this was only due to my > inability to slow down and read the instructions properly. Although I > knew the intention was to make configuration straightforward, I was > still surprised to see how simple the process was (ie. no coding > required) and was really impressed to see the new (text) fields up and > working so quickly and the new content being saved and searched. > > My main outstanding issue now is that I get some unexpected results when > adding new fields of type boolean. These fields are defined in the xsd > as xs:boolean, represented in mySql as bit(1) and implemented in the UI > as checkboxes. My problem is that whatever the state of the checkbox > when saved, "false" is always returned by chain and the box is always > checked upon reload. As there are no boolean fields in the current > schemas could someone please help me with an example of how they should > be correctly configured? > > Cheers, > Chris > > Developer, Corpus Project > Statens Museum for Kunst (National Gallery of Denmark) > > > > > > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collections > pace.org
CM
Chris Martin
Thu, Feb 10, 2011 3:31 PM

ok yura I will create a JIRA for you to fix that bug and I will keep the
App sending strings to the UI and expecting strings back. Do you need
anything extra re: schema/spec for booleans?

Chris

On 09/02/2011 15:14, Zenevich, Yura wrote:

Chris,

I am pretty sure that the value has to be boolean since javascript will interpret the non empty string as truthy and thing like that will always look like true where the boolean is actually needed. In regards to whether we need an array or not it would be great to see how the generated uispec looks like for that field, but my first reaction is to say the we probably don't need an array there and just boolean should be sufficient enough.

Yura


From: Chris Martin [csm22@caret.cam.ac.uk]
Sent: Thursday, February 03, 2011 8:46 AM
To: Christopher Pott
Cc: talk@lists.collectionspace.org; Zenevich, Yura
Subject: Re: SV: [Talk] adding new fields to collectionobject

ok so I think I see what is happening.
the app sends the UI :
"smkVerso": "false",
and the UI sends the app: "smkVerso":["true"] or "smkVerso":[] for a
false value.

This suggests that the UI is expecting an array, I need to confirm with
yura whether an array is the expected behaviour for a boolean value. And
whether the uischema needs to be tweaked so it specifies boolean instead
of string.

If an array is not the expect format for the UI then I suspect yura will
have to look into what needs to be changed from an UI point of view but
if that is the required format then I can quickly extend the App to
correctly deal with  booleans and return an array and then convert that
back into a string for the services.

It seems to be that it is checking the checkbox if anything other than
an empty array is returned. Am I right in assuming that when you create
a collectionobject that the checkbox is not checked?

Am I right in assuming you are working with v1.3 build or is it an
earlier build?

Chris

On 03/02/2011 12:29, Christopher Pott wrote:

Hi Chris,

I've attached a bunch of files containing the data you requested, I hope
they're pretty self explanatory. I noticed that....
*The chain GET seems to be correct
*The uischema shows the type of the new boolean field as "string"

Some extra info.....

In collectionobjects_smk.xsd;
<xs:element name="smkVerso" type="xs:boolean" />

In cspace-config.xml:
<field id="smkVerso" section="smk">
<selector>csc-smk-verso</selector>
</field>

In ObjectEntryTemplate.html:

<div class="info-pair"> <div class="header"> <div class="label">Verso</div> </div> <div class="content" //also tried "checkbox" here <input type="checkbox" class="csc-smk-verso"/> </div> </div>

Thanks for the help,
Chris


Fra: Chris Martin [mailto:csm22@caret.cam.ac.uk]
Sendt: 3. februar 2011 11:27
Til: Christopher Pott; talk@lists.collectionspace.org
Emne: Re: [Talk] adding new fields to collectionobject

Hi Chris,

Sorry for not replying to you earlier but I have had my head stuck in
config simplification.

My name is Chris and I work mainly with the App layer. Which is really
just a glue layer to allow the UI to talk in JSON and the Service layer
to talk in XML and everyone to understand each other. So from my point
of view it would be interesting to see what everyone is saying and
seeing if we are having some mis-communication between the layers.

Is there a way for me to see your UI interface? Because what would be
useful is to look at some of the payloads that are being passed between
the UI and the app. And to be able to mock up some calls to the service
layer so I can see what they are saying. If your UI doesn't have an
externally accessible URL could you do some triage for me and send me
the payloads
(this page is something I quickly put together, that I know needs help
and more info:
http://wiki.collectionspace.org/display/collectionspace/Guidelines+for+B
ug+Triage)
What I am most interested in would be the GET and POST/PUT calls
to /chain/{recordtype}/{csid} that get called when you load up an object
and save it.
If you could specify which is the boolean field and what you believe
ought to be the value in each payload that would be great. It would be
useful to have a payload where you would expect the boolean to be true
and also a second one where you expect it to be false.
And then a second call where the data would be helpful is
/cspace-services/{recordtype in the plural}/{csid}
which should return an xml payload that the services is sending and that
should help diagnose how the service layer is pushing the boolean value
back.

if you could also send me
/chain/{recordid}/uischema
and
/chain/{recordid}/uispec

I can see if the UI is initializing the fields correctly.

So if the value sent in the /chain/ POST/PUT is incorrect but /chain/
GET is correct then the most likely issue is with the UI but if the
schema and uispec aren't being set up correct then the issue might be in
the App not telling the UI to be boolean. However, /cspace-services/
call might not be passing the data initially in a format the App is
expecting.
Or it might just be that the underlying fluid framework in the UI hasn't
been set up to look for checkboxes.

This should be fun.

So any and all info would be really useful

Thanks for your time in this matter.
Chris

On 01/02/2011 09:30, Christopher Pott wrote:
Hi all,

Thanks to the instructions at
http://wiki.collectionspace.org/display/collectionspace/How+to+add+a+fie
ld+or+group+of+fields (and the related pages) I've just been able to add
new local and domain (finearts) schemas to extend collectionobject. It
took me longer than it probably should have but this was only due to my
inability to slow down and read the instructions properly. Although I
knew the intention was to make configuration straightforward, I was
still surprised to see how simple the process was (ie. no coding
required) and was really impressed to see the new (text) fields up and
working so quickly and the new content being saved and searched.

My main outstanding issue now is that I get some unexpected results when
adding new fields of type boolean. These fields are defined in the xsd
as xs:boolean, represented in mySql as bit(1) and implemented in the UI
as checkboxes. My problem is that whatever the state of the checkbox
when saved, "false" is always returned by chain and the box is always
checked upon reload. As there are no boolean fields in the current
schemas could someone please help me with an example of how they should
be correctly configured?

Cheers,
Chris

Developer, Corpus Project
Statens Museum for Kunst (National Gallery of Denmark)


Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collections
pace.org

ok yura I will create a JIRA for you to fix that bug and I will keep the App sending strings to the UI and expecting strings back. Do you need anything extra re: schema/spec for booleans? Chris On 09/02/2011 15:14, Zenevich, Yura wrote: > Chris, > > I am pretty sure that the value has to be boolean since javascript will interpret the non empty string as truthy and thing like that will always look like true where the boolean is actually needed. In regards to whether we need an array or not it would be great to see how the generated uispec looks like for that field, but my first reaction is to say the we probably don't need an array there and just boolean should be sufficient enough. > > Yura > ________________________________________ > From: Chris Martin [csm22@caret.cam.ac.uk] > Sent: Thursday, February 03, 2011 8:46 AM > To: Christopher Pott > Cc: talk@lists.collectionspace.org; Zenevich, Yura > Subject: Re: SV: [Talk] adding new fields to collectionobject > > ok so I think I see what is happening. > the app sends the UI : > "smkVerso": "false", > and the UI sends the app: "smkVerso":["true"] or "smkVerso":[] for a > false value. > > This suggests that the UI is expecting an array, I need to confirm with > yura whether an array is the expected behaviour for a boolean value. And > whether the uischema needs to be tweaked so it specifies boolean instead > of string. > > If an array is not the expect format for the UI then I suspect yura will > have to look into what needs to be changed from an UI point of view but > if that is the required format then I can quickly extend the App to > correctly deal with booleans and return an array and then convert that > back into a string for the services. > > It seems to be that it is checking the checkbox if anything other than > an empty array is returned. Am I right in assuming that when you create > a collectionobject that the checkbox is not checked? > > Am I right in assuming you are working with v1.3 build or is it an > earlier build? > > Chris > > > On 03/02/2011 12:29, Christopher Pott wrote: >> Hi Chris, >> >> I've attached a bunch of files containing the data you requested, I hope >> they're pretty self explanatory. I noticed that.... >> *The chain GET seems to be correct >> *The uischema shows the type of the new boolean field as "string" >> >> Some extra info..... >> >> In collectionobjects_smk.xsd; >> <xs:element name="smkVerso" type="xs:boolean" /> >> >> In cspace-config.xml: >> <field id="smkVerso" section="smk"> >> <selector>csc-smk-verso</selector> >> </field> >> >> In ObjectEntryTemplate.html: >> <div class="info-pair"> >> <div class="header"> >> <div class="label">Verso</div> >> </div> >> <div class="content" //also tried "checkbox" here >> <input type="checkbox" class="csc-smk-verso"/> >> </div> >> </div> >> >> Thanks for the help, >> Chris >> ________________________________________ >> Fra: Chris Martin [mailto:csm22@caret.cam.ac.uk] >> Sendt: 3. februar 2011 11:27 >> Til: Christopher Pott; talk@lists.collectionspace.org >> Emne: Re: [Talk] adding new fields to collectionobject >> >> Hi Chris, >> >> Sorry for not replying to you earlier but I have had my head stuck in >> config simplification. >> >> My name is Chris and I work mainly with the App layer. Which is really >> just a glue layer to allow the UI to talk in JSON and the Service layer >> to talk in XML and everyone to understand each other. So from my point >> of view it would be interesting to see what everyone is saying and >> seeing if we are having some mis-communication between the layers. >> >> Is there a way for me to see your UI interface? Because what would be >> useful is to look at some of the payloads that are being passed between >> the UI and the app. And to be able to mock up some calls to the service >> layer so I can see what they are saying. If your UI doesn't have an >> externally accessible URL could you do some triage for me and send me >> the payloads >> (this page is something I quickly put together, that I know needs help >> and more info: >> http://wiki.collectionspace.org/display/collectionspace/Guidelines+for+B >> ug+Triage) >> What I am most interested in would be the GET and POST/PUT calls >> to /chain/{recordtype}/{csid} that get called when you load up an object >> and save it. >> If you could specify which is the boolean field and what you believe >> ought to be the value in each payload that would be great. It would be >> useful to have a payload where you would expect the boolean to be true >> and also a second one where you expect it to be false. >> And then a second call where the data would be helpful is >> /cspace-services/{recordtype in the plural}/{csid} >> which should return an xml payload that the services is sending and that >> should help diagnose how the service layer is pushing the boolean value >> back. >> >> if you could also send me >> /chain/{recordid}/uischema >> and >> /chain/{recordid}/uispec >> >> I can see if the UI is initializing the fields correctly. >> >> So if the value sent in the /chain/ POST/PUT is incorrect but /chain/ >> GET is correct then the most likely issue is with the UI but if the >> schema and uispec aren't being set up correct then the issue might be in >> the App not telling the UI to be boolean. However, /cspace-services/ >> call might not be passing the data initially in a format the App is >> expecting. >> Or it might just be that the underlying fluid framework in the UI hasn't >> been set up to look for checkboxes. >> >> This should be fun. >> >> So any and all info would be really useful >> >> Thanks for your time in this matter. >> Chris >> >> >> On 01/02/2011 09:30, Christopher Pott wrote: >> Hi all, >> >> Thanks to the instructions at >> http://wiki.collectionspace.org/display/collectionspace/How+to+add+a+fie >> ld+or+group+of+fields (and the related pages) I've just been able to add >> new local and domain (finearts) schemas to extend collectionobject. It >> took me longer than it probably should have but this was only due to my >> inability to slow down and read the instructions properly. Although I >> knew the intention was to make configuration straightforward, I was >> still surprised to see how simple the process was (ie. no coding >> required) and was really impressed to see the new (text) fields up and >> working so quickly and the new content being saved and searched. >> >> My main outstanding issue now is that I get some unexpected results when >> adding new fields of type boolean. These fields are defined in the xsd >> as xs:boolean, represented in mySql as bit(1) and implemented in the UI >> as checkboxes. My problem is that whatever the state of the checkbox >> when saved, "false" is always returned by chain and the box is always >> checked upon reload. As there are no boolean fields in the current >> schemas could someone please help me with an example of how they should >> be correctly configured? >> >> Cheers, >> Chris >> >> Developer, Corpus Project >> Statens Museum for Kunst (National Gallery of Denmark) >> >> >> >> >> >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collections >> pace.org
CM
Chris Martin
Thu, Feb 10, 2011 3:34 PM

and what I meant to type was... the app will send booleans to the UI not
strings. (sorry brain running ahead of fingers)

On 10/02/2011 15:31, Chris Martin wrote:

ok yura I will create a JIRA for you to fix that bug and I will keep
the App sending strings to the UI and expecting strings back. Do you
need anything extra re: schema/spec for booleans?

Chris

On 09/02/2011 15:14, Zenevich, Yura wrote:

Chris,

I am pretty sure that the value has to be boolean since javascript
will interpret the non empty string as truthy and thing like that
will always look like true where the boolean is actually needed. In
regards to whether we need an array or not it would be great to see
how the generated uispec looks like for that field, but my first
reaction is to say the we probably don't need an array there and just
boolean should be sufficient enough.

Yura


From: Chris Martin [csm22@caret.cam.ac.uk]
Sent: Thursday, February 03, 2011 8:46 AM
To: Christopher Pott
Cc: talk@lists.collectionspace.org; Zenevich, Yura
Subject: Re: SV: [Talk] adding new fields to collectionobject

ok so I think I see what is happening.
the app sends the UI :
"smkVerso": "false",
and the UI sends the app: "smkVerso":["true"] or "smkVerso":[] for a
false value.

This suggests that the UI is expecting an array, I need to confirm with
yura whether an array is the expected behaviour for a boolean value. And
whether the uischema needs to be tweaked so it specifies boolean instead
of string.

If an array is not the expect format for the UI then I suspect yura will
have to look into what needs to be changed from an UI point of view but
if that is the required format then I can quickly extend the App to
correctly deal with  booleans and return an array and then convert that
back into a string for the services.

It seems to be that it is checking the checkbox if anything other than
an empty array is returned. Am I right in assuming that when you create
a collectionobject that the checkbox is not checked?

Am I right in assuming you are working with v1.3 build or is it an
earlier build?

Chris

On 03/02/2011 12:29, Christopher Pott wrote:

Hi Chris,

I've attached a bunch of files containing the data you requested, I
hope
they're pretty self explanatory. I noticed that....
*The chain GET seems to be correct
*The uischema shows the type of the new boolean field as "string"

Some extra info.....

In collectionobjects_smk.xsd;
<xs:element name="smkVerso" type="xs:boolean" />

In cspace-config.xml:
<field id="smkVerso" section="smk">
<selector>csc-smk-verso</selector>
</field>

In ObjectEntryTemplate.html:

<div class="info-pair"> <div class="header"> <div class="label">Verso</div> </div> <div class="content" //also tried "checkbox" here <input type="checkbox" class="csc-smk-verso"/> </div> </div>

Thanks for the help,
Chris


Fra: Chris Martin [mailto:csm22@caret.cam.ac.uk]
Sendt: 3. februar 2011 11:27
Til: Christopher Pott; talk@lists.collectionspace.org
Emne: Re: [Talk] adding new fields to collectionobject

Hi Chris,

Sorry for not replying to you earlier but I have had my head stuck in
config simplification.

My name is Chris and I work mainly with the App layer. Which is really
just a glue layer to allow the UI to talk in JSON and the Service layer
to talk in XML and everyone to understand each other. So from my point
of view it would be interesting to see what everyone is saying and
seeing if we are having some mis-communication between the layers.

Is there a way for me to see your UI interface? Because what would be
useful is to look at some of the payloads that are being passed between
the UI and the app. And to be able to mock up some calls to the service
layer so I can see what they are saying. If your UI doesn't have an
externally accessible URL could you do some triage for me and send me
the payloads
(this page is something I quickly put together, that I know needs help
and more info:
http://wiki.collectionspace.org/display/collectionspace/Guidelines+for+B

ug+Triage)
What I am most interested in would be the GET and POST/PUT calls
to /chain/{recordtype}/{csid} that get called when you load up an
object
and save it.
If you could specify which is the boolean field and what you believe
ought to be the value in each payload that would be great. It would be
useful to have a payload where you would expect the boolean to be true
and also a second one where you expect it to be false.
And then a second call where the data would be helpful is
/cspace-services/{recordtype in the plural}/{csid}
which should return an xml payload that the services is sending and
that
should help diagnose how the service layer is pushing the boolean value
back.

if you could also send me
/chain/{recordid}/uischema
and
/chain/{recordid}/uispec

I can see if the UI is initializing the fields correctly.

So if the value sent in the /chain/ POST/PUT is incorrect but /chain/
GET is correct then the most likely issue is with the UI but if the
schema and uispec aren't being set up correct then the issue might
be in
the App not telling the UI to be boolean. However, /cspace-services/
call might not be passing the data initially in a format the App is
expecting.
Or it might just be that the underlying fluid framework in the UI
hasn't
been set up to look for checkboxes.

This should be fun.

So any and all info would be really useful

Thanks for your time in this matter.
Chris

On 01/02/2011 09:30, Christopher Pott wrote:
Hi all,

Thanks to the instructions at
http://wiki.collectionspace.org/display/collectionspace/How+to+add+a+fie

ld+or+group+of+fields (and the related pages) I've just been able to
add
new local and domain (finearts) schemas to extend collectionobject. It
took me longer than it probably should have but this was only due to my
inability to slow down and read the instructions properly. Although I
knew the intention was to make configuration straightforward, I was
still surprised to see how simple the process was (ie. no coding
required) and was really impressed to see the new (text) fields up and
working so quickly and the new content being saved and searched.

My main outstanding issue now is that I get some unexpected results
when
adding new fields of type boolean. These fields are defined in the xsd
as xs:boolean, represented in mySql as bit(1) and implemented in the UI
as checkboxes. My problem is that whatever the state of the checkbox
when saved, "false" is always returned by chain and the box is always
checked upon reload. As there are no boolean fields in the current
schemas could someone please help me with an example of how they should
be correctly configured?

Cheers,
Chris

Developer, Corpus Project
Statens Museum for Kunst (National Gallery of Denmark)


Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collections

pace.org

and what I meant to type was... the app will send booleans to the UI not strings. (sorry brain running ahead of fingers) On 10/02/2011 15:31, Chris Martin wrote: > ok yura I will create a JIRA for you to fix that bug and I will keep > the App sending strings to the UI and expecting strings back. Do you > need anything extra re: schema/spec for booleans? > > Chris > > On 09/02/2011 15:14, Zenevich, Yura wrote: >> Chris, >> >> I am pretty sure that the value has to be boolean since javascript >> will interpret the non empty string as truthy and thing like that >> will always look like true where the boolean is actually needed. In >> regards to whether we need an array or not it would be great to see >> how the generated uispec looks like for that field, but my first >> reaction is to say the we probably don't need an array there and just >> boolean should be sufficient enough. >> >> Yura >> ________________________________________ >> From: Chris Martin [csm22@caret.cam.ac.uk] >> Sent: Thursday, February 03, 2011 8:46 AM >> To: Christopher Pott >> Cc: talk@lists.collectionspace.org; Zenevich, Yura >> Subject: Re: SV: [Talk] adding new fields to collectionobject >> >> ok so I think I see what is happening. >> the app sends the UI : >> "smkVerso": "false", >> and the UI sends the app: "smkVerso":["true"] or "smkVerso":[] for a >> false value. >> >> This suggests that the UI is expecting an array, I need to confirm with >> yura whether an array is the expected behaviour for a boolean value. And >> whether the uischema needs to be tweaked so it specifies boolean instead >> of string. >> >> If an array is not the expect format for the UI then I suspect yura will >> have to look into what needs to be changed from an UI point of view but >> if that is the required format then I can quickly extend the App to >> correctly deal with booleans and return an array and then convert that >> back into a string for the services. >> >> It seems to be that it is checking the checkbox if anything other than >> an empty array is returned. Am I right in assuming that when you create >> a collectionobject that the checkbox is not checked? >> >> Am I right in assuming you are working with v1.3 build or is it an >> earlier build? >> >> Chris >> >> >> On 03/02/2011 12:29, Christopher Pott wrote: >>> Hi Chris, >>> >>> I've attached a bunch of files containing the data you requested, I >>> hope >>> they're pretty self explanatory. I noticed that.... >>> *The chain GET seems to be correct >>> *The uischema shows the type of the new boolean field as "string" >>> >>> Some extra info..... >>> >>> In collectionobjects_smk.xsd; >>> <xs:element name="smkVerso" type="xs:boolean" /> >>> >>> In cspace-config.xml: >>> <field id="smkVerso" section="smk"> >>> <selector>csc-smk-verso</selector> >>> </field> >>> >>> In ObjectEntryTemplate.html: >>> <div class="info-pair"> >>> <div class="header"> >>> <div class="label">Verso</div> >>> </div> >>> <div class="content" //also tried "checkbox" here >>> <input type="checkbox" class="csc-smk-verso"/> >>> </div> >>> </div> >>> >>> Thanks for the help, >>> Chris >>> ________________________________________ >>> Fra: Chris Martin [mailto:csm22@caret.cam.ac.uk] >>> Sendt: 3. februar 2011 11:27 >>> Til: Christopher Pott; talk@lists.collectionspace.org >>> Emne: Re: [Talk] adding new fields to collectionobject >>> >>> Hi Chris, >>> >>> Sorry for not replying to you earlier but I have had my head stuck in >>> config simplification. >>> >>> My name is Chris and I work mainly with the App layer. Which is really >>> just a glue layer to allow the UI to talk in JSON and the Service layer >>> to talk in XML and everyone to understand each other. So from my point >>> of view it would be interesting to see what everyone is saying and >>> seeing if we are having some mis-communication between the layers. >>> >>> Is there a way for me to see your UI interface? Because what would be >>> useful is to look at some of the payloads that are being passed between >>> the UI and the app. And to be able to mock up some calls to the service >>> layer so I can see what they are saying. If your UI doesn't have an >>> externally accessible URL could you do some triage for me and send me >>> the payloads >>> (this page is something I quickly put together, that I know needs help >>> and more info: >>> http://wiki.collectionspace.org/display/collectionspace/Guidelines+for+B >>> >>> ug+Triage) >>> What I am most interested in would be the GET and POST/PUT calls >>> to /chain/{recordtype}/{csid} that get called when you load up an >>> object >>> and save it. >>> If you could specify which is the boolean field and what you believe >>> ought to be the value in each payload that would be great. It would be >>> useful to have a payload where you would expect the boolean to be true >>> and also a second one where you expect it to be false. >>> And then a second call where the data would be helpful is >>> /cspace-services/{recordtype in the plural}/{csid} >>> which should return an xml payload that the services is sending and >>> that >>> should help diagnose how the service layer is pushing the boolean value >>> back. >>> >>> if you could also send me >>> /chain/{recordid}/uischema >>> and >>> /chain/{recordid}/uispec >>> >>> I can see if the UI is initializing the fields correctly. >>> >>> So if the value sent in the /chain/ POST/PUT is incorrect but /chain/ >>> GET is correct then the most likely issue is with the UI but if the >>> schema and uispec aren't being set up correct then the issue might >>> be in >>> the App not telling the UI to be boolean. However, /cspace-services/ >>> call might not be passing the data initially in a format the App is >>> expecting. >>> Or it might just be that the underlying fluid framework in the UI >>> hasn't >>> been set up to look for checkboxes. >>> >>> This should be fun. >>> >>> So any and all info would be really useful >>> >>> Thanks for your time in this matter. >>> Chris >>> >>> >>> On 01/02/2011 09:30, Christopher Pott wrote: >>> Hi all, >>> >>> Thanks to the instructions at >>> http://wiki.collectionspace.org/display/collectionspace/How+to+add+a+fie >>> >>> ld+or+group+of+fields (and the related pages) I've just been able to >>> add >>> new local and domain (finearts) schemas to extend collectionobject. It >>> took me longer than it probably should have but this was only due to my >>> inability to slow down and read the instructions properly. Although I >>> knew the intention was to make configuration straightforward, I was >>> still surprised to see how simple the process was (ie. no coding >>> required) and was really impressed to see the new (text) fields up and >>> working so quickly and the new content being saved and searched. >>> >>> My main outstanding issue now is that I get some unexpected results >>> when >>> adding new fields of type boolean. These fields are defined in the xsd >>> as xs:boolean, represented in mySql as bit(1) and implemented in the UI >>> as checkboxes. My problem is that whatever the state of the checkbox >>> when saved, "false" is always returned by chain and the box is always >>> checked upon reload. As there are no boolean fields in the current >>> schemas could someone please help me with an example of how they should >>> be correctly configured? >>> >>> Cheers, >>> Chris >>> >>> Developer, Corpus Project >>> Statens Museum for Kunst (National Gallery of Denmark) >>> >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Talk mailing list >>> Talk@lists.collectionspace.org >>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collections >>> >>> pace.org > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >
YZ
Yura Z
Thu, Feb 10, 2011 3:34 PM

Thanks, Chris.

On 02/10/2011 10:34 AM, Chris Martin wrote:

and what I meant to type was... the app will send booleans to the UI
not strings. (sorry brain running ahead of fingers)

On 10/02/2011 15:31, Chris Martin wrote:

ok yura I will create a JIRA for you to fix that bug and I will keep
the App sending strings to the UI and expecting strings back. Do you
need anything extra re: schema/spec for booleans?

Chris

On 09/02/2011 15:14, Zenevich, Yura wrote:

Chris,

I am pretty sure that the value has to be boolean since javascript
will interpret the non empty string as truthy and thing like that
will always look like true where the boolean is actually needed. In
regards to whether we need an array or not it would be great to see
how the generated uispec looks like for that field, but my first
reaction is to say the we probably don't need an array there and
just boolean should be sufficient enough.

Yura


From: Chris Martin [csm22@caret.cam.ac.uk]
Sent: Thursday, February 03, 2011 8:46 AM
To: Christopher Pott
Cc: talk@lists.collectionspace.org; Zenevich, Yura
Subject: Re: SV: [Talk] adding new fields to collectionobject

ok so I think I see what is happening.
the app sends the UI :
"smkVerso": "false",
and the UI sends the app: "smkVerso":["true"] or "smkVerso":[] for a
false value.

This suggests that the UI is expecting an array, I need to confirm with
yura whether an array is the expected behaviour for a boolean value.
And
whether the uischema needs to be tweaked so it specifies boolean
instead
of string.

If an array is not the expect format for the UI then I suspect yura
will
have to look into what needs to be changed from an UI point of view but
if that is the required format then I can quickly extend the App to
correctly deal with  booleans and return an array and then convert that
back into a string for the services.

It seems to be that it is checking the checkbox if anything other than
an empty array is returned. Am I right in assuming that when you create
a collectionobject that the checkbox is not checked?

Am I right in assuming you are working with v1.3 build or is it an
earlier build?

Chris

On 03/02/2011 12:29, Christopher Pott wrote:

Hi Chris,

I've attached a bunch of files containing the data you requested, I
hope
they're pretty self explanatory. I noticed that....
*The chain GET seems to be correct
*The uischema shows the type of the new boolean field as "string"

Some extra info.....

In collectionobjects_smk.xsd;
<xs:element name="smkVerso" type="xs:boolean" />

In cspace-config.xml:
<field id="smkVerso" section="smk">
<selector>csc-smk-verso</selector>
</field>

In ObjectEntryTemplate.html:

<div class="info-pair"> <div class="header"> <div class="label">Verso</div> </div> <div class="content" //also tried "checkbox" here <input type="checkbox" class="csc-smk-verso"/> </div> </div>

Thanks for the help,
Chris


Fra: Chris Martin [mailto:csm22@caret.cam.ac.uk]
Sendt: 3. februar 2011 11:27
Til: Christopher Pott; talk@lists.collectionspace.org
Emne: Re: [Talk] adding new fields to collectionobject

Hi Chris,

Sorry for not replying to you earlier but I have had my head stuck in
config simplification.

My name is Chris and I work mainly with the App layer. Which is really
just a glue layer to allow the UI to talk in JSON and the Service
layer
to talk in XML and everyone to understand each other. So from my point
of view it would be interesting to see what everyone is saying and
seeing if we are having some mis-communication between the layers.

Is there a way for me to see your UI interface? Because what would be
useful is to look at some of the payloads that are being passed
between
the UI and the app. And to be able to mock up some calls to the
service
layer so I can see what they are saying. If your UI doesn't have an
externally accessible URL could you do some triage for me and send me
the payloads
(this page is something I quickly put together, that I know needs help
and more info:
http://wiki.collectionspace.org/display/collectionspace/Guidelines+for+B

ug+Triage)
What I am most interested in would be the GET and POST/PUT calls
to /chain/{recordtype}/{csid} that get called when you load up an
object
and save it.
If you could specify which is the boolean field and what you believe
ought to be the value in each payload that would be great. It would be
useful to have a payload where you would expect the boolean to be true
and also a second one where you expect it to be false.
And then a second call where the data would be helpful is
/cspace-services/{recordtype in the plural}/{csid}
which should return an xml payload that the services is sending and
that
should help diagnose how the service layer is pushing the boolean
value
back.

if you could also send me
/chain/{recordid}/uischema
and
/chain/{recordid}/uispec

I can see if the UI is initializing the fields correctly.

So if the value sent in the /chain/ POST/PUT is incorrect but /chain/
GET is correct then the most likely issue is with the UI but if the
schema and uispec aren't being set up correct then the issue might
be in
the App not telling the UI to be boolean. However, /cspace-services/
call might not be passing the data initially in a format the App is
expecting.
Or it might just be that the underlying fluid framework in the UI
hasn't
been set up to look for checkboxes.

This should be fun.

So any and all info would be really useful

Thanks for your time in this matter.
Chris

On 01/02/2011 09:30, Christopher Pott wrote:
Hi all,

Thanks to the instructions at
http://wiki.collectionspace.org/display/collectionspace/How+to+add+a+fie

ld+or+group+of+fields (and the related pages) I've just been able
to add
new local and domain (finearts) schemas to extend collectionobject. It
took me longer than it probably should have but this was only due
to my
inability to slow down and read the instructions properly. Although I
knew the intention was to make configuration straightforward, I was
still surprised to see how simple the process was (ie. no coding
required) and was really impressed to see the new (text) fields up and
working so quickly and the new content being saved and searched.

My main outstanding issue now is that I get some unexpected results
when
adding new fields of type boolean. These fields are defined in the xsd
as xs:boolean, represented in mySql as bit(1) and implemented in
the UI
as checkboxes. My problem is that whatever the state of the checkbox
when saved, "false" is always returned by chain and the box is always
checked upon reload. As there are no boolean fields in the current
schemas could someone please help me with an example of how they
should
be correctly configured?

Cheers,
Chris

Developer, Corpus Project
Statens Museum for Kunst (National Gallery of Denmark)


Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collections

pace.org

Thanks, Chris. On 02/10/2011 10:34 AM, Chris Martin wrote: > and what I meant to type was... the app will send booleans to the UI > not strings. (sorry brain running ahead of fingers) > > On 10/02/2011 15:31, Chris Martin wrote: >> ok yura I will create a JIRA for you to fix that bug and I will keep >> the App sending strings to the UI and expecting strings back. Do you >> need anything extra re: schema/spec for booleans? >> >> Chris >> >> On 09/02/2011 15:14, Zenevich, Yura wrote: >>> Chris, >>> >>> I am pretty sure that the value has to be boolean since javascript >>> will interpret the non empty string as truthy and thing like that >>> will always look like true where the boolean is actually needed. In >>> regards to whether we need an array or not it would be great to see >>> how the generated uispec looks like for that field, but my first >>> reaction is to say the we probably don't need an array there and >>> just boolean should be sufficient enough. >>> >>> Yura >>> ________________________________________ >>> From: Chris Martin [csm22@caret.cam.ac.uk] >>> Sent: Thursday, February 03, 2011 8:46 AM >>> To: Christopher Pott >>> Cc: talk@lists.collectionspace.org; Zenevich, Yura >>> Subject: Re: SV: [Talk] adding new fields to collectionobject >>> >>> ok so I think I see what is happening. >>> the app sends the UI : >>> "smkVerso": "false", >>> and the UI sends the app: "smkVerso":["true"] or "smkVerso":[] for a >>> false value. >>> >>> This suggests that the UI is expecting an array, I need to confirm with >>> yura whether an array is the expected behaviour for a boolean value. >>> And >>> whether the uischema needs to be tweaked so it specifies boolean >>> instead >>> of string. >>> >>> If an array is not the expect format for the UI then I suspect yura >>> will >>> have to look into what needs to be changed from an UI point of view but >>> if that is the required format then I can quickly extend the App to >>> correctly deal with booleans and return an array and then convert that >>> back into a string for the services. >>> >>> It seems to be that it is checking the checkbox if anything other than >>> an empty array is returned. Am I right in assuming that when you create >>> a collectionobject that the checkbox is not checked? >>> >>> Am I right in assuming you are working with v1.3 build or is it an >>> earlier build? >>> >>> Chris >>> >>> >>> On 03/02/2011 12:29, Christopher Pott wrote: >>>> Hi Chris, >>>> >>>> I've attached a bunch of files containing the data you requested, I >>>> hope >>>> they're pretty self explanatory. I noticed that.... >>>> *The chain GET seems to be correct >>>> *The uischema shows the type of the new boolean field as "string" >>>> >>>> Some extra info..... >>>> >>>> In collectionobjects_smk.xsd; >>>> <xs:element name="smkVerso" type="xs:boolean" /> >>>> >>>> In cspace-config.xml: >>>> <field id="smkVerso" section="smk"> >>>> <selector>csc-smk-verso</selector> >>>> </field> >>>> >>>> In ObjectEntryTemplate.html: >>>> <div class="info-pair"> >>>> <div class="header"> >>>> <div class="label">Verso</div> >>>> </div> >>>> <div class="content" //also tried "checkbox" here >>>> <input type="checkbox" class="csc-smk-verso"/> >>>> </div> >>>> </div> >>>> >>>> Thanks for the help, >>>> Chris >>>> ________________________________________ >>>> Fra: Chris Martin [mailto:csm22@caret.cam.ac.uk] >>>> Sendt: 3. februar 2011 11:27 >>>> Til: Christopher Pott; talk@lists.collectionspace.org >>>> Emne: Re: [Talk] adding new fields to collectionobject >>>> >>>> Hi Chris, >>>> >>>> Sorry for not replying to you earlier but I have had my head stuck in >>>> config simplification. >>>> >>>> My name is Chris and I work mainly with the App layer. Which is really >>>> just a glue layer to allow the UI to talk in JSON and the Service >>>> layer >>>> to talk in XML and everyone to understand each other. So from my point >>>> of view it would be interesting to see what everyone is saying and >>>> seeing if we are having some mis-communication between the layers. >>>> >>>> Is there a way for me to see your UI interface? Because what would be >>>> useful is to look at some of the payloads that are being passed >>>> between >>>> the UI and the app. And to be able to mock up some calls to the >>>> service >>>> layer so I can see what they are saying. If your UI doesn't have an >>>> externally accessible URL could you do some triage for me and send me >>>> the payloads >>>> (this page is something I quickly put together, that I know needs help >>>> and more info: >>>> http://wiki.collectionspace.org/display/collectionspace/Guidelines+for+B >>>> >>>> ug+Triage) >>>> What I am most interested in would be the GET and POST/PUT calls >>>> to /chain/{recordtype}/{csid} that get called when you load up an >>>> object >>>> and save it. >>>> If you could specify which is the boolean field and what you believe >>>> ought to be the value in each payload that would be great. It would be >>>> useful to have a payload where you would expect the boolean to be true >>>> and also a second one where you expect it to be false. >>>> And then a second call where the data would be helpful is >>>> /cspace-services/{recordtype in the plural}/{csid} >>>> which should return an xml payload that the services is sending and >>>> that >>>> should help diagnose how the service layer is pushing the boolean >>>> value >>>> back. >>>> >>>> if you could also send me >>>> /chain/{recordid}/uischema >>>> and >>>> /chain/{recordid}/uispec >>>> >>>> I can see if the UI is initializing the fields correctly. >>>> >>>> So if the value sent in the /chain/ POST/PUT is incorrect but /chain/ >>>> GET is correct then the most likely issue is with the UI but if the >>>> schema and uispec aren't being set up correct then the issue might >>>> be in >>>> the App not telling the UI to be boolean. However, /cspace-services/ >>>> call might not be passing the data initially in a format the App is >>>> expecting. >>>> Or it might just be that the underlying fluid framework in the UI >>>> hasn't >>>> been set up to look for checkboxes. >>>> >>>> This should be fun. >>>> >>>> So any and all info would be really useful >>>> >>>> Thanks for your time in this matter. >>>> Chris >>>> >>>> >>>> On 01/02/2011 09:30, Christopher Pott wrote: >>>> Hi all, >>>> >>>> Thanks to the instructions at >>>> http://wiki.collectionspace.org/display/collectionspace/How+to+add+a+fie >>>> >>>> ld+or+group+of+fields (and the related pages) I've just been able >>>> to add >>>> new local and domain (finearts) schemas to extend collectionobject. It >>>> took me longer than it probably should have but this was only due >>>> to my >>>> inability to slow down and read the instructions properly. Although I >>>> knew the intention was to make configuration straightforward, I was >>>> still surprised to see how simple the process was (ie. no coding >>>> required) and was really impressed to see the new (text) fields up and >>>> working so quickly and the new content being saved and searched. >>>> >>>> My main outstanding issue now is that I get some unexpected results >>>> when >>>> adding new fields of type boolean. These fields are defined in the xsd >>>> as xs:boolean, represented in mySql as bit(1) and implemented in >>>> the UI >>>> as checkboxes. My problem is that whatever the state of the checkbox >>>> when saved, "false" is always returned by chain and the box is always >>>> checked upon reload. As there are no boolean fields in the current >>>> schemas could someone please help me with an example of how they >>>> should >>>> be correctly configured? >>>> >>>> Cheers, >>>> Chris >>>> >>>> Developer, Corpus Project >>>> Statens Museum for Kunst (National Gallery of Denmark) >>>> >>>> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Talk mailing list >>>> Talk@lists.collectionspace.org >>>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collections >>>> >>>> pace.org >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >> > > _______________________________________________ > Talk mailing list > Talk@lists.collectionspace.org > http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >
CM
Chris Martin
Thu, Feb 10, 2011 3:49 PM

this is now JIRA'd up at :
http://issues.collectionspace.org/browse/CSPACE-3544

Chris

On 10/02/2011 15:34, Yura Z wrote:

Thanks, Chris.

On 02/10/2011 10:34 AM, Chris Martin wrote:

and what I meant to type was... the app will send booleans to the UI
not strings. (sorry brain running ahead of fingers)

On 10/02/2011 15:31, Chris Martin wrote:

ok yura I will create a JIRA for you to fix that bug and I will keep
the App sending strings to the UI and expecting strings back. Do you
need anything extra re: schema/spec for booleans?

Chris

On 09/02/2011 15:14, Zenevich, Yura wrote:

Chris,

I am pretty sure that the value has to be boolean since javascript
will interpret the non empty string as truthy and thing like that
will always look like true where the boolean is actually needed. In
regards to whether we need an array or not it would be great to see
how the generated uispec looks like for that field, but my first
reaction is to say the we probably don't need an array there and
just boolean should be sufficient enough.

Yura


From: Chris Martin [csm22@caret.cam.ac.uk]
Sent: Thursday, February 03, 2011 8:46 AM
To: Christopher Pott
Cc: talk@lists.collectionspace.org; Zenevich, Yura
Subject: Re: SV: [Talk] adding new fields to collectionobject

ok so I think I see what is happening.
the app sends the UI :
"smkVerso": "false",
and the UI sends the app: "smkVerso":["true"] or "smkVerso":[] for a
false value.

This suggests that the UI is expecting an array, I need to confirm
with
yura whether an array is the expected behaviour for a boolean
value. And
whether the uischema needs to be tweaked so it specifies boolean
instead
of string.

If an array is not the expect format for the UI then I suspect yura
will
have to look into what needs to be changed from an UI point of view
but
if that is the required format then I can quickly extend the App to
correctly deal with  booleans and return an array and then convert
that
back into a string for the services.

It seems to be that it is checking the checkbox if anything other than
an empty array is returned. Am I right in assuming that when you
create
a collectionobject that the checkbox is not checked?

Am I right in assuming you are working with v1.3 build or is it an
earlier build?

Chris

On 03/02/2011 12:29, Christopher Pott wrote:

Hi Chris,

I've attached a bunch of files containing the data you requested,
I hope
they're pretty self explanatory. I noticed that....
*The chain GET seems to be correct
*The uischema shows the type of the new boolean field as "string"

Some extra info.....

In collectionobjects_smk.xsd;
<xs:element name="smkVerso" type="xs:boolean" />

In cspace-config.xml:
<field id="smkVerso" section="smk">
<selector>csc-smk-verso</selector>
</field>

In ObjectEntryTemplate.html:

<div class="info-pair"> <div class="header"> <div class="label">Verso</div> </div> <div class="content" //also tried "checkbox" here <input type="checkbox" class="csc-smk-verso"/> </div> </div>

Thanks for the help,
Chris


Fra: Chris Martin [mailto:csm22@caret.cam.ac.uk]
Sendt: 3. februar 2011 11:27
Til: Christopher Pott; talk@lists.collectionspace.org
Emne: Re: [Talk] adding new fields to collectionobject

Hi Chris,

Sorry for not replying to you earlier but I have had my head stuck in
config simplification.

My name is Chris and I work mainly with the App layer. Which is
really
just a glue layer to allow the UI to talk in JSON and the Service
layer
to talk in XML and everyone to understand each other. So from my
point
of view it would be interesting to see what everyone is saying and
seeing if we are having some mis-communication between the layers.

Is there a way for me to see your UI interface? Because what would be
useful is to look at some of the payloads that are being passed
between
the UI and the app. And to be able to mock up some calls to the
service
layer so I can see what they are saying. If your UI doesn't have an
externally accessible URL could you do some triage for me and send me
the payloads
(this page is something I quickly put together, that I know needs
help
and more info:
http://wiki.collectionspace.org/display/collectionspace/Guidelines+for+B

ug+Triage)
What I am most interested in would be the GET and POST/PUT calls
to /chain/{recordtype}/{csid} that get called when you load up an
object
and save it.
If you could specify which is the boolean field and what you believe
ought to be the value in each payload that would be great. It
would be
useful to have a payload where you would expect the boolean to be
true
and also a second one where you expect it to be false.
And then a second call where the data would be helpful is
/cspace-services/{recordtype in the plural}/{csid}
which should return an xml payload that the services is sending
and that
should help diagnose how the service layer is pushing the boolean
value
back.

if you could also send me
/chain/{recordid}/uischema
and
/chain/{recordid}/uispec

I can see if the UI is initializing the fields correctly.

So if the value sent in the /chain/ POST/PUT is incorrect but /chain/
GET is correct then the most likely issue is with the UI but if the
schema and uispec aren't being set up correct then the issue might
be in
the App not telling the UI to be boolean. However, /cspace-services/
call might not be passing the data initially in a format the App is
expecting.
Or it might just be that the underlying fluid framework in the UI
hasn't
been set up to look for checkboxes.

This should be fun.

So any and all info would be really useful

Thanks for your time in this matter.
Chris

On 01/02/2011 09:30, Christopher Pott wrote:
Hi all,

Thanks to the instructions at
http://wiki.collectionspace.org/display/collectionspace/How+to+add+a+fie

ld+or+group+of+fields (and the related pages) I've just been able
to add
new local and domain (finearts) schemas to extend
collectionobject. It
took me longer than it probably should have but this was only due
to my
inability to slow down and read the instructions properly. Although I
knew the intention was to make configuration straightforward, I was
still surprised to see how simple the process was (ie. no coding
required) and was really impressed to see the new (text) fields up
and
working so quickly and the new content being saved and searched.

My main outstanding issue now is that I get some unexpected
results when
adding new fields of type boolean. These fields are defined in the
xsd
as xs:boolean, represented in mySql as bit(1) and implemented in
the UI
as checkboxes. My problem is that whatever the state of the checkbox
when saved, "false" is always returned by chain and the box is always
checked upon reload. As there are no boolean fields in the current
schemas could someone please help me with an example of how they
should
be correctly configured?

Cheers,
Chris

Developer, Corpus Project
Statens Museum for Kunst (National Gallery of Denmark)


Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collections

pace.org

this is now JIRA'd up at : http://issues.collectionspace.org/browse/CSPACE-3544 Chris On 10/02/2011 15:34, Yura Z wrote: > Thanks, Chris. > > On 02/10/2011 10:34 AM, Chris Martin wrote: >> and what I meant to type was... the app will send booleans to the UI >> not strings. (sorry brain running ahead of fingers) >> >> On 10/02/2011 15:31, Chris Martin wrote: >>> ok yura I will create a JIRA for you to fix that bug and I will keep >>> the App sending strings to the UI and expecting strings back. Do you >>> need anything extra re: schema/spec for booleans? >>> >>> Chris >>> >>> On 09/02/2011 15:14, Zenevich, Yura wrote: >>>> Chris, >>>> >>>> I am pretty sure that the value has to be boolean since javascript >>>> will interpret the non empty string as truthy and thing like that >>>> will always look like true where the boolean is actually needed. In >>>> regards to whether we need an array or not it would be great to see >>>> how the generated uispec looks like for that field, but my first >>>> reaction is to say the we probably don't need an array there and >>>> just boolean should be sufficient enough. >>>> >>>> Yura >>>> ________________________________________ >>>> From: Chris Martin [csm22@caret.cam.ac.uk] >>>> Sent: Thursday, February 03, 2011 8:46 AM >>>> To: Christopher Pott >>>> Cc: talk@lists.collectionspace.org; Zenevich, Yura >>>> Subject: Re: SV: [Talk] adding new fields to collectionobject >>>> >>>> ok so I think I see what is happening. >>>> the app sends the UI : >>>> "smkVerso": "false", >>>> and the UI sends the app: "smkVerso":["true"] or "smkVerso":[] for a >>>> false value. >>>> >>>> This suggests that the UI is expecting an array, I need to confirm >>>> with >>>> yura whether an array is the expected behaviour for a boolean >>>> value. And >>>> whether the uischema needs to be tweaked so it specifies boolean >>>> instead >>>> of string. >>>> >>>> If an array is not the expect format for the UI then I suspect yura >>>> will >>>> have to look into what needs to be changed from an UI point of view >>>> but >>>> if that is the required format then I can quickly extend the App to >>>> correctly deal with booleans and return an array and then convert >>>> that >>>> back into a string for the services. >>>> >>>> It seems to be that it is checking the checkbox if anything other than >>>> an empty array is returned. Am I right in assuming that when you >>>> create >>>> a collectionobject that the checkbox is not checked? >>>> >>>> Am I right in assuming you are working with v1.3 build or is it an >>>> earlier build? >>>> >>>> Chris >>>> >>>> >>>> On 03/02/2011 12:29, Christopher Pott wrote: >>>>> Hi Chris, >>>>> >>>>> I've attached a bunch of files containing the data you requested, >>>>> I hope >>>>> they're pretty self explanatory. I noticed that.... >>>>> *The chain GET seems to be correct >>>>> *The uischema shows the type of the new boolean field as "string" >>>>> >>>>> Some extra info..... >>>>> >>>>> In collectionobjects_smk.xsd; >>>>> <xs:element name="smkVerso" type="xs:boolean" /> >>>>> >>>>> In cspace-config.xml: >>>>> <field id="smkVerso" section="smk"> >>>>> <selector>csc-smk-verso</selector> >>>>> </field> >>>>> >>>>> In ObjectEntryTemplate.html: >>>>> <div class="info-pair"> >>>>> <div class="header"> >>>>> <div class="label">Verso</div> >>>>> </div> >>>>> <div class="content" //also tried "checkbox" here >>>>> <input type="checkbox" class="csc-smk-verso"/> >>>>> </div> >>>>> </div> >>>>> >>>>> Thanks for the help, >>>>> Chris >>>>> ________________________________________ >>>>> Fra: Chris Martin [mailto:csm22@caret.cam.ac.uk] >>>>> Sendt: 3. februar 2011 11:27 >>>>> Til: Christopher Pott; talk@lists.collectionspace.org >>>>> Emne: Re: [Talk] adding new fields to collectionobject >>>>> >>>>> Hi Chris, >>>>> >>>>> Sorry for not replying to you earlier but I have had my head stuck in >>>>> config simplification. >>>>> >>>>> My name is Chris and I work mainly with the App layer. Which is >>>>> really >>>>> just a glue layer to allow the UI to talk in JSON and the Service >>>>> layer >>>>> to talk in XML and everyone to understand each other. So from my >>>>> point >>>>> of view it would be interesting to see what everyone is saying and >>>>> seeing if we are having some mis-communication between the layers. >>>>> >>>>> Is there a way for me to see your UI interface? Because what would be >>>>> useful is to look at some of the payloads that are being passed >>>>> between >>>>> the UI and the app. And to be able to mock up some calls to the >>>>> service >>>>> layer so I can see what they are saying. If your UI doesn't have an >>>>> externally accessible URL could you do some triage for me and send me >>>>> the payloads >>>>> (this page is something I quickly put together, that I know needs >>>>> help >>>>> and more info: >>>>> http://wiki.collectionspace.org/display/collectionspace/Guidelines+for+B >>>>> >>>>> ug+Triage) >>>>> What I am most interested in would be the GET and POST/PUT calls >>>>> to /chain/{recordtype}/{csid} that get called when you load up an >>>>> object >>>>> and save it. >>>>> If you could specify which is the boolean field and what you believe >>>>> ought to be the value in each payload that would be great. It >>>>> would be >>>>> useful to have a payload where you would expect the boolean to be >>>>> true >>>>> and also a second one where you expect it to be false. >>>>> And then a second call where the data would be helpful is >>>>> /cspace-services/{recordtype in the plural}/{csid} >>>>> which should return an xml payload that the services is sending >>>>> and that >>>>> should help diagnose how the service layer is pushing the boolean >>>>> value >>>>> back. >>>>> >>>>> if you could also send me >>>>> /chain/{recordid}/uischema >>>>> and >>>>> /chain/{recordid}/uispec >>>>> >>>>> I can see if the UI is initializing the fields correctly. >>>>> >>>>> So if the value sent in the /chain/ POST/PUT is incorrect but /chain/ >>>>> GET is correct then the most likely issue is with the UI but if the >>>>> schema and uispec aren't being set up correct then the issue might >>>>> be in >>>>> the App not telling the UI to be boolean. However, /cspace-services/ >>>>> call might not be passing the data initially in a format the App is >>>>> expecting. >>>>> Or it might just be that the underlying fluid framework in the UI >>>>> hasn't >>>>> been set up to look for checkboxes. >>>>> >>>>> This should be fun. >>>>> >>>>> So any and all info would be really useful >>>>> >>>>> Thanks for your time in this matter. >>>>> Chris >>>>> >>>>> >>>>> On 01/02/2011 09:30, Christopher Pott wrote: >>>>> Hi all, >>>>> >>>>> Thanks to the instructions at >>>>> http://wiki.collectionspace.org/display/collectionspace/How+to+add+a+fie >>>>> >>>>> ld+or+group+of+fields (and the related pages) I've just been able >>>>> to add >>>>> new local and domain (finearts) schemas to extend >>>>> collectionobject. It >>>>> took me longer than it probably should have but this was only due >>>>> to my >>>>> inability to slow down and read the instructions properly. Although I >>>>> knew the intention was to make configuration straightforward, I was >>>>> still surprised to see how simple the process was (ie. no coding >>>>> required) and was really impressed to see the new (text) fields up >>>>> and >>>>> working so quickly and the new content being saved and searched. >>>>> >>>>> My main outstanding issue now is that I get some unexpected >>>>> results when >>>>> adding new fields of type boolean. These fields are defined in the >>>>> xsd >>>>> as xs:boolean, represented in mySql as bit(1) and implemented in >>>>> the UI >>>>> as checkboxes. My problem is that whatever the state of the checkbox >>>>> when saved, "false" is always returned by chain and the box is always >>>>> checked upon reload. As there are no boolean fields in the current >>>>> schemas could someone please help me with an example of how they >>>>> should >>>>> be correctly configured? >>>>> >>>>> Cheers, >>>>> Chris >>>>> >>>>> Developer, Corpus Project >>>>> Statens Museum for Kunst (National Gallery of Denmark) >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Talk mailing list >>>>> Talk@lists.collectionspace.org >>>>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collections >>>>> >>>>> pace.org >>> >>> _______________________________________________ >>> Talk mailing list >>> Talk@lists.collectionspace.org >>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >>> >> >> _______________________________________________ >> Talk mailing list >> Talk@lists.collectionspace.org >> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org >> >