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:
  • Constructor Details

    • 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 content
      format - - 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 Details

    • 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 Instant getRetrievalTime()