org.fcrepo.server.rest
Class FedoraObjectResource

java.lang.Object
  extended by org.fcrepo.server.rest.BaseRestResource
      extended by org.fcrepo.server.rest.FedoraObjectResource

public class FedoraObjectResource
extends BaseRestResource

Implement /objects/pid/* REST API

Version:
$Id$
Author:
cuong.tran@yourmediashelf.com

Field Summary
 
Fields inherited from class org.fcrepo.server.rest.BaseRestResource
apiAService, apiMService, datastreamFilenameHelper, fedoraServer, fedoraServerHost, FORM, headers, HTML, mapper, servletRequest, TEXT_HTML, TEXT_XML, uriInfo, XML, ZIP
 
Constructor Summary
FedoraObjectResource()
           
 
Method Summary
 javax.ws.rs.core.Response createObject(javax.ws.rs.core.HttpHeaders headers, String pid, String label, String logMessage, String format, String encoding, String namespace, String ownerID, String state, boolean ignoreMime)
          Create/Update a new digital object.
 javax.ws.rs.core.Response deleteObject(String pid, String logMessage)
          Permanently removes an object from the repository.
 javax.ws.rs.core.Response doObjectValidation(String pid, String dateTime)
           
 javax.ws.rs.core.Response getObjectExport(String pid, String format, String exportContext, String encoding)
          Exports the entire digital object in the specified XML format ("info:fedora/fedora-system:FOXML-1.1" or "info:fedora/fedora-system:METSFedoraExt-1.1"), and encoded appropriately for the specified export context ("public", "migrate", or "archive").
 javax.ws.rs.core.Response getObjectHistory(String pid, String format)
          Gets a list of timestamps indicating when components changed in an object.
 javax.ws.rs.core.Response getObjectProfile(String pid, String dateTime, String format)
          Gets a profile of the object which includes key metadata fields and URLs for the object Dissemination Index and the object Item Index.
 javax.ws.rs.core.Response getObjectXML(String pid)
          Gets a profile of the object which includes key metadata fields and URLs for the object Dissemination Index and the object Item Index.
 javax.ws.rs.core.Response updateObject(String pid, String label, String logMessage, String ownerID, String state, DateTimeParam lastModifiedDate)
          Update (modify) digital object.
 
Methods inherited from class org.fcrepo.server.rest.BaseRestResource
buildResponse, getContext, getSerializer, handleException, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FedoraObjectResource

public FedoraObjectResource()
Method Detail

doObjectValidation

public javax.ws.rs.core.Response doObjectValidation(String pid,
                                                    String dateTime)

getObjectExport

public javax.ws.rs.core.Response getObjectExport(String pid,
                                                 String format,
                                                 String exportContext,
                                                 String encoding)
Exports the entire digital object in the specified XML format ("info:fedora/fedora-system:FOXML-1.1" or "info:fedora/fedora-system:METSFedoraExt-1.1"), and encoded appropriately for the specified export context ("public", "migrate", or "archive").

GET /objects/{pid}/export ? format context encoding


getObjectHistory

public javax.ws.rs.core.Response getObjectHistory(String pid,
                                                  String format)
Gets a list of timestamps indicating when components changed in an object. This is a set of timestamps indicating when a datastream or disseminator was created or modified in the object. These timestamps can be used to request a timestamped dissemination request to view the object as it appeared at a specific point in time.

GET /objects/{pid}/versions ? format


getObjectXML

public javax.ws.rs.core.Response getObjectXML(String pid)
Gets a profile of the object which includes key metadata fields and URLs for the object Dissemination Index and the object Item Index. Can be thought of as a default view of the object.

GET /objects/{pid}/objectXML


getObjectProfile

public javax.ws.rs.core.Response getObjectProfile(String pid,
                                                  String dateTime,
                                                  String format)
Gets a profile of the object which includes key metadata fields and URLs for the object Dissemination Index and the object Item Index. Can be thought of as a default view of the object.

GET /objects/{pid} ? format asOfDateTime


deleteObject

public javax.ws.rs.core.Response deleteObject(String pid,
                                              String logMessage)
Permanently removes an object from the repository.

DELETE /objects/{pid} ? logMessage


createObject

public javax.ws.rs.core.Response createObject(@Context
                                              javax.ws.rs.core.HttpHeaders headers,
                                              String pid,
                                              String label,
                                              String logMessage,
                                              String format,
                                              String encoding,
                                              String namespace,
                                              String ownerID,
                                              String state,
                                              boolean ignoreMime)
Create/Update a new digital object. If no xml given in the body, will create an empty object.

POST /objects/{pid} ? label logMessage format encoding namespace ownerId state


updateObject

public javax.ws.rs.core.Response updateObject(String pid,
                                              String label,
                                              String logMessage,
                                              String ownerID,
                                              String state,
                                              DateTimeParam lastModifiedDate)
Update (modify) digital object.

PUT /objects/{pid} ? label logMessage ownerId state lastModifiedDate

Parameters:
pid - the persistent identifier
label -
logMessage -
ownerID -
state -
lastModifiedDate - Optional XSD dateTime to guard against concurrent modification. If provided (i.e. not null), the request will fail with an HTTP 409 Conflict if lastModifiedDate is earlier than the object's lastModifiedDate.
Returns:
The timestamp for this modification (as an XSD dateTime string)
See Also:
org.fcrepo.server.management.Management#modifyObject(org.fcrepo.server.Context, String, String, String, String, String)


Copyright © 2011 DuraSpace. All Rights Reserved.