WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org
View all threadsHi,
Can anyone tell if it is possible to add a new field (from a local or domain extension) to an existing (core) repeatable group? An example would be adding a new field to Collectionobject 'title' group. And I suppose what I mean is that in the UI it appears and acts as one group, but in the underlying services it is represented across multiple schemas.
Regards,
Chris
I would not think it is possible. Patrick Schmitz would be able to
answer definitively but the segregation of core and domain in the
service layer would suggest that it probably wont work. It is the
repeatability aspect that I think would cause the issues.
Chris
On 01/03/2011 14:55, Christopher Pott wrote:
Hi,
Can anyone tell if it is possible to add a new field (from a local or
domain extension) to an existing (core) repeatable group? An example
would be adding a new field to Collectionobject 'title' group. And I
suppose what I mean is that in the UI it appears and acts as one
group, but in the underlying services it is represented across
multiple schemas.
Regards,
Chris
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
Hi Chris,
If that turns out to be the case then I guess we will just have to
duplicate the whole group (plus the new fields) in the domain schema.
Thanks,
Chris
Fra: Chris Martin [mailto:csm22@caret.cam.ac.uk]
Sendt: 1. marts 2011 16:20
Til: Christopher Pott
Cc: talk@lists.collectionspace.org; Patrick Schmitz
Emne: Re: [Talk] adding fields to core schema repeatable groups
I would not think it is possible. Patrick Schmitz would be able to
answer definitively but the segregation of core and domain in the
service layer would suggest that it probably wont work. It is the
repeatability aspect that I think would cause the issues.
Chris
On 01/03/2011 14:55, Christopher Pott wrote:
Hi,
Can anyone tell if it is possible to add a new field (from a local or
domain extension) to an existing (core) repeatable group? An example
would be adding a new field to Collectionobject 'title' group. And I
suppose what I mean is that in the UI it appears and acts as one group,
but in the underlying services it is represented across multiple
schemas.
Regards,
Chris
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collections
pace.org
yeap I can see how that would be tedious and really invalidate the
usefulness of the core schema. However, on the upside it is really easy
to connect those new fields to the existing UI pages so you don't have
to completely change all that. All you need to do is set the <selector>
value in the cspace-config.xml
Now here is an interesting question. is there value in still saving the
values from the title repeatable in both the core schema and in your
domain schema?, effectively duplicating data in the service layer but,
at least in the short term, I am mainly thinking about search and list
view which just returns the primary field in title, which currently
isn't easily configurable to a different field without poking the
service layer schemas (tho hopefully will one day be configured easily).
However, I could see it being potentially easy to connect a core group
and a domain group to the same UI group so that they would both be
filled (as much as their fields allow).
If there is value in this I am happy to set up the logic in the App
layer for it. Or do you think it would be potentially confusing? It does
have the feel of a bodge about it but it also has a feeling that it
might be something that has value.
Chris
On 01/03/2011 20:58, Christopher Pott wrote:
Hi Chris,
If that turns out to be the case then I guess we will just have to
duplicate the whole group (plus the new fields) in the domain schema.
Thanks,
Chris
*Fra:*Chris Martin [mailto:csm22@caret.cam.ac.uk]
Sendt: 1. marts 2011 16:20
Til: Christopher Pott
Cc: talk@lists.collectionspace.org; Patrick Schmitz
Emne: Re: [Talk] adding fields to core schema repeatable groups
I would not think it is possible. Patrick Schmitz would be able to
answer definitively but the segregation of core and domain in the
service layer would suggest that it probably wont work. It is the
repeatability aspect that I think would cause the issues.
Chris
On 01/03/2011 14:55, Christopher Pott wrote:
Hi,
Can anyone tell if it is possible to add a new field (from a local or
domain extension) to an existing (core) repeatable group? An example
would be adding a new field to Collectionobject 'title' group. And I
suppose what I mean is that in the UI it appears and acts as one
group, but in the underlying services it is represented across
multiple schemas.
Regards,
Chris
Talk mailing list
Talk@lists.collectionspace.org mailto:Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
Hi Chris,
On the positive side I suspect the 'Title' group is one of the worst cases :-)
I'd rather not duplicate the data. I think it would create a confusing foundation for another developer to build upon later, especially if they bypass the App layer. For example, other (future) Services layer clients may introduce inconsistencies between the two data sets, or a report designer who directly queries sql could easily select the wrong table and miss some data. I'd much sooner prefer to be able to configure which fields are used as 'key' fields and where they are used. This is necessary for anyone planning to extend the schemas. Is this very difficult to configure?
If your proposal is the only realistic option and you are willing to implement it, then I can help to test it. Would it be necessary to duplicate the entire data set for a repeated group, or could we just duplicate the data (In the case of 'Title' isn't it a single field?) needed to fulfill the required functionality?
/Chris
-----Original Message-----
From: Chris Martin [mailto:csm22@caret.cam.ac.uk]
Sent: Wed 3/2/2011 10:41 AM
To: Christopher Pott
Cc: talk@lists.collectionspace.org
Subject: Re: SV: [Talk] adding fields to core schema repeatable groups
yeap I can see how that would be tedious and really invalidate the
usefulness of the core schema. However, on the upside it is really easy
to connect those new fields to the existing UI pages so you don't have
to completely change all that. All you need to do is set the <selector>
value in the cspace-config.xml
Now here is an interesting question. is there value in still saving the
values from the title repeatable in both the core schema and in your
domain schema?, effectively duplicating data in the service layer but,
at least in the short term, I am mainly thinking about search and list
view which just returns the primary field in title, which currently
isn't easily configurable to a different field without poking the
service layer schemas (tho hopefully will one day be configured easily).
However, I could see it being potentially easy to connect a core group
and a domain group to the same UI group so that they would both be
filled (as much as their fields allow).
If there is value in this I am happy to set up the logic in the App
layer for it. Or do you think it would be potentially confusing? It does
have the feel of a bodge about it but it also has a feeling that it
might be something that has value.
Chris
On 01/03/2011 20:58, Christopher Pott wrote:
Hi Chris,
If that turns out to be the case then I guess we will just have to
duplicate the whole group (plus the new fields) in the domain schema.
Thanks,
Chris
*Fra:*Chris Martin [mailto:csm22@caret.cam.ac.uk]
Sendt: 1. marts 2011 16:20
Til: Christopher Pott
Cc: talk@lists.collectionspace.org; Patrick Schmitz
Emne: Re: [Talk] adding fields to core schema repeatable groups
I would not think it is possible. Patrick Schmitz would be able to
answer definitively but the segregation of core and domain in the
service layer would suggest that it probably wont work. It is the
repeatability aspect that I think would cause the issues.
Chris
On 01/03/2011 14:55, Christopher Pott wrote:
Hi,
Can anyone tell if it is possible to add a new field (from a local or
domain extension) to an existing (core) repeatable group? An example
would be adding a new field to Collectionobject 'title' group. And I
suppose what I mean is that in the UI it appears and acts as one
group, but in the underlying services it is represented across
multiple schemas.
Regards,
Chris
Talk mailing list
Talk@lists.collectionspace.org mailto:Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
I can see confusion could ensue.
re: configuration of key fields.
Eveything is in place from my point of view to allow configuration of
key fields, however, the configuration files are not currently being
consumed by the service layer as they are still deciding exactly how
they want configuration to work for them. Tho the movement towards the
unfied configuration file in
services/common/src/main/cspace/config/tenants/collectionspace/service-config.xml
does simplify things. and it is mostly possible to create this file
using a script from the cspace-config.xml and there is the hope that
this could work can be finished and built into the build process so we
remove 'user error' where fields are misspelled, not updated, etcetera
across the 3 levels, but current the configuration in cspace-config.xml
just affects the UI and App and you manually have to update the service
layer config.
So currently what happens is. If you set up different key fields to
those out of the box for search and listing, unless you go in and alter
the service layer by hand, there is an element of fan out in queries as
the app isn't getting everything it needs in the first call to the
service layer, (when the service layer returns the list view of
records), so the app then goes and requests an entire record/procedure
file for each result in order to get the fields that are required by the
UI and defined in cspace-config.xml.
So from your point of view, you do get the results and it does look like
everything is working. It is just slow. And this tends to really affect
the edit page view for an record with multiple related procedures and
records as the App needs to poll each related item to get the data for
the UI rather than just having everything on hand from the list view.
If you are interested you can look at the performance logs that are
written on your system.
Unless you have changed the logging I suspect that the app performance
logs are being written to /tmp/cspace-app-perflog.csv (it should rotate
itself so there is only ever 2 logs kept)
I believe this is structure of the file:
1)Timestamp (local time)
2)Unix epoch time in milliseconds, when the response was sent
3)thread
4)from (all from an app point of view)
5)to (all from an app point of view)
6)requestContext
7)HTTP method (e.g. GET, POST ...) and method.getURI()
How domain vs core fields impacts search however, I don't know. That is
a question for the service boys as the App just sends a very basic query
to them and results come back as if by magic. But once again once the
App receives that result set it might have to poll each individual
result to get all the fields required by the search results view if the
list-items haven't been configured identically to the cspace-config. But
you will get your results.
Is that helpful? I think I got a bit off topic
Chris
On 02/03/2011 12:54, Christopher Pott wrote:
Hi Chris,
On the positive side I suspect the 'Title' group is one of the worst
cases :-)
I'd rather not duplicate the data. I think it would create a confusing
foundation for another developer to build upon later, especially if
they bypass the App layer. For example, other (future) Services layer
clients may introduce inconsistencies between the two data sets, or a
report designer who directly queries sql could easily select the wrong
table and miss some data. I'd much sooner prefer to be able to
configure which fields are used as 'key' fields and where they are
used. This is necessary for anyone planning to extend the schemas. Is
this very difficult to configure?
If your proposal is the only realistic option and you are willing to
implement it, then I can help to test it. Would it be necessary to
duplicate the entire data set for a repeated group, or could we just
duplicate the data (In the case of 'Title' isn't it a single field?)
needed to fulfill the required functionality?
/Chris
-----Original Message-----
From: Chris Martin [mailto:csm22@caret.cam.ac.uk]
Sent: Wed 3/2/2011 10:41 AM
To: Christopher Pott
Cc: talk@lists.collectionspace.org
Subject: Re: SV: [Talk] adding fields to core schema repeatable groups
yeap I can see how that would be tedious and really invalidate the
usefulness of the core schema. However, on the upside it is really easy
to connect those new fields to the existing UI pages so you don't have
to completely change all that. All you need to do is set the <selector>
value in the cspace-config.xml
Now here is an interesting question. is there value in still saving the
values from the title repeatable in both the core schema and in your
domain schema?, effectively duplicating data in the service layer but,
at least in the short term, I am mainly thinking about search and list
view which just returns the primary field in title, which currently
isn't easily configurable to a different field without poking the
service layer schemas (tho hopefully will one day be configured easily).
However, I could see it being potentially easy to connect a core group
and a domain group to the same UI group so that they would both be
filled (as much as their fields allow).
If there is value in this I am happy to set up the logic in the App
layer for it. Or do you think it would be potentially confusing? It does
have the feel of a bodge about it but it also has a feeling that it
might be something that has value.
Chris
On 01/03/2011 20:58, Christopher Pott wrote:
Hi Chris,
If that turns out to be the case then I guess we will just have to
duplicate the whole group (plus the new fields) in the domain schema.
Thanks,
Chris
*Fra:*Chris Martin [mailto:csm22@caret.cam.ac.uk]
Sendt: 1. marts 2011 16:20
Til: Christopher Pott
Cc: talk@lists.collectionspace.org; Patrick Schmitz
Emne: Re: [Talk] adding fields to core schema repeatable groups
I would not think it is possible. Patrick Schmitz would be able to
answer definitively but the segregation of core and domain in the
service layer would suggest that it probably wont work. It is the
repeatability aspect that I think would cause the issues.
Chris
On 01/03/2011 14:55, Christopher Pott wrote:
Hi,
Can anyone tell if it is possible to add a new field (from a local or
domain extension) to an existing (core) repeatable group? An example
would be adding a new field to Collectionobject 'title' group. And I
suppose what I mean is that in the UI it appears and acts as one
group, but in the underlying services it is represented across
multiple schemas.
Regards,
Chris
Talk mailing list
Talk@lists.collectionspace.org mailto:Talk@lists.collectionspace.org
sorry I said service-config.xml I meant tenant-binding.xml I think when
talking about service configing
On 02/03/2011 13:52, Chris Martin wrote:
I can see confusion could ensue.
re: configuration of key fields.
Eveything is in place from my point of view to allow configuration of
key fields, however, the configuration files are not currently being
consumed by the service layer as they are still deciding exactly how
they want configuration to work for them. Tho the movement towards the
unfied configuration file in
services/common/src/main/cspace/config/tenants/collectionspace/service-config.xml
does simplify things. and it is mostly possible to create this file
using a script from the cspace-config.xml and there is the hope that
this could work can be finished and built into the build process so we
remove 'user error' where fields are misspelled, not updated, etcetera
across the 3 levels, but current the configuration in
cspace-config.xml just affects the UI and App and you manually have to
update the service layer config.
So currently what happens is. If you set up different key fields to
those out of the box for search and listing, unless you go in and
alter the service layer by hand, there is an element of fan out in
queries as the app isn't getting everything it needs in the first call
to the service layer, (when the service layer returns the list view of
records), so the app then goes and requests an entire record/procedure
file for each result in order to get the fields that are required by
the UI and defined in cspace-config.xml.
So from your point of view, you do get the results and it does look
like everything is working. It is just slow. And this tends to really
affect the edit page view for an record with multiple related
procedures and records as the App needs to poll each related item to
get the data for the UI rather than just having everything on hand
from the list view.
If you are interested you can look at the performance logs that are
written on your system.
Unless you have changed the logging I suspect that the app performance
logs are being written to /tmp/cspace-app-perflog.csv (it should
rotate itself so there is only ever 2 logs kept)
I believe this is structure of the file:
1)Timestamp (local time)
2)Unix epoch time in milliseconds, when the response was sent
3)thread
4)from (all from an app point of view)
5)to (all from an app point of view)
6)requestContext
7)HTTP method (e.g. GET, POST ...) and method.getURI()
How domain vs core fields impacts search however, I don't know. That
is a question for the service boys as the App just sends a very basic
query to them and results come back as if by magic. But once again
once the App receives that result set it might have to poll each
individual result to get all the fields required by the search results
view if the list-items haven't been configured identically to the
cspace-config. But you will get your results.
Is that helpful? I think I got a bit off topic
Chris
On 02/03/2011 12:54, Christopher Pott wrote:
Hi Chris,
On the positive side I suspect the 'Title' group is one of the worst
cases :-)
I'd rather not duplicate the data. I think it would create a
confusing foundation for another developer to build upon later,
especially if they bypass the App layer. For example, other (future)
Services layer clients may introduce inconsistencies between the two
data sets, or a report designer who directly queries sql could easily
select the wrong table and miss some data. I'd much sooner prefer to
be able to configure which fields are used as 'key' fields and where
they are used. This is necessary for anyone planning to extend the
schemas. Is this very difficult to configure?
If your proposal is the only realistic option and you are willing to
implement it, then I can help to test it. Would it be necessary to
duplicate the entire data set for a repeated group, or could we just
duplicate the data (In the case of 'Title' isn't it a single field?)
needed to fulfill the required functionality?
/Chris
-----Original Message-----
From: Chris Martin [mailto:csm22@caret.cam.ac.uk]
Sent: Wed 3/2/2011 10:41 AM
To: Christopher Pott
Cc: talk@lists.collectionspace.org
Subject: Re: SV: [Talk] adding fields to core schema repeatable groups
yeap I can see how that would be tedious and really invalidate the
usefulness of the core schema. However, on the upside it is really easy
to connect those new fields to the existing UI pages so you don't have
to completely change all that. All you need to do is set the <selector>
value in the cspace-config.xml
Now here is an interesting question. is there value in still saving the
values from the title repeatable in both the core schema and in your
domain schema?, effectively duplicating data in the service layer but,
at least in the short term, I am mainly thinking about search and list
view which just returns the primary field in title, which currently
isn't easily configurable to a different field without poking the
service layer schemas (tho hopefully will one day be configured easily).
However, I could see it being potentially easy to connect a core group
and a domain group to the same UI group so that they would both be
filled (as much as their fields allow).
If there is value in this I am happy to set up the logic in the App
layer for it. Or do you think it would be potentially confusing? It does
have the feel of a bodge about it but it also has a feeling that it
might be something that has value.
Chris
On 01/03/2011 20:58, Christopher Pott wrote:
Hi Chris,
If that turns out to be the case then I guess we will just have to
duplicate the whole group (plus the new fields) in the domain schema.
Thanks,
Chris
*Fra:*Chris Martin [mailto:csm22@caret.cam.ac.uk]
Sendt: 1. marts 2011 16:20
Til: Christopher Pott
Cc: talk@lists.collectionspace.org; Patrick Schmitz
Emne: Re: [Talk] adding fields to core schema repeatable groups
I would not think it is possible. Patrick Schmitz would be able to
answer definitively but the segregation of core and domain in the
service layer would suggest that it probably wont work. It is the
repeatability aspect that I think would cause the issues.
Chris
On 01/03/2011 14:55, Christopher Pott wrote:
Hi,
Can anyone tell if it is possible to add a new field (from a local or
domain extension) to an existing (core) repeatable group? An example
would be adding a new field to Collectionobject 'title' group. And I
suppose what I mean is that in the UI it appears and acts as one
group, but in the underlying services it is represented across
multiple schemas.
Regards,
Chris
Talk mailing list
Talk@lists.collectionspace.org mailto:Talk@lists.collectionspace.org
Chris (Martin) and Dan -
I'd like to talk to you about this more. Based upon discussions with Chris
(#3 - Hoffman) this seems to be a common use-case, and so I think we need to
figure out a more elegant and flexible solution.
AIUI, we can already model a block of information as combining elements from
two schemas. We do this to build records now, yes?
Building on that idea, How hard would it be in the app layer to model a
repeating (sub-)block of information that merges two repeating (sub-)blocks
of information? Basically, the app layer would multiplex two lists of blocks
into one list of blocks to build the record for the UI, and would then
de-mux the lists upon save.
This would be a bit more complex in the app layer, and would be a little
brittle, since the app layer would have to assume that the two lists were in
alignment. However, unless the users wrote a second app that messed with the
data, this should not be a problem. In addition, the app layer mux code
could build a list from whatever is there, with a length that was the
maximum length of the two lists, ignoring missing elements from the shorter
list.
The record structure could probably reflect that the list was a merge (i.e.,
each list element could have two sections), if that made it easier.
In the general case, it would be ideal to allow for a 3-way merge, since we
encourage implementers to model the common, domain, and local schemas, and
so their additions to a list could come from either or both of the domain
and local schemas. Finally, this facility should support any combination of
the three, so a list that combines only domain and local would also be
possible.
What do you think? As a general facility, I think this would be very useful.
Patrick
P.s. Richard - we will need to ensure that a sub-schema list correctly
persists with, e.g., 3 elements, where the first has all empty values.
From: talk-bounces@lists.collectionspace.org
[mailto:talk-bounces@lists.collectionspace.org] On Behalf Of Chris Martin
Sent: Wednesday, March 02, 2011 1:42 AM
To: Christopher Pott
Cc: talk@lists.collectionspace.org
Subject: Re: [Talk] adding fields to core schema repeatable groups
yeap I can see how that would be tedious and really invalidate the
usefulness of the core schema. However, on the upside it is really easy to
connect those new fields to the existing UI pages so you don't have to
completely change all that. All you need to do is set the <selector> value
in the cspace-config.xml
Now here is an interesting question. is there value in still saving the
values from the title repeatable in both the core schema and in your domain
schema?, effectively duplicating data in the service layer but, at least in
the short term, I am mainly thinking about search and list view which just
returns the primary field in title, which currently isn't easily
configurable to a different field without poking the service layer schemas
(tho hopefully will one day be configured easily). However, I could see it
being potentially easy to connect a core group and a domain group to the
same UI group so that they would both be filled (as much as their fields
allow).
If there is value in this I am happy to set up the logic in the App layer
for it. Or do you think it would be potentially confusing? It does have the
feel of a bodge about it but it also has a feeling that it might be
something that has value.
Chris
On 01/03/2011 20:58, Christopher Pott wrote:
Hi Chris,
If that turns out to be the case then I guess we will just have to duplicate
the whole group (plus the new fields) in the domain schema.
Thanks,
Chris
Fra: Chris Martin [mailto:csm22@caret.cam.ac.uk]
Sendt: 1. marts 2011 16:20
Til: Christopher Pott
Cc: talk@lists.collectionspace.org; Patrick Schmitz
Emne: Re: [Talk] adding fields to core schema repeatable groups
I would not think it is possible. Patrick Schmitz would be able to answer
definitively but the segregation of core and domain in the service layer
would suggest that it probably wont work. It is the repeatability aspect
that I think would cause the issues.
Chris
On 01/03/2011 14:55, Christopher Pott wrote:
Hi,
Can anyone tell if it is possible to add a new field (from a local or domain
extension) to an existing (core) repeatable group? An example would be
adding a new field to Collectionobject 'title' group. And I suppose what I
mean is that in the UI it appears and acts as one group, but in the
underlying services it is represented across multiple schemas.
Regards,
Chris
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace
.org
So as long as we can describe this in cspace-config, we will transform it to
tenant-bindings, and it will work without fan-out.
We are still pushing this new facility out across all the services (mostly,
lots of typing, not hard work). However, it will be done before too long,
and then there should never be a reason for fan-out on search results, or
other lists of results. That's why we're reworking this area of our code.
Any fan-out will reflect improper configuration, not schema definition or
coding constraints.
Patrick
From: talk-bounces@lists.collectionspace.org
[mailto:talk-bounces@lists.collectionspace.org] On Behalf Of Chris Martin
Sent: Wednesday, March 02, 2011 5:53 AM
To: Christopher Pott
Cc: talk@lists.collectionspace.org
Subject: Re: [Talk] adding fields to core schema repeatable groups
I can see confusion could ensue.
re: configuration of key fields.
Eveything is in place from my point of view to allow configuration of key
fields, however, the configuration files are not currently being consumed by
the service layer as they are still deciding exactly how they want
configuration to work for them. Tho the movement towards the unfied
configuration file in
services/common/src/main/cspace/config/tenants/collectionspace/service-confi
g.xml does simplify things. and it is mostly possible to create this file
using a script from the cspace-config.xml and there is the hope that this
could work can be finished and built into the build process so we remove
'user error' where fields are misspelled, not updated, etcetera across the 3
levels, but current the configuration in cspace-config.xml just affects the
UI and App and you manually have to update the service layer config.
So currently what happens is. If you set up different key fields to those
out of the box for search and listing, unless you go in and alter the
service layer by hand, there is an element of fan out in queries as the app
isn't getting everything it needs in the first call to the service layer,
(when the service layer returns the list view of records), so the app then
goes and requests an entire record/procedure file for each result in order
to get the fields that are required by the UI and defined in
cspace-config.xml.
So from your point of view, you do get the results and it does look like
everything is working. It is just slow. And this tends to really affect the
edit page view for an record with multiple related procedures and records as
the App needs to poll each related item to get the data for the UI rather
than just having everything on hand from the list view.
If you are interested you can look at the performance logs that are written
on your system.
Unless you have changed the logging I suspect that the app performance logs
are being written to /tmp/cspace-app-perflog.csv (it should rotate itself so
there is only ever 2 logs kept)
I believe this is structure of the file:
1)Timestamp (local time)
2)Unix epoch time in milliseconds, when the response was sent
3)thread
4)from (all from an app point of view)
5)to (all from an app point of view)
6)requestContext
7)HTTP method (e.g. GET, POST ...) and method.getURI()
How domain vs core fields impacts search however, I don't know. That is a
question for the service boys as the App just sends a very basic query to
them and results come back as if by magic. But once again once the App
receives that result set it might have to poll each individual result to get
all the fields required by the search results view if the list-items haven't
been configured identically to the cspace-config. But you will get your
results.
Is that helpful? I think I got a bit off topic
Chris
On 02/03/2011 12:54, Christopher Pott wrote:
Hi Chris,
On the positive side I suspect the 'Title' group is one of the worst cases
:-)
I'd rather not duplicate the data. I think it would create a confusing
foundation for another developer to build upon later, especially if they
bypass the App layer. For example, other (future) Services layer clients may
introduce inconsistencies between the two data sets, or a report designer
who directly queries sql could easily select the wrong table and miss some
data. I'd much sooner prefer to be able to configure which fields are used
as 'key' fields and where they are used. This is necessary for anyone
planning to extend the schemas. Is this very difficult to configure?
If your proposal is the only realistic option and you are willing to
implement it, then I can help to test it. Would it be necessary to duplicate
the entire data set for a repeated group, or could we just duplicate the
data (In the case of 'Title' isn't it a single field?) needed to fulfill the
required functionality?
/Chris
-----Original Message-----
From: Chris Martin [mailto:csm22@caret.cam.ac.uk]
Sent: Wed 3/2/2011 10:41 AM
To: Christopher Pott
Cc: talk@lists.collectionspace.org
Subject: Re: SV: [Talk] adding fields to core schema repeatable groups
yeap I can see how that would be tedious and really invalidate the
usefulness of the core schema. However, on the upside it is really easy
to connect those new fields to the existing UI pages so you don't have
to completely change all that. All you need to do is set the <selector>
value in the cspace-config.xml
Now here is an interesting question. is there value in still saving the
values from the title repeatable in both the core schema and in your
domain schema?, effectively duplicating data in the service layer but,
at least in the short term, I am mainly thinking about search and list
view which just returns the primary field in title, which currently
isn't easily configurable to a different field without poking the
service layer schemas (tho hopefully will one day be configured easily).
However, I could see it being potentially easy to connect a core group
and a domain group to the same UI group so that they would both be
filled (as much as their fields allow).
If there is value in this I am happy to set up the logic in the App
layer for it. Or do you think it would be potentially confusing? It does
have the feel of a bodge about it but it also has a feeling that it
might be something that has value.
Chris
On 01/03/2011 20:58, Christopher Pott wrote:
Hi Chris,
If that turns out to be the case then I guess we will just have to
duplicate the whole group (plus the new fields) in the domain schema.
Thanks,
Chris
*Fra:*Chris Martin [mailto:csm22@caret.cam.ac.uk]
Sendt: 1. marts 2011 16:20
Til: Christopher Pott
Cc: talk@lists.collectionspace.org; Patrick Schmitz
Emne: Re: [Talk] adding fields to core schema repeatable groups
I would not think it is possible. Patrick Schmitz would be able to
answer definitively but the segregation of core and domain in the
service layer would suggest that it probably wont work. It is the
repeatability aspect that I think would cause the issues.
Chris
On 01/03/2011 14:55, Christopher Pott wrote:
Hi,
Can anyone tell if it is possible to add a new field (from a local or
domain extension) to an existing (core) repeatable group? An example
would be adding a new field to Collectionobject 'title' group. And I
suppose what I mean is that in the UI it appears and acts as one
group, but in the underlying services it is represented across
multiple schemas.
Regards,
Chris
Talk mailing list
Talk@lists.collectionspace.org mailto:Talk@lists.collectionspace.org
Hi Patrick,
My main concern in this kind of thing is always representation:
processes can follow later.
When Chris (M) mentioned this to me, the METAL slot model came to mind,
as used by TAL, which is a kind of glorified "include" with extra
functionality and for an explicit purpose.
http://en.wikipedia.org/wiki/METAL#METAL
We would define in our XML for core parts of the schema named "slots", eg:
<record id="farm"> <field id="cottage"/> <group id="flowers"> <field id="id"/> <field id="name"/> <field id="colour"/> <field id="smell"/> <slot id="flowers-extra"/> </group> <slot id="farm-extra"/> </record>with no other code, these slots would do nothing.
But if you have, somewhere else in some customisation:
<fill ref="farm-extra"> <field id="dairy"/> <field id="tractor"/> </fill>or
<fill ref="flowers-extra"> <field id="stamen-count"/> </fill>Those could be added in. You could even have multiple fills which would
be merged.
The next question which arises is how to link it to the repeating blocks
in the service layer, as you describe. The fills would, presumably,
occur in an XML enclosing environment defining, or at least defaulting,
a schema section. For example a fill will be defined (somehow) as being
"within" a domain or museum schema through its structural location just
as fields must be (I've forgotten how we implement this, sorry!).
Given that representation, we can spot cross-section slot fills and --
with appropriate attributes or defaults on the fill tags to locate the
data within the service schema -- zip the lists as you describe.
Yes, so I think this is doable in principle and would end up quite
elegant and powerful.
The big question, though, is resources and deadlines. Aiui, Chris (P)
would like this as a part of an SMK deploy so presumably has reasonably
hard deadlines?
Dan.