Skip to content
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

Modeshape Impl: Interaction models effectively can't be changed #229

Closed
escowles opened this issue Sep 19, 2017 · 2 comments
Closed

Modeshape Impl: Interaction models effectively can't be changed #229

escowles opened this issue Sep 19, 2017 · 2 comments

Comments

@escowles
Copy link
Contributor

Section 3.2.1 says that PATCH must not allow changing interaction models to non-subtypes. But my reading of the LDP ontology and the types that the Modeshape implementation supports (NonRDFSource, BasicContainer, DirectContainer, IndirectContainer) means that you effectively can't change the interaction model after creating a resource (because none of those types are subtypes of any of the other types).

In order to allow changing to a subtype, an implementation would need to allow creating Resource, RDFSource or Container types.

I don't think this is a problem, but I wanted to raise it as a non-obvious consequence of the spec and the choices made in the Modeshape implementation.

@birkland
Copy link
Contributor

Re-reading this, it has the consequence of:

  • If a repository advertises a Link rel=type of a "most specific" type, then it cannot be changed (i.e If a resources advertises the headerLink: <ldp:BasicContainer"; rel=type, that resource cannot be changed to DirectContainer, Container, etc).
  • If a repository advertises a less-specific superclass in the link header (e.g. ldp:Container or ldp:Resource), then
    1. Absent a priori knowledge, a client needs to infer its most specific interaction model by inspecting the triples by looking for ldp:hasMemberRelation or ldp:isMemberOfRelation in order to know it is a direct container, or ldp:insertedContentRelation in order to know it is an indirect container.
    2. The most specific model can be changed (e.g BasicContainer to IndirectContainer) by modifying the resource's triples via PUT or PATCH

@awoods
Copy link
Collaborator

awoods commented Oct 4, 2017

As a note, Cavendish creates RDFSources in the absence of a client-provided interaction model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants