Documentation: Create a PCDM ObjectService

Created on 12 May 2016  路  7Comments  路  Source: Islandora/documentation

The ResourceService is meant to be low level and have no assumptions on item creation.

However for a large number of resources we will be creating pcdm:Objects, so we need a service much like the ResourceService but:

  1. It checks for the existence of a UUID in any supplied RDF and adds one if it doesn't exist. This is already done in the CollectionService, so it might be good to create a PcdmUtilities class to put some common functions like that in and call them from Collection and Object.
  2. Move the proxy deletion that @br2490 added to ResourceService to this new service instead.
  3. ...other pcdm'esque things?
Crayfish PDX pcdm

Most helpful comment

@bryjbrown I would add that once you have an PCDM ObjectService running we want to move the ORE proxy deletion code of @br2490's from the Crayfish, into here.

All 7 comments

@bryjbrown would you be interested in trying this in the sprint?

@whikloj sure, I can give it a shot. If I understand correctly, I could probably frankenstein something together from the pieces of ResourceService and CollectionService, right?

My main concern is that I'm not sure how to test a new service, this is pretty far off from anything I've done before so I may bug y'all on IRC about it.

Absolutely @bryjbrown, that's the best way to learn. If you want to test it, I would suggest maybe looking at writing a PHPUnit test. We do want to start adding some integration tests for these services, so we can use them to verify our work but also test new versions of Fedora 4.

Also, because of https://github.com/Islandora-CLAW/CLAW/issues/226, what you are building is no longer a PcdmObjectService, but rather a PcdmService with both an Object and Collection component.

We'll talk at the kick-off call.

Despite not being able to close the ticket during Sprint 07, I feel like I made quite a bit of progress by having an entry point into CLAW work and diving into PCDM (and RDF/ontologies in general) and starting to play with Silex.

I've got the CLAW Vagrant VM up and running, and I should be able to access the PDX microservices directly via the REST APIs which will make it easier to understand what I'm doing and allow me to use the Fedora 4 interface to debug.

If you're okay with keeping me as the assignee, I think I could make more progress on it during the next sprint. I might try my hand at adding some unit tests (#260) too.

While I'm marinating in PCDM and Silex for the next two weeks, it would be helpful to know what the future plans for PDX are. We have a CollectionService, we're giving it an ObjectService, and it looks like @br2490 is working on a FileService in #189?

So far my understanding is that all three services listed above should:

  • Check resource for a UUID and create/attach one if it doesn't already have it
  • Verify that the resource is of the correct PCDM type

Beyond that, Collections should be able to attach/detach child Collections & Objects, and Objects should be able to attach/detach child Objects and Files.

Let me know if I got any of that wrong or if I'm leaving anything out.

@bryjbrown completely. I feel that is the whole idea of our Sprints. We should talk more about PDX during tomorrow calls to decide on the future services, i think derivative stuff should also go there.
Thanks for all your work!

@bryjbrown I would add that once you have an PCDM ObjectService running we want to move the ORE proxy deletion code of @br2490's from the Crayfish, into here.

Totally cool to keep working on this @bryjbrown. Really happy to see you willing to continue and engage with the work :smile:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

manez picture manez  路  5Comments

Natkeeran picture Natkeeran  路  3Comments

acoburn picture acoburn  路  5Comments

jonathangreen picture jonathangreen  路  4Comments

ruebot picture ruebot  路  4Comments