Navigation Menu

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

Add a Preference for ServerManaged (and allow clients to exclude Server Managed properties on update) #549

Merged
merged 8 commits into from Oct 18, 2014

Conversation

cbeer
Copy link
Contributor

@cbeer cbeer commented Oct 16, 2014

rdfStream.concat(getTriples(AclRdfContext.class));
rdfStream.concat(getTriples(TypeRdfContext.class));
final Predicate<Triple> tripleFilter;
if (ldpPreferences.prefersServerManaged()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is sad, but I think post-filtering is much easier than trying to add a way to push the filter upstream... plus, we already have a predicate for filtering triples, but not one for filtering JCR properties.

@cbeer cbeer force-pushed the prefer-server-managed branch 2 times, most recently from ab6c0d7 to b31fb64 Compare October 17, 2014 01:45
REPOSITORY_NAMESPACE, JCR_NAMESPACE);
REPOSITORY_NAMESPACE, JCR_NAMESPACE,
MIX_NAMESPACE, JCR_NT_NAMESPACE, MODE_NAMESPACE,
LDP_NAMESPACE);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Talking with @azaroth42, we believe these namespaces are always considered server-managed (and, at a practical level, should never be used by a client providing a rdf:type)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, but are we cool with people using them in other contexts, e.g.:

someThing somePredicate LDP_NAMESPACE#someObject

or are we saying that any RDF that uses any of these namespaces in any way is verboten.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're just preventing their use in user-provided types, and preventing them from displaying when server-managed properties or a minimal response format is requested (but they're free to add them) .. which I think is about right for all the LDP defined predicates right now.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rationale is to make it easy for client systems to get back what they put in, without all of the overhead added by the server managed properties. It became kinda crazy when you put in three triples and got back thirty.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I get the desire to not display them on the way out (when that's what the client wants). I was just checking on what we're constraining on the way in. It sounds good to me. +1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only for rdf:type, which we can argue LDP lets us do.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, and even it didn't, I find it very hard to think of a use case for allowing that kind of monkey business. I'd rather anyone who thinks they need to do this bring it up in a public forum so we can figure out what they're trying to do and help them.

@cbeer cbeer force-pushed the resource-converter branch 3 times, most recently from 319285c to 6cc2ad4 Compare October 17, 2014 17:59
@cbeer cbeer force-pushed the prefer-server-managed branch 2 times, most recently from 65d325a to c541025 Compare October 17, 2014 19:36
…ntend to operate against

This allows clients who only have a partial representation of a resource to use
PUT operations to replace only the triples they are aware of, or provide hints
to the server about what triples they intend to operate on (for e.g. PATCH)

e.g.:

PUT /a
Prefer: handling=lenient;
omit="http://fedora.info/definitions/v4/repository#ServerManaged"

... only non-managed server properties ...

or

PUT /a
Prefer: handling=lenient; received="minimal"

... only the minimal representation ...
@cbeer cbeer force-pushed the prefer-server-managed branch 3 times, most recently from 4fddadb to 2009fd6 Compare October 17, 2014 19:49
@cbeer cbeer changed the title Prefer server managed Add a Preference for ServerManaged (and allow clients to exclude Server Managed properties on update) Oct 17, 2014
awoods pushed a commit that referenced this pull request Oct 18, 2014
Add a Preference for ServerManaged (and allow clients to exclude Server Managed properties on update)
@awoods awoods merged commit 816ffa6 into resource-converter Oct 18, 2014
@awoods awoods deleted the prefer-server-managed branch October 18, 2014 16:24
awoods pushed a commit that referenced this pull request Oct 18, 2014
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

Successfully merging this pull request may close these issues.

None yet

4 participants