public class Ingest extends FedoraRequest<Ingest>
Constructor and Description |
---|
Ingest()
Constructor that will use a server-generated pid.
|
Ingest(String pid) |
Modifier and Type | Method and Description |
---|---|
Ingest |
content(File content)
The file to be ingested as a new object.
|
Ingest |
content(InputStream content)
The InputStream to be ingested as a new object.
|
Ingest |
content(String content)
The XML to be ingested as a new object.
|
Ingest |
encoding(String encoding)
The encoding of the XML to be ingested.
|
IngestResponse |
execute()
Executes this request against the
FedoraRequest.DEFAULT_CLIENT |
IngestResponse |
execute(FedoraClient fedora)
Execute this request using the supplied FedoraClient instance.
|
Ingest |
format(String format)
The XML format of the object to be ingested.
|
Ingest |
ignoreMime(boolean ignoreMime)
Indicates that the request should not be checked to ensure that the
content is XML prior to attempting an ingest.
|
Ingest |
label(String label)
The label of the new object
|
Ingest |
logMessage(String logMessage)
A message describing the activity being performed, which will be
recorded in the Fedora server log.
|
Ingest |
namespace(String namespace)
The namespace to be used to create a PID for a new empty object;
if object XML is included with the request, the namespace parameter is
ignored.
|
Ingest |
ownerId(String ownerId)
The id of the user to be listed at the object owner.
|
addHeader, addQueryParam, getFirstQueryParam, getHeaders, getQueryParam, getQueryParams, isDefaultClientSet, removeHeader, resource, resource, resource, resource, setDefaultClient, setHeaders, xParam
public Ingest(String pid)
pid
- the identified to assign or null to use a server-assigned pidpublic Ingest()
public Ingest label(String label)
label
- the object labelpublic Ingest format(String format)
The XML format of the object to be ingested.
One of:
format
- the XML format of the object to be ingested.public Ingest encoding(String encoding)
encoding
- public Ingest namespace(String namespace)
namespace
- the namespace of the PID to createpublic Ingest ownerId(String ownerId)
ownerId
- public Ingest logMessage(String logMessage)
A message describing the activity being performed, which will be recorded in the Fedora server log.
logMessage
- the log messagepublic Ingest ignoreMime(boolean ignoreMime)
Indicates that the request should not be checked to ensure that the content is XML prior to attempting an ingest.
This is provided to allow for client applications which do not indicate the correct Content-Type when submitting a request.
If not provided, defaults to false.
ignoreMime
- public Ingest content(InputStream content)
content
- public Ingest content(File content)
content
- public Ingest content(String content)
content
- public IngestResponse execute() throws FedoraClientException
FedoraRequest
Executes this request against the FedoraRequest.DEFAULT_CLIENT
execute
in class FedoraRequest<Ingest>
FedoraClientException
- if FedoraRequest.DEFAULT_CLIENT
is null
public IngestResponse execute(FedoraClient fedora) throws FedoraClientException
FedoraRequest
Execute this request using the supplied FedoraClient instance.
execute
in class FedoraRequest<Ingest>
fedora
- an instance of FedoraClientFedoraClientException
- if the HTTP status code of the response is
>= 400.Copyright © 2010-2013 MediaShelf. All Rights Reserved.