-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Collection PHP Service #132
Comments
Scope:
|
Membership; adding, removing, migrating resources will be incoming soon from @DiegoPino |
See: #140 todo: membership |
To do for membership:
|
Playing with this and came across some...issues. Need to bounce off someone. Because the indirect container does not have a UUID, there is not a route in the ResourceService that can handle accepting a UUID and sub-path, converting the UUID to Fedora URI and appending the sub-path. So I would have to add proxies to the members using Chullo direct. This is not horrible, but it is breaking the separation between CollectionService / ResourceService / Chullo. Do we add a route to the ResourceService that allows for non-UUID marked Fedora Objects ala (hack attempt)
Or should we be adding UUIDs to everything and then work out a way to get the members indirect container UUID when given the pcdm:Collection's UUID? This leads me to the second question, should we be querying to see if an object already has a proxyFor in the desired collection, to avoid creating duplicates. I'm guessing we can get away with something like
But I could be misunderstanding the whole proxy thing. |
Wouldn't we only have two cases where we have an indirect container with non-UUID; members, and files?
|
You are the PCDM master, so I defer to you. We can define routes specifically using those two paths. But then we will need to design a failure in the case that the Fedora resource specified by the Uuid does not have the requested indirect container under it. If that is what we are okay with, then I would build these routes in the tagging @DiegoPino cause he might not be getting these. |
We should never be allowing direct access to those containers. Internally, we'll do a 3-store query to find them. The /members and /files routes are simply routes. Even though they line up 1:1 with the names of our containers, we are not exposing them directly. We should not be exposing any of this to the end user, and the API should hide all LDP specifics. |
OK, I am going to go ahead with making something like this in the ResourceService and use it in the CollectionService. |
Oh. That's good to know 😄 |
@whikloj don't be afraid to make a util class and inject it into the controller to do these sorts of things. that's what i'm hoping to show you folks with the collection service refactor i'm doing. we have DI. we need to really take advantage of it. it's just tricky, becuase if you do it wrong things can be worse than just jamming everything into controllers. we'll talk about it on Monday. i'll have something to show you then. |
@jared, sorry late, but
Do you need a post or a put? Eitherway, does this make sense? |
@whikloj, as talked in Skype, one way could be (no need to make it this way, but the way i could think of)
|
PRs for addition and deletion of collection proxies are handled in |
Resolved with 72d17f7 |
Convenience operations for pcdm:Collections in Fedora 4.
Endpoint: http://localhost:8080/islandora/collection/
Actions:
POST
http://localhost:8080/islandora/collection/?tx={tx_id}pcdm:Collection
in Fedora 4.pcdm:hasMember
relationship and its inverse.PCDMize the paradigm
See also #105
The text was updated successfully, but these errors were encountered: