@ApplicationScoped public class LdpServiceImpl extends Object implements LdpService
LdpService.InteractionModel
SERVER_MANAGED_PROPERTIES, SERVER_PREFERED_RDF_FORMATS
Constructor and Description |
---|
LdpServiceImpl() |
Modifier and Type | Method and Description |
---|---|
String |
addResource(org.openrdf.repository.RepositoryConnection connection,
String container,
String resource,
LdpService.InteractionModel interactionModel,
String type,
InputStream stream)
Add a LDP resource
|
String |
addResource(org.openrdf.repository.RepositoryConnection connection,
String container,
String resource,
String type,
InputStream stream)
Add a LDP resource
|
String |
addResource(org.openrdf.repository.RepositoryConnection connection,
org.openrdf.model.URI container,
org.openrdf.model.URI resource,
LdpService.InteractionModel interactionModel,
String type,
InputStream stream)
Add a LDP resource
|
String |
addResource(org.openrdf.repository.RepositoryConnection connection,
org.openrdf.model.URI container,
org.openrdf.model.URI resource,
String type,
InputStream stream)
Add a LDP resource
|
boolean |
deleteResource(org.openrdf.repository.RepositoryConnection connection,
String resource) |
boolean |
deleteResource(org.openrdf.repository.RepositoryConnection connection,
org.openrdf.model.URI resource) |
boolean |
exists(org.openrdf.repository.RepositoryConnection connection,
String resource)
Check if the specified resource already exists.
|
boolean |
exists(org.openrdf.repository.RepositoryConnection connection,
org.openrdf.model.URI resource)
Check if the specified resource already exists.
|
void |
exportBinaryResource(org.openrdf.repository.RepositoryConnection connection,
String resource,
OutputStream out) |
void |
exportBinaryResource(org.openrdf.repository.RepositoryConnection connection,
org.openrdf.model.URI resource,
OutputStream out) |
void |
exportResource(org.openrdf.repository.RepositoryConnection connection,
String resource,
OutputStream output,
org.openrdf.rio.RDFFormat format) |
void |
exportResource(org.openrdf.repository.RepositoryConnection connection,
String resource,
OutputStream output,
org.openrdf.rio.RDFFormat format,
Preference preference) |
void |
exportResource(org.openrdf.repository.RepositoryConnection connection,
org.openrdf.model.URI resource,
OutputStream output,
org.openrdf.rio.RDFFormat format) |
void |
exportResource(org.openrdf.repository.RepositoryConnection connection,
org.openrdf.model.URI resource,
OutputStream output,
org.openrdf.rio.RDFFormat format,
Preference preference) |
javax.ws.rs.core.EntityTag |
generateETag(org.openrdf.repository.RepositoryConnection connection,
String resource) |
javax.ws.rs.core.EntityTag |
generateETag(org.openrdf.repository.RepositoryConnection connection,
org.openrdf.model.URI uri) |
LdpService.InteractionModel |
getInteractionModel(List<javax.ws.rs.core.Link> linkHeaders) |
LdpService.InteractionModel |
getInteractionModel(org.openrdf.repository.RepositoryConnection connection,
String resource) |
LdpService.InteractionModel |
getInteractionModel(org.openrdf.repository.RepositoryConnection connection,
org.openrdf.model.URI uri) |
Date |
getLastModified(org.openrdf.repository.RepositoryConnection connection,
String resource) |
Date |
getLastModified(org.openrdf.repository.RepositoryConnection connection,
org.openrdf.model.URI uri) |
List<org.openrdf.model.Statement> |
getLdpTypes(org.openrdf.repository.RepositoryConnection connection,
String resource) |
List<org.openrdf.model.Statement> |
getLdpTypes(org.openrdf.repository.RepositoryConnection connection,
org.openrdf.model.URI resource) |
String |
getMimeType(org.openrdf.repository.RepositoryConnection connection,
String resource) |
String |
getMimeType(org.openrdf.repository.RepositoryConnection connection,
org.openrdf.model.URI uri) |
org.openrdf.model.URI |
getNonRdfSourceForRdfSource(org.openrdf.repository.RepositoryConnection connection,
String resource) |
org.openrdf.model.URI |
getNonRdfSourceForRdfSource(org.openrdf.repository.RepositoryConnection connection,
org.openrdf.model.URI uri) |
org.openrdf.model.URI |
getRdfSourceForNonRdfSource(org.openrdf.repository.RepositoryConnection connection,
String resource) |
org.openrdf.model.URI |
getRdfSourceForNonRdfSource(org.openrdf.repository.RepositoryConnection connection,
org.openrdf.model.URI uri) |
String |
getResourceUri(javax.ws.rs.core.UriInfo uriInfo) |
javax.ws.rs.core.UriBuilder |
getResourceUriBuilder(javax.ws.rs.core.UriInfo uriInfo) |
boolean |
hasType(org.openrdf.repository.RepositoryConnection connection,
org.openrdf.model.URI resource,
org.openrdf.model.URI type) |
void |
init(org.openrdf.repository.RepositoryConnection connection,
org.openrdf.model.URI root)
Initializes the root LDP Container
|
boolean |
isNonRdfSourceResource(org.openrdf.repository.RepositoryConnection connection,
String resource) |
boolean |
isNonRdfSourceResource(org.openrdf.repository.RepositoryConnection connection,
org.openrdf.model.URI uri) |
boolean |
isRdfSourceResource(org.openrdf.repository.RepositoryConnection connection,
String resource) |
boolean |
isRdfSourceResource(org.openrdf.repository.RepositoryConnection connection,
org.openrdf.model.URI uri) |
boolean |
isReusedURI(org.openrdf.repository.RepositoryConnection connection,
String resource)
Check if the specified resource would be a re-used URI.
|
boolean |
isReusedURI(org.openrdf.repository.RepositoryConnection connection,
org.openrdf.model.URI resource)
Check if the specified resource would be a re-used URI.
|
void |
patchResource(org.openrdf.repository.RepositoryConnection connection,
String resource,
InputStream patchData,
boolean strict) |
void |
patchResource(org.openrdf.repository.RepositoryConnection connection,
org.openrdf.model.URI uri,
InputStream patchData,
boolean strict) |
String |
updateResource(org.openrdf.repository.RepositoryConnection connection,
String resource,
InputStream stream,
String type)
Update an existing resource
|
String |
updateResource(org.openrdf.repository.RepositoryConnection connection,
String resource,
InputStream stream,
String type,
boolean overwrite)
Update an existing resource
|
String |
updateResource(org.openrdf.repository.RepositoryConnection connection,
org.openrdf.model.URI resource,
InputStream stream,
String type)
Update an existing resource
|
String |
updateResource(org.openrdf.repository.RepositoryConnection connection,
org.openrdf.model.URI resource,
InputStream stream,
String type,
boolean overwrite)
Update an existing resource
|
public void init(org.openrdf.repository.RepositoryConnection connection, org.openrdf.model.URI root) throws org.openrdf.repository.RepositoryException
LdpService
init
in interface LdpService
connection
- repository connectionroot
- root containerorg.openrdf.repository.RepositoryException
public String getResourceUri(javax.ws.rs.core.UriInfo uriInfo)
getResourceUri
in interface LdpService
public javax.ws.rs.core.UriBuilder getResourceUriBuilder(javax.ws.rs.core.UriInfo uriInfo)
getResourceUriBuilder
in interface LdpService
public boolean exists(org.openrdf.repository.RepositoryConnection connection, String resource) throws org.openrdf.repository.RepositoryException
LdpService
exists
in interface LdpService
connection
- the repository connectionresource
- the resource to testorg.openrdf.repository.RepositoryException
public boolean exists(org.openrdf.repository.RepositoryConnection connection, org.openrdf.model.URI resource) throws org.openrdf.repository.RepositoryException
LdpService
exists
in interface LdpService
connection
- the repository connectionresource
- the resource to testorg.openrdf.repository.RepositoryException
public boolean isReusedURI(org.openrdf.repository.RepositoryConnection connection, String resource) throws org.openrdf.repository.RepositoryException
LdpService
isReusedURI
in interface LdpService
connection
- the repository connectionresource
- the resource to testorg.openrdf.repository.RepositoryException
public boolean isReusedURI(org.openrdf.repository.RepositoryConnection connection, org.openrdf.model.URI resource) throws org.openrdf.repository.RepositoryException
LdpService
isReusedURI
in interface LdpService
connection
- the repository connectionresource
- the resource to testorg.openrdf.repository.RepositoryException
public boolean hasType(org.openrdf.repository.RepositoryConnection connection, org.openrdf.model.URI resource, org.openrdf.model.URI type) throws org.openrdf.repository.RepositoryException
hasType
in interface LdpService
org.openrdf.repository.RepositoryException
public List<org.openrdf.model.Statement> getLdpTypes(org.openrdf.repository.RepositoryConnection connection, String resource) throws org.openrdf.repository.RepositoryException
getLdpTypes
in interface LdpService
org.openrdf.repository.RepositoryException
public List<org.openrdf.model.Statement> getLdpTypes(org.openrdf.repository.RepositoryConnection connection, org.openrdf.model.URI resource) throws org.openrdf.repository.RepositoryException
getLdpTypes
in interface LdpService
org.openrdf.repository.RepositoryException
public boolean isRdfSourceResource(org.openrdf.repository.RepositoryConnection connection, String resource) throws org.openrdf.repository.RepositoryException
isRdfSourceResource
in interface LdpService
org.openrdf.repository.RepositoryException
public boolean isRdfSourceResource(org.openrdf.repository.RepositoryConnection connection, org.openrdf.model.URI uri) throws org.openrdf.repository.RepositoryException
isRdfSourceResource
in interface LdpService
org.openrdf.repository.RepositoryException
public boolean isNonRdfSourceResource(org.openrdf.repository.RepositoryConnection connection, String resource) throws org.openrdf.repository.RepositoryException
isNonRdfSourceResource
in interface LdpService
org.openrdf.repository.RepositoryException
public boolean isNonRdfSourceResource(org.openrdf.repository.RepositoryConnection connection, org.openrdf.model.URI uri) throws org.openrdf.repository.RepositoryException
isNonRdfSourceResource
in interface LdpService
org.openrdf.repository.RepositoryException
public org.openrdf.model.URI getRdfSourceForNonRdfSource(org.openrdf.repository.RepositoryConnection connection, org.openrdf.model.URI uri) throws org.openrdf.repository.RepositoryException
getRdfSourceForNonRdfSource
in interface LdpService
org.openrdf.repository.RepositoryException
public org.openrdf.model.URI getRdfSourceForNonRdfSource(org.openrdf.repository.RepositoryConnection connection, String resource) throws org.openrdf.repository.RepositoryException
getRdfSourceForNonRdfSource
in interface LdpService
org.openrdf.repository.RepositoryException
public org.openrdf.model.URI getNonRdfSourceForRdfSource(org.openrdf.repository.RepositoryConnection connection, String resource) throws org.openrdf.repository.RepositoryException
getNonRdfSourceForRdfSource
in interface LdpService
org.openrdf.repository.RepositoryException
public org.openrdf.model.URI getNonRdfSourceForRdfSource(org.openrdf.repository.RepositoryConnection connection, org.openrdf.model.URI uri) throws org.openrdf.repository.RepositoryException
getNonRdfSourceForRdfSource
in interface LdpService
org.openrdf.repository.RepositoryException
public void exportResource(org.openrdf.repository.RepositoryConnection connection, String resource, OutputStream output, org.openrdf.rio.RDFFormat format) throws org.openrdf.repository.RepositoryException, org.openrdf.rio.RDFHandlerException
exportResource
in interface LdpService
org.openrdf.repository.RepositoryException
org.openrdf.rio.RDFHandlerException
public void exportResource(org.openrdf.repository.RepositoryConnection connection, org.openrdf.model.URI resource, OutputStream output, org.openrdf.rio.RDFFormat format) throws org.openrdf.repository.RepositoryException, org.openrdf.rio.RDFHandlerException
exportResource
in interface LdpService
org.openrdf.repository.RepositoryException
org.openrdf.rio.RDFHandlerException
public void exportResource(org.openrdf.repository.RepositoryConnection connection, String resource, OutputStream output, org.openrdf.rio.RDFFormat format, Preference preference) throws org.openrdf.rio.RDFHandlerException, org.openrdf.repository.RepositoryException
exportResource
in interface LdpService
org.openrdf.rio.RDFHandlerException
org.openrdf.repository.RepositoryException
public void exportResource(org.openrdf.repository.RepositoryConnection connection, org.openrdf.model.URI resource, OutputStream output, org.openrdf.rio.RDFFormat format, Preference preference) throws org.openrdf.repository.RepositoryException, org.openrdf.rio.RDFHandlerException
exportResource
in interface LdpService
org.openrdf.repository.RepositoryException
org.openrdf.rio.RDFHandlerException
public void exportBinaryResource(org.openrdf.repository.RepositoryConnection connection, String resource, OutputStream out) throws org.openrdf.repository.RepositoryException, IOException
exportBinaryResource
in interface LdpService
org.openrdf.repository.RepositoryException
IOException
public void exportBinaryResource(org.openrdf.repository.RepositoryConnection connection, org.openrdf.model.URI resource, OutputStream out) throws org.openrdf.repository.RepositoryException, IOException
exportBinaryResource
in interface LdpService
org.openrdf.repository.RepositoryException
IOException
public String getMimeType(org.openrdf.repository.RepositoryConnection connection, String resource) throws org.openrdf.repository.RepositoryException
getMimeType
in interface LdpService
org.openrdf.repository.RepositoryException
public String getMimeType(org.openrdf.repository.RepositoryConnection connection, org.openrdf.model.URI uri) throws org.openrdf.repository.RepositoryException
getMimeType
in interface LdpService
org.openrdf.repository.RepositoryException
public String addResource(org.openrdf.repository.RepositoryConnection connection, String container, String resource, String type, InputStream stream) throws org.openrdf.repository.RepositoryException, IOException, org.openrdf.rio.RDFParseException
LdpService
addResource
in interface LdpService
connection
- repository connectioncontainer
- container where add the resourceresource
- resource to addtype
- mimetype of the posted resourcestream
- stream from where read the resource representationorg.openrdf.repository.RepositoryException
IOException
org.openrdf.rio.RDFParseException
public String addResource(org.openrdf.repository.RepositoryConnection connection, org.openrdf.model.URI container, org.openrdf.model.URI resource, String type, InputStream stream) throws org.openrdf.repository.RepositoryException, IOException, org.openrdf.rio.RDFParseException
LdpService
addResource
in interface LdpService
connection
- repository connectioncontainer
- container where add the resourceresource
- resource to addtype
- mimetype of the posted resourcestream
- stream from where read the resource representationorg.openrdf.repository.RepositoryException
IOException
org.openrdf.rio.RDFParseException
public String addResource(org.openrdf.repository.RepositoryConnection connection, String container, String resource, LdpService.InteractionModel interactionModel, String type, InputStream stream) throws org.openrdf.repository.RepositoryException, IOException, org.openrdf.rio.RDFParseException
LdpService
addResource
in interface LdpService
connection
- repository connectioncontainer
- container where add the resourceresource
- resource to addinteractionModel
- the ldp interaction modeltype
- mimetype of the posted resourcestream
- stream from where read the resource representationorg.openrdf.repository.RepositoryException
IOException
org.openrdf.rio.RDFParseException
public String addResource(org.openrdf.repository.RepositoryConnection connection, org.openrdf.model.URI container, org.openrdf.model.URI resource, LdpService.InteractionModel interactionModel, String type, InputStream stream) throws org.openrdf.repository.RepositoryException, IOException, org.openrdf.rio.RDFParseException
LdpService
addResource
in interface LdpService
connection
- repository connectioncontainer
- container where add the resourceresource
- resource to addinteractionModel
- the ldp interaction modeltype
- mimetype of the posted resourcestream
- stream from where read the resource representationorg.openrdf.repository.RepositoryException
IOException
org.openrdf.rio.RDFParseException
public String updateResource(org.openrdf.repository.RepositoryConnection connection, String resource, InputStream stream, String type) throws org.openrdf.repository.RepositoryException, IncompatibleResourceTypeException, org.openrdf.rio.RDFParseException, IOException, InvalidModificationException
LdpService
updateResource
in interface LdpService
connection
- repository connectionresource
- resource to addstream
- stream with the datatype
- resource typeorg.openrdf.repository.RepositoryException
IncompatibleResourceTypeException
org.openrdf.rio.RDFParseException
IOException
InvalidModificationException
public String updateResource(org.openrdf.repository.RepositoryConnection connection, org.openrdf.model.URI resource, InputStream stream, String type) throws org.openrdf.repository.RepositoryException, IncompatibleResourceTypeException, IOException, org.openrdf.rio.RDFParseException, InvalidModificationException
LdpService
updateResource
in interface LdpService
connection
- repository connectionresource
- resource to addstream
- stream with the datatype
- resource typeorg.openrdf.repository.RepositoryException
IncompatibleResourceTypeException
IOException
org.openrdf.rio.RDFParseException
InvalidModificationException
public String updateResource(org.openrdf.repository.RepositoryConnection connection, String resource, InputStream stream, String type, boolean overwrite) throws org.openrdf.repository.RepositoryException, IncompatibleResourceTypeException, org.openrdf.rio.RDFParseException, IOException, InvalidModificationException
LdpService
updateResource
in interface LdpService
connection
- repository connectionresource
- resource to addstream
- stream with the datatype
- resource typeoverwrite
- overwrite current resourceorg.openrdf.repository.RepositoryException
IncompatibleResourceTypeException
org.openrdf.rio.RDFParseException
IOException
InvalidModificationException
public String updateResource(org.openrdf.repository.RepositoryConnection connection, org.openrdf.model.URI resource, InputStream stream, String type, boolean overwrite) throws org.openrdf.repository.RepositoryException, IncompatibleResourceTypeException, org.openrdf.rio.RDFParseException, IOException, InvalidModificationException
LdpService
updateResource
in interface LdpService
connection
- repository connectionresource
- resource to addstream
- stream with the datatype
- resource typeoverwrite
- overwrite current resourceorg.openrdf.repository.RepositoryException
IncompatibleResourceTypeException
org.openrdf.rio.RDFParseException
IOException
InvalidModificationException
public javax.ws.rs.core.EntityTag generateETag(org.openrdf.repository.RepositoryConnection connection, String resource) throws org.openrdf.repository.RepositoryException
generateETag
in interface LdpService
org.openrdf.repository.RepositoryException
public javax.ws.rs.core.EntityTag generateETag(org.openrdf.repository.RepositoryConnection connection, org.openrdf.model.URI uri) throws org.openrdf.repository.RepositoryException
generateETag
in interface LdpService
org.openrdf.repository.RepositoryException
public Date getLastModified(org.openrdf.repository.RepositoryConnection connection, String resource) throws org.openrdf.repository.RepositoryException
getLastModified
in interface LdpService
org.openrdf.repository.RepositoryException
public Date getLastModified(org.openrdf.repository.RepositoryConnection connection, org.openrdf.model.URI uri) throws org.openrdf.repository.RepositoryException
getLastModified
in interface LdpService
org.openrdf.repository.RepositoryException
public void patchResource(org.openrdf.repository.RepositoryConnection connection, String resource, InputStream patchData, boolean strict) throws org.openrdf.repository.RepositoryException, org.apache.marmotta.platform.ldp.patch.parser.ParseException, InvalidModificationException, org.apache.marmotta.platform.ldp.patch.InvalidPatchDocumentException
patchResource
in interface LdpService
org.openrdf.repository.RepositoryException
org.apache.marmotta.platform.ldp.patch.parser.ParseException
InvalidModificationException
org.apache.marmotta.platform.ldp.patch.InvalidPatchDocumentException
public void patchResource(org.openrdf.repository.RepositoryConnection connection, org.openrdf.model.URI uri, InputStream patchData, boolean strict) throws org.openrdf.repository.RepositoryException, org.apache.marmotta.platform.ldp.patch.parser.ParseException, InvalidModificationException, org.apache.marmotta.platform.ldp.patch.InvalidPatchDocumentException
patchResource
in interface LdpService
org.openrdf.repository.RepositoryException
org.apache.marmotta.platform.ldp.patch.parser.ParseException
InvalidModificationException
org.apache.marmotta.platform.ldp.patch.InvalidPatchDocumentException
public boolean deleteResource(org.openrdf.repository.RepositoryConnection connection, String resource) throws org.openrdf.repository.RepositoryException
deleteResource
in interface LdpService
org.openrdf.repository.RepositoryException
public boolean deleteResource(org.openrdf.repository.RepositoryConnection connection, org.openrdf.model.URI resource) throws org.openrdf.repository.RepositoryException
deleteResource
in interface LdpService
org.openrdf.repository.RepositoryException
public LdpService.InteractionModel getInteractionModel(List<javax.ws.rs.core.Link> linkHeaders) throws InvalidInteractionModelException
getInteractionModel
in interface LdpService
InvalidInteractionModelException
public LdpService.InteractionModel getInteractionModel(org.openrdf.repository.RepositoryConnection connection, String resource) throws org.openrdf.repository.RepositoryException
getInteractionModel
in interface LdpService
org.openrdf.repository.RepositoryException
public LdpService.InteractionModel getInteractionModel(org.openrdf.repository.RepositoryConnection connection, org.openrdf.model.URI uri) throws org.openrdf.repository.RepositoryException
getInteractionModel
in interface LdpService
org.openrdf.repository.RepositoryException
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.