edu.harvard.cfa.vo.tapclient.tap
Class Result

java.lang.Object
  extended by edu.harvard.cfa.vo.tapclient.tap.Result

public class Result
extends java.lang.Object

A reference to a result generated by an asynchronous query.

See Also:
AsyncJob

Constructor Summary
protected Result(java.lang.String id, java.lang.String type, java.lang.String href)
          Constructs a Result object.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getHref()
          Returns a String representation of the URI pointing to the result.
 java.lang.String getId()
          Returns the identifier for this result
 java.lang.String getType()
          Returns the type in the, XML XLink sense, of the value returned by getHref.
 int hashCode()
           
 void list(java.io.PrintStream output)
           
 java.io.InputStream openStream()
          Returns an InputStream with the result resource pointed to by getHref.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Result

protected Result(java.lang.String id,
                 java.lang.String type,
                 java.lang.String href)
Constructs a Result object.

Parameters:
id - of the result
type - of the href, in the xlink sense.
href - of the result
Method Detail

getId

public java.lang.String getId()
Returns the identifier for this result

Returns:
id of this parameter or null if not provided.

getType

public java.lang.String getType()
Returns the type in the, XML XLink sense, of the value returned by getHref.

Returns:
type of the result href link or null if not provided.

getHref

public java.lang.String getHref()
Returns a String representation of the URI pointing to the result.

Returns:
uri pointing the the result resource or null if not provided

openStream

public java.io.InputStream openStream()
                               throws HttpException,
                                      java.io.IOException
Returns an InputStream with the result resource pointed to by getHref.

Returns:
inputStream containing the TAP service result associated with this Result object.
Throws:
HttpException - if the service responses with an unexpected HTTP status.
java.io.IOException - if an error occurs creating the InputStream

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

list

public void list(java.io.PrintStream output)
          throws HttpException,
                 java.io.IOException
Throws:
HttpException
java.io.IOException