public abstract class LDPService extends Object
Modifier and Type | Field and Description |
---|---|
static String[] |
ACCEPT_PATCH_CONTENT_TYPES |
static String |
ACCEPT_PATCH_CONTENT_TYPES_STR |
static String |
ACCEPT_POST_CONTENT_TYPES_STR |
static String |
LDP_CONTENT_SEGMENT |
static String |
LDP_ROOTURI |
static String |
LINK_TYPE_RESOURCE_REGEX
Regular expression that matches Link headers with URI
LDPConstants.CLASS_RESOURCE and linknrelation "type" . |
static String |
ROOT_APP_URL |
static String |
ROOT_CONTAINER_URL |
static String |
ROOT_PATH_SEG |
Constructor and Description |
---|
LDPService() |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
delete() |
static String |
encodeAccept(String[] contentTypes) |
javax.ws.rs.core.Response |
getApplicationRDFXML() |
javax.ws.rs.core.Response |
getApplicationXTurtle() |
javax.ws.rs.core.Response |
getJSON() |
javax.ws.rs.core.Response |
getNonRdfSource() |
protected javax.ws.rs.core.MultivaluedMap<String,String> |
getPreferencesFromRequest()
Gets the
include and omit values in the
HTTP Prefer header for this request. |
protected String |
getPublicURI() |
protected ILDPContainer |
getRequestContainer() |
protected abstract LDPResourceManager |
getResourceManger() |
protected abstract ILDPContainer |
getRootContainer() |
javax.ws.rs.core.Response |
getTextTurtle() |
static boolean |
hasResourceTypeHeader(javax.ws.rs.core.HttpHeaders headers)
Given a set of request headers, return true if any of them are (roughly):
Link:
|
protected static boolean |
isRelType(String p0) |
javax.ws.rs.core.Response |
options() |
static String |
parseSlug(String header) |
javax.ws.rs.core.Response |
patch(InputStream content,
String id) |
javax.ws.rs.core.Response |
post(String slug,
InputStream content) |
javax.ws.rs.core.Response |
postNonRDFSource(String slug,
InputStream content) |
javax.ws.rs.core.StreamingOutput |
postQuery(InputStream content,
String id) |
javax.ws.rs.core.Response |
putNonRDFSource(InputStream content) |
javax.ws.rs.core.Response |
putRDFSource(InputStream content) |
protected abstract void |
resetContainer() |
static String |
wrapPathSeg(String pathSeg)
Make sure path segment, begins and ends with /
|
public static final String LDP_CONTENT_SEGMENT
public static final String LDP_ROOTURI
public static final String LINK_TYPE_RESOURCE_REGEX
LDPConstants.CLASS_RESOURCE
and linknrelation "type"
. These all match:
<http://www.w3.org/ns/ldp#Resource>; rel="type"
<http://www.w3.org/ns/ldp#Resource>; rel="type"; title="LDP Resource"
<http://www.w3.org/ns/ldp#Resource>;rel=type
<http://www.w3.org/ns/ldp#Resource>; rel="type http://example.net/relation/other"
public static final String ROOT_APP_URL
public static final String ROOT_PATH_SEG
public static final String ROOT_CONTAINER_URL
public static final String[] ACCEPT_PATCH_CONTENT_TYPES
public static final String ACCEPT_POST_CONTENT_TYPES_STR
public static final String ACCEPT_PATCH_CONTENT_TYPES_STR
protected abstract void resetContainer()
protected abstract ILDPContainer getRootContainer()
protected abstract LDPResourceManager getResourceManger()
protected String getPublicURI()
public javax.ws.rs.core.Response getTextTurtle()
public javax.ws.rs.core.Response getApplicationXTurtle()
public javax.ws.rs.core.Response getJSON()
public javax.ws.rs.core.Response getApplicationRDFXML()
public javax.ws.rs.core.Response getNonRdfSource()
public javax.ws.rs.core.Response options()
public javax.ws.rs.core.Response putRDFSource(InputStream content)
public javax.ws.rs.core.Response putNonRDFSource(InputStream content)
public javax.ws.rs.core.Response post(@HeaderParam(value="Slug") String slug, InputStream content)
public static boolean hasResourceTypeHeader(javax.ws.rs.core.HttpHeaders headers)
protected static boolean isRelType(String p0)
protected ILDPContainer getRequestContainer()
public javax.ws.rs.core.StreamingOutput postQuery(InputStream content, String id)
public javax.ws.rs.core.Response postNonRDFSource(@HeaderParam(value="Slug") String slug, InputStream content)
public javax.ws.rs.core.Response delete()
public javax.ws.rs.core.Response patch(InputStream content, String id)
protected javax.ws.rs.core.MultivaluedMap<String,String> getPreferencesFromRequest()
include
and omit
values in the
HTTP Prefer
header for this request.include
- a list of include values to populateomit
- a list of omit values to populateCopyright © 2018. All rights reserved.