info.sswap.impl.http
Class HTTPAPIImpl.RRGResponse

java.lang.Object
  extended by info.sswap.impl.http.AbstractHTTPResponse
      extended by info.sswap.impl.http.HTTPAPIImpl.RRGResponse
All Implemented Interfaces:
HTTPProvider.RRGResponse, HTTPResponse
Enclosing class:
HTTPAPIImpl

public class HTTPAPIImpl.RRGResponse
extends AbstractHTTPResponse
implements HTTPProvider.RRGResponse

Exposes access to both a ready-to-use RRG on success or a network response object on failure.

Author:
Damian Gessler

Constructor Summary
HTTPAPIImpl.RRGResponse(RRG rrg, com.clarkparsia.utils.web.Response response)
          Constructor to set the RRG and network response data; not needed by most users.
HTTPAPIImpl.RRGResponse(RRG rrg, com.clarkparsia.utils.web.Response response, java.lang.Exception exception)
          Constructor to set the RRG and an exception; not needed by most users.
 
Method Summary
 RRG getRRG()
          Getter method to get the Resource Response Graph (RRG) from a successful conversion.
 
Methods inherited from class info.sswap.impl.http.AbstractHTTPResponse
close, getContent, getDocument, getErrorStream, getException, getHeaders, getHeaderValue, getHeaderValues, getMessage, getResponseCode, getSSWAPExceptionHeader, getSSWAPExceptionValues, hasErrorCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface info.sswap.api.http.HTTPResponse
close, getContent, getErrorStream, getException, getHeaders, getHeaderValue, getHeaderValues, getMessage, getResponseCode, getSSWAPExceptionHeader, getSSWAPExceptionValues, hasErrorCode
 

Constructor Detail

HTTPAPIImpl.RRGResponse

public HTTPAPIImpl.RRGResponse(RRG rrg,
                               com.clarkparsia.utils.web.Response response)
Constructor to set the RRG and network response data; not needed by most users.

The network connection is automatically closed on a successful RRG creation.

Parameters:
rrg - RRG to be returned to the user, or null
response - network response object with response status information

HTTPAPIImpl.RRGResponse

public HTTPAPIImpl.RRGResponse(RRG rrg,
                               com.clarkparsia.utils.web.Response response,
                               java.lang.Exception exception)
Constructor to set the RRG and an exception; not needed by most users.

Parameters:
rrg - RRG to be returned to the user, or null
response - network response object with response status information
exception - exception that prevented RRG creation from succeeding
Method Detail

getRRG

public RRG getRRG()
Description copied from interface: HTTPProvider.RRGResponse
Getter method to get the Resource Response Graph (RRG) from a successful conversion.

Specified by:
getRRG in interface HTTPProvider.RRGResponse
Returns:
successful RRG or null on failure.
See Also:
RRG


Copyright (c) 2011, iPlant Collaborative, University of Arizona, Cold Spring Harbor Laboratories, University of Texas at Austin.