001/*
002 * Licensed to DuraSpace under one or more contributor license agreements.
003 * See the NOTICE file distributed with this work for additional information
004 * regarding copyright ownership.
005 *
006 * DuraSpace licenses this file to you under the Apache License,
007 * Version 2.0 (the "License"); you may not use this file except in
008 * compliance with the License.  You may obtain a copy of the License at
009 *
010 *     http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018package org.fcrepo.client;
019
020import java.net.URI;
021
022/**
023 * Constants for Prefer headers
024 *
025 * @author bbpennel
026 */
027public class PreferHeaderConstants {
028
029    // Embed "child" resources in the returned representation
030    public final static URI PREFER_CONTAINED_DESCRIPTIONS = URI.create(
031            "http://www.w3.org/ns/oa#PreferContainedDescriptions");
032
033    // Include/Exclude "ldp:contains" assertions to contained resources
034    public final static URI PREFER_CONTAINMENT = URI.create("http://www.w3.org/ns/ldp#PreferContainment");
035
036    // Include/Exclude assertions to member resources established by the Direct and Indirect containers
037    public final static URI PREFER_MEMBERSHIP = URI.create("http://www.w3.org/ns/ldp#PreferMembership");
038
039    // Include/Exclude triples that would be present when the container is empty
040    public final static URI PREFER_MINIMAL_CONTAINER = URI.create("http://www.w3.org/ns/ldp#PreferMinimalContainer");
041
042    // Include assertions from other Fedora resources to this node
043    public final static URI PREFER_INBOUND_REFERENCES = URI.create(
044            "http://fedora.info/definitions/fcrepo#PreferInboundReferences");
045
046    // Embed server managed properties in the representation
047    public final static URI PREFER_SERVER_MANAGED = URI.create(
048            "http://fedora.info/definitions/v4/repository#ServerManaged");
049
050    // Allows replacing the properties of a container without having to provide all of the server-managed triples
051    public final static String HANDLING_LENIENT = "handling=lenient; received=\"minimal\"";
052
053    // links to other resources and their properties should be included
054    public final static String RETURN_REPRESENTATION = "return=representation";
055
056    // only triples directly related to a resource should be returned
057    public final static String RETURN_MINIMAL = "return=minimal";
058
059    private PreferHeaderConstants() {
060    }
061}