curationexperts / epigaea

A MIRA replacement running on Hyrax 2.0
Other
1 stars 2 forks source link

DATA MODEL: Ordered Fields: creator, description #122

Closed mark-dce closed 6 years ago

mark-dce commented 7 years ago

STORY Provide support to allow entries in the author field to be persistently ordered.

ASSUMPTION: this is a display order issue.

NOTE: descriptive metadata export/import needs to be able to round-trip values in a consistent order

ACCEPTANCE

mark-dce commented 7 years ago

Blocked until we've defined descriptive metadata export / import requirements

mark-dce commented 7 years ago

ACCEPTANCE

val99erie commented 6 years ago

Here's a possible hint for implementation: PSU has an ordered list of creators for their works in ScholarSphere (a sufia-based app). I'm not sure if we could do something like this, or if there is a better way to do it in Hyrax 2.x, but looking at this code might be helpful.

https://github.com/psu-stewardship/scholarsphere/blob/develop/app/models/concerns/has_creators.rb#L14

mark-dce commented 6 years ago

We can use either the PSU solution or inline a serialized array (and possibly index the order into solr).

mark-dce commented 6 years ago

NOTE: be sure to test with a couple long descriptions.

val99erie commented 6 years ago

@mark-dce In one of the comments above, you added another 2 acceptance criteria that say order is preserved for multiple entries. Could you explain what those mean? How are those different from the acceptance criteria listed at the top of the story?

mark-dce commented 6 years ago

@val99erie - I think that was the initial version of the acceptance criteria which we later went back and fleshed out by updating the main ticket - I've been trying to keep final acceptance criteria up to date in the main ticket body so we can easily scan the ticket and tell how close it is to done without having to parse the entire comment chain.

mark-dce commented 6 years ago

So, high level = keep creator and description ordered, the more detailed criteria lay out all the places we should probably look to ensure order is being preserved.

val99erie commented 6 years ago

@mark-dce One more question - This ticket uses the words 'creator' and 'contributor' interchangeably, but those are 2 different properties. I'm working under the assumption that the ordered fields should be just description and creator, but please let me know if I should also be working on the contributor field.

mark-dce commented 6 years ago

@val99erie - I probably just wasn't being careful in writing the ticket up. For now, the ordering should apply to creator and description only.

val99erie commented 6 years ago

For existing records in the demo environment: You will need to re-enter and save the descriptions if you want them in order. Just re-indexing won't do it.

val99erie commented 6 years ago

@mark-dce - Can we drop the requirement for ordered fields in the turtle view?

The turtle view shows the creator and description fields in random order, and getting them into the correct order will require a lot of work. (The turtle view does contain the JSON-serialized secondary fields for the ordered creators and descriptions, so the information about the order is present in the turtle, it's just contained in other fields.)

I discussed it on slack with @no-reply, and he said:

I don't think you should try to retain order in the turtle views for items. Doing so is strictly speaking meaningless, since the RDF abstract syntax and the turtle serialization are both non-ordered. Instead, you could add the special tufts predicates with the serialized list to the turtle dump If you do that, it should also work for other RDF serialization formats

val99erie commented 6 years ago

After discussion on slack, we decided not to require ordering in the TTL view