uws.job
Class SerializableUWSObject

java.lang.Object
  extended by uws.job.SerializableUWSObject
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AbstractJob, AbstractUWS, ErrorSummary, JobList, Result

public abstract class SerializableUWSObject
extends java.lang.Object
implements java.io.Serializable

This class defines the methods that an object of the UWS pattern must implement to be written in any format (by default, XML ; see XMLSerializer).

The serialize(UWSSerializer, String) method must be implemented. It is the most important method of this class because it returns a serialized representation of this UWS object.

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

Constructor Summary
SerializableUWSObject()
           
 
Method Summary
 void serialize(java.io.OutputStream output, UWSSerializer serializer)
          Serializes the whole object in the given output stream and thanks to the given serializer.
 void serialize(java.io.OutputStream output, UWSSerializer serializer, java.lang.String ownerId)
          Serializes the while object in the given output stream, considering the given owner ID and thanks to the given serializer.
 java.lang.String serialize(UWSSerializer serializer)
          Serializes the whole object thanks to the given serializer.
abstract  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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerializableUWSObject

public SerializableUWSObject()
Method Detail

serialize

public java.lang.String serialize(UWSSerializer serializer)
                           throws UWSException
Serializes the whole object thanks to the given serializer.

Parameters:
serializer - The serializer to use.
Returns:
The serialized representation of this object.
Throws:
UWSException - If there is an error during the serialization.
See Also:
serialize(UWSSerializer, String)

serialize

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

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.

serialize

public void serialize(java.io.OutputStream output,
                      UWSSerializer serializer)
               throws UWSException
Serializes the whole object in the given output stream and thanks to the given serializer.

Parameters:
output - The output stream in which this object must be serialized.
serializer - The serializer to use.
Throws:
UWSException - If there is an error during the serialization.
See Also:
serialize(OutputStream, UWSSerializer, String)

serialize

public void serialize(java.io.OutputStream output,
                      UWSSerializer serializer,
                      java.lang.String ownerId)
               throws UWSException
Serializes the while object in the given output stream, considering the given owner ID and thanks to the given serializer.

Parameters:
output - The ouput stream in which this object must be serialized.
serializer - The serializer to use.
ownerId - The ID of the current ID.
Throws:
UWSException - If the given ouput stream is null, or if there is an error during the serialization, or if there is an error while writing in the given stream.
See Also:
serialize(UWSSerializer, String)