Class AbstractNonRdfSourceOperation
- java.lang.Object
-
- org.fcrepo.kernel.impl.operations.AbstractResourceOperation
-
- org.fcrepo.kernel.impl.operations.AbstractNonRdfSourceOperation
-
- All Implemented Interfaces:
NonRdfSourceOperation
,ResourceOperation
- Direct Known Subclasses:
CreateNonRdfSourceOperation
,UpdateNonRdfSourceOperation
public abstract class AbstractNonRdfSourceOperation extends AbstractResourceOperation implements NonRdfSourceOperation
An abstract operation for interacting with a non-rdf source- Author:
- bbpennel
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractNonRdfSourceOperation(Transaction transaction, FedoraId rescId)
Basic constructor.protected
AbstractNonRdfSourceOperation(Transaction transaction, FedoraId rescId, InputStream content)
Constructor for internal binaries.protected
AbstractNonRdfSourceOperation(Transaction transaction, FedoraId rescId, URI externalContentURI, String externalHandling)
Constructor for external content.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InputStream
getContent()
Collection<URI>
getContentDigests()
long
getContentSize()
InputStream
getContentStream()
URI
getContentUri()
protected Collection<URI>
getDigests()
String
getExternalHandling()
protected String
getExternalHandlingType()
protected URI
getExternalHandlingURI()
String
getFilename()
Return the file name for the binary contentString
getMimeType()
protected void
setContent(InputStream content)
protected void
setContentSize(long contentSize)
protected void
setDigests(Collection<URI> digests)
protected void
setExternalHandlingType(String externalHandlingType)
protected void
setExternalHandlingURI(URI externalHandlingURI)
protected void
setFilename(String filename)
protected void
setMimeType(String mimeType)
-
Methods inherited from class org.fcrepo.kernel.impl.operations.AbstractResourceOperation
getResourceId, getTransaction, getUserPrincipal, setUserPrincipal
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.fcrepo.kernel.api.operations.ResourceOperation
getResourceId, getTransaction, getType, getUserPrincipal
-
-
-
-
Constructor Detail
-
AbstractNonRdfSourceOperation
protected AbstractNonRdfSourceOperation(Transaction transaction, FedoraId rescId, URI externalContentURI, String externalHandling)
Constructor for external content.- Parameters:
rescId
- the internal identifier.externalContentURI
- the URI of the external content.externalHandling
- the type of external content handling (REDIRECT, PROXY)
-
AbstractNonRdfSourceOperation
protected AbstractNonRdfSourceOperation(Transaction transaction, FedoraId rescId, InputStream content)
Constructor for internal binaries.- Parameters:
rescId
- the internal identifier.content
- the stream of the content.
-
AbstractNonRdfSourceOperation
protected AbstractNonRdfSourceOperation(Transaction transaction, FedoraId rescId)
Basic constructor.- Parameters:
rescId
- The internal Fedora ID.
-
-
Method Detail
-
getContentStream
public InputStream getContentStream()
- Specified by:
getContentStream
in interfaceNonRdfSourceOperation
- Returns:
- the content stream for a local binary
-
getExternalHandling
public String getExternalHandling()
- Specified by:
getExternalHandling
in interfaceNonRdfSourceOperation
- Returns:
- the handling method for external content in this resource
-
getContentUri
public URI getContentUri()
- Specified by:
getContentUri
in interfaceNonRdfSourceOperation
- Returns:
- the URI for external content in this resource
-
getMimeType
public String getMimeType()
- Specified by:
getMimeType
in interfaceNonRdfSourceOperation
- Returns:
- The MimeType of content associated with this resource.
-
getFilename
public String getFilename()
Description copied from interface:NonRdfSourceOperation
Return the file name for the binary content- Specified by:
getFilename
in interfaceNonRdfSourceOperation
- Returns:
- original file name for the binary content, or the object's id.
-
getContentDigests
public Collection<URI> getContentDigests()
- Specified by:
getContentDigests
in interfaceNonRdfSourceOperation
- Returns:
- the URIs of digests for the content in this resource
-
getContentSize
public long getContentSize()
- Specified by:
getContentSize
in interfaceNonRdfSourceOperation
- Returns:
- The size in bytes of content associated with this resource.
-
getContent
protected InputStream getContent()
- Returns:
- the content
-
setContent
protected void setContent(InputStream content)
- Parameters:
content
- the content to set
-
getExternalHandlingURI
protected URI getExternalHandlingURI()
- Returns:
- the externalHandlingURI
-
setExternalHandlingURI
protected void setExternalHandlingURI(URI externalHandlingURI)
- Parameters:
externalHandlingURI
- the externalHandlingURI to set
-
getExternalHandlingType
protected String getExternalHandlingType()
- Returns:
- the externalHandlingType
-
setExternalHandlingType
protected void setExternalHandlingType(String externalHandlingType)
- Parameters:
externalHandlingType
- the externalHandlingType to set
-
getDigests
protected Collection<URI> getDigests()
- Returns:
- the digests
-
setDigests
protected void setDigests(Collection<URI> digests)
- Parameters:
digests
- the digests to set
-
setMimeType
protected void setMimeType(String mimeType)
- Parameters:
mimeType
- the mimeType to set
-
setFilename
protected void setFilename(String filename)
- Parameters:
filename
- the filename to set
-
setContentSize
protected void setContentSize(long contentSize)
- Parameters:
contentSize
- the contentSize to set
-
-