Package org.dspace.app.sherpa.v2
Class SHERPAResponse
- java.lang.Object
-
- org.dspace.app.sherpa.v2.SHERPAResponse
-
- All Implemented Interfaces:
Serializable
public class SHERPAResponse extends Object implements Serializable
Model class for the SHERPAv2 API (JSON) response for a publication (journal) search The structure and approached used is quite different to the simple v1 API used previously The structure is based on journal data, which in turn contains data about publishers and policies- Author:
- Kim Shepherd
- See Also:
SHERPAJournal, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSHERPAResponse.SHERPAFormat
-
Constructor Summary
Constructors Constructor Description SHERPAResponse()Create an empty SHERPAResponse representationSHERPAResponse(InputStream input, SHERPAResponse.SHERPAFormat format)Parse SHERPA v2 API for a given formatSHERPAResponse(String message)Create new response object to be handled as an error
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<SHERPAJournal>getJournals()StringgetMessage()SHERPASystemMetadatagetMetadata()DategetRetrievalTime()booleanisError()voidsetMessage(String message)
-
-
-
Constructor Detail
-
SHERPAResponse
public SHERPAResponse(InputStream input, SHERPAResponse.SHERPAFormat format) throws IOException
Parse SHERPA v2 API for a given format- Parameters:
input- - input stream from the HTTP response contentformat- - requested format- Throws:
IOException
-
SHERPAResponse
public SHERPAResponse()
Create an empty SHERPAResponse representation
-
SHERPAResponse
public SHERPAResponse(String message)
Create new response object to be handled as an error- Parameters:
message- - the message to render in logs or error pages
-
-
Method Detail
-
isError
public boolean isError()
-
getMessage
public String getMessage()
-
setMessage
public void setMessage(String message)
-
getJournals
public List<SHERPAJournal> getJournals()
-
getMetadata
public SHERPASystemMetadata getMetadata()
-
getRetrievalTime
public Date getRetrievalTime()
-
-