Class ImmutableResource
java.lang.Object
com.janeirodigital.sai.core.resources.ReadableResource
com.janeirodigital.sai.core.resources.ImmutableResource
- Direct Known Subclasses:
AccessAuthorization
,AccessGrant
,DataAuthorization
,DataGrant
Represents a corresponding RDF Resource and provides create, read, and
delete capabilities. Immutable resources don't provide an update capability.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
ImmutableResource.Builder<T extends ReadableResource.Builder<T>>
Generic builder which is extended by Immutable resource builders. -
Field Summary
Fields inherited from class com.janeirodigital.sai.core.resources.ReadableResource
contentType, dataset, exists, httpClient, jsonLdContext, resource, saiSession, unprotected, uri
-
Constructor Summary
ConstructorsConstructorDescriptionImmutableResource
(ImmutableResource.Builder<?> builder) Construct an Immutable resource using the providedImmutableResource.Builder
. -
Method Summary
Methods inherited from class com.janeirodigital.sai.core.resources.ReadableResource
checkReadableResponse, read
-
Constructor Details
-
ImmutableResource
Construct an Immutable resource using the providedImmutableResource.Builder
.- Parameters:
builder
-ImmutableResource.Builder
or an instance of an inheriting subclass- Throws:
SaiException
-
-
Method Details
-
create
Create the corresponding resource over HTTP with the current contents ofdataset
. If-None-Match header is used to ensure another resource aturi
doesn't already exist.- Throws:
SaiException
-
delete
Deletes the corresponding resource over HTTP- Throws:
SaiException
-