Package org.dspace.identifier.ezid
Class EZIDResponse
- java.lang.Object
-
- org.dspace.identifier.ezid.EZIDResponse
-
public class EZIDResponse extends Object
Decoded response data evoked by a request made to EZID.
-
-
Constructor Summary
Constructors Constructor Description EZIDResponse(org.apache.http.HttpResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringget(String key)Look up the value of a given response datum.StringgetEZIDStatus()Get the EZID request status.StringgetEZIDStatusValue()Value associated with the EZID status (identifier, error text, etc.).StringgetHttpReasonPhrase()intgetHttpStatusCode()List<String>getKeys()Expose the available keys.booleanisSuccess()Did the EZID request succeed?
-
-
-
Constructor Detail
-
EZIDResponse
public EZIDResponse(org.apache.http.HttpResponse response) throws IdentifierException- Throws:
IdentifierException
-
-
Method Detail
-
isSuccess
public boolean isSuccess()
Did the EZID request succeed?- Returns:
- returned status was success.
-
getEZIDStatus
public String getEZIDStatus()
Get the EZID request status.- Returns:
- should be "success" or "error".
-
getEZIDStatusValue
public String getEZIDStatusValue()
Value associated with the EZID status (identifier, error text, etc.).- Returns:
- EZID status value
-
getKeys
public List<String> getKeys()
Expose the available keys.- Returns:
- all keys found in the response.
-
get
public String get(String key)
Look up the value of a given response datum.- Parameters:
key- the datum to look up.- Returns:
- the value of
key, or null ifkeyis undefined.
-
getHttpStatusCode
public int getHttpStatusCode()
- Returns:
- status of the HTTP request.
-
getHttpReasonPhrase
public String getHttpReasonPhrase()
- Returns:
- reason for status of the HTTP request.
-
-