uws.job
Class Result

java.lang.Object
  extended by uws.job.SerializableUWSObject
      extended by uws.job.Result
All Implemented Interfaces:
java.io.Serializable

public class Result
extends SerializableUWSObject

This class gives a short description (mainly an ID and a URL) of a job result.

Version:
01/2011
Author:
Grégory Mantelet (CDS)
See Also:
Serialized Form

Field Summary
protected  java.lang.String href
          [Optional] The readable URL which points toward the result file.
protected  java.lang.String id
          [Required ; Default="result"] Name or ID of this result.
protected  java.lang.String type
          [Optional] The type of result.
 
Constructor Summary
Result(java.lang.String name)
          Builds a result with its ID/name.
Result(java.lang.String name, java.lang.String resultUrl)
          Builds a result with an ID/name and the URL toward the file which contains the results.
Result(java.lang.String name, java.lang.String resultType, java.lang.String resultUrl)
          Builds a result with an ID/name, a result type and the URL toward the file which contains the results.
Result(java.lang.String name, java.lang.String resultType, java.net.URL resultUrl)
          Deprecated. Replaced by Result(String, String, String).
Result(java.lang.String name, java.net.URL resultUrl)
          Deprecated. Replaced by Result(String, String).
Result(java.net.URL resultUrl)
          Builds a result with the URL toward the file which contains the results.
 
Method Summary
 java.lang.String getHref()
          Gets the URL of the result file.
 java.lang.String getId()
          Gets the id/name of this result.
 java.lang.String getType()
          Gets the type of this result.
 java.lang.String serialize(UWSSerializer serializer, java.lang.String ownerId)
          Serializes the whole object considering the given owner ID (supposed to be the ID of the current user) and thanks to the given serializer.
 java.lang.String toString()
           
 
Methods inherited from class uws.job.SerializableUWSObject
serialize, serialize, serialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

id

protected java.lang.String id
[Required ; Default="result"] Name or ID of this result.


href

protected java.lang.String href
[Optional] The readable URL which points toward the result file.


type

protected java.lang.String type
[Optional] The type of result.

Constructor Detail

Result

public Result(java.lang.String name)
Builds a result with its ID/name.

Parameters:
name - Name or ID of the result.

Result

public Result(java.net.URL resultUrl)
Builds a result with the URL toward the file which contains the results.

Parameters:
resultUrl - Result file URL.

Result

public Result(java.lang.String name,
              java.lang.String resultUrl)
Builds a result with an ID/name and the URL toward the file which contains the results.

Parameters:
name - Name or ID of the result.
resultUrl - Result file URL.
See Also:
Result(String)

Result

public Result(java.lang.String name,
              java.lang.String resultType,
              java.lang.String resultUrl)
Builds a result with an ID/name, a result type and the URL toward the file which contains the results.

Parameters:
name - Name or ID or the result.
resultType - Type of result.
resultUrl - Result file URL.
See Also:
Result(String, String)

Result

@Deprecated
public Result(java.lang.String name,
                         java.net.URL resultUrl)
Deprecated. Replaced by Result(String, String).

Builds a result with an ID/name and the URL toward the file which contains the results.

Parameters:
name - Name or ID of the result.
resultUrl - Result file URL.
See Also:
Result(String, String)

Result

@Deprecated
public Result(java.lang.String name,
                         java.lang.String resultType,
                         java.net.URL resultUrl)
Deprecated. Replaced by Result(String, String, String).

Builds a result with an ID/name, a result type and the URL toward the file which contains the results.

Parameters:
name - Name or ID or the result.
resultType - Type of result.
resultUrl - Result file URL.
See Also:
Result(String, String, String)
Method Detail

getId

public final java.lang.String getId()
Gets the id/name of this result.

Returns:
The result id or name.

getHref

public final java.lang.String getHref()
Gets the URL of the result file.

Returns:
The result file URL.

getType

public final java.lang.String getType()
Gets the type of this result.

Returns:
The result type.

serialize

public java.lang.String serialize(UWSSerializer serializer,
                                  java.lang.String ownerId)
                           throws UWSException
Description copied from class: SerializableUWSObject
Serializes the whole object considering the given owner ID (supposed to be the ID of the current user) and thanks to the given serializer.

Specified by:
serialize in class SerializableUWSObject
Parameters:
serializer - The serializer to use.
ownerId - The ID of the current user.
Returns:
The serialized representation of this object.
Throws:
UWSException - If there is an error during the serialization.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object