Package com.inrupt.client
Class NonRDFSource
java.lang.Object
com.inrupt.client.NonRDFSource
- All Implemented Interfaces:
Resource
,AutoCloseable
- Direct Known Subclasses:
SolidNonRDFSource
A base class for non-RDF-bearing resources.
This class can be used as a basis for object mapping with the high-level client operations.
-
Constructor Summary
ModifierConstructorDescriptionprotected
NonRDFSource
(URI identifier, String contentType, InputStream entity) Create a new non-RDF-bearing resource.protected
NonRDFSource
(URI identifier, String contentType, InputStream entity, Headers headers) Create a new non-RDF-bearing resource. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
The content type of the resource.The resource entity.The resource headers.The resource identifier.
-
Constructor Details
-
NonRDFSource
Create a new non-RDF-bearing resource.Subclasses should have the same constructor signature to work with the provided object mapping mechanism.
- Parameters:
identifier
- the resource identifiercontentType
- the content type of the resourceentity
- the resource entity
-
NonRDFSource
Create a new non-RDF-bearing resource.Subclasses should have the same constructor signature to work with the provided object mapping mechanism.
- Parameters:
identifier
- the resource identifiercontentType
- the content type of the resourceentity
- the resource entityheaders
- header values associated with the resource, may benull
-
-
Method Details
-
getIdentifier
Description copied from interface:Resource
The resource identifier.- Specified by:
getIdentifier
in interfaceResource
- Returns:
- the identifier
-
getContentType
Description copied from interface:Resource
The content type of the resource.- Specified by:
getContentType
in interfaceResource
- Returns:
- the content type
-
getHeaders
Description copied from interface:Resource
The resource headers.- Specified by:
getHeaders
in interfaceResource
- Returns:
- the resource headers
-
getEntity
Description copied from interface:Resource
The resource entity.- Specified by:
getEntity
in interfaceResource
- Returns:
- the resource entity
- Throws:
IOException
- in the case of an error when generating the entity
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-