Package org.dspace.app.sherpa.v2
Class SHERPAPublisherResponse
- java.lang.Object
-
- org.dspace.app.sherpa.v2.SHERPAPublisherResponse
-
public class SHERPAPublisherResponse extends Object
Model class for the SHERPAv2 API (JSON) response for a publisher search The structure and approached used is quite different to the simple v1 API used previously- Author:
- Kim Shepherd
- See Also:
SHERPAPublisher
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSHERPAPublisherResponse.SHERPAFormat
-
Constructor Summary
Constructors Constructor Description SHERPAPublisherResponse(InputStream input, SHERPAPublisherResponse.SHERPAFormat format)Parse SHERPA v2 API for a given formatSHERPAPublisherResponse(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 StringgetMessage()SHERPASystemMetadatagetMetadata()List<SHERPAPublisher>getPublishers()booleanisError()voidsetMessage(String message)
-
-
-
Constructor Detail
-
SHERPAPublisherResponse
public SHERPAPublisherResponse(InputStream input, SHERPAPublisherResponse.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
-
SHERPAPublisherResponse
public SHERPAPublisherResponse(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)
-
getMetadata
public SHERPASystemMetadata getMetadata()
-
getPublishers
public List<SHERPAPublisher> getPublishers()
-
-