public final class Json4Uws
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static org.json.JSONObject |
getJobInfoJson(UWSJob job)
Gets the JSON representation of the jobInfo of the given job.
|
static org.json.JSONObject |
getJobParamsJson(UWSJob job)
Gets the JSON representation of the parameters of the given job.
|
static org.json.JSONObject |
getJobResultJson(Result r)
Gets the JSON representation of the the given result.
|
static org.json.JSONArray |
getJobResultsJson(UWSJob job)
Gets the JSON representation of the results of the given job.
|
static org.json.JSONObject |
getJson(ErrorSummary error)
Gets the JSON representation of the given error summary.
|
static org.json.JSONObject |
getJson(JobList jobsList,
JobOwner owner)
Gets the JSON representation of the given jobs list.
|
static org.json.JSONObject |
getJson(JobList jobsList,
JobOwner owner,
JobListRefiner listRefiner)
Gets the JSON representation of the given jobs list by filtering by owner
and some user-filters (e.g.
|
static org.json.JSONObject |
getJson(java.lang.String key,
long value)
Gets the JSON representation of the given pair key/value.
|
static org.json.JSONObject |
getJson(java.lang.String key,
java.lang.String value)
Gets the JSON representation of the given pair key/value.
|
static org.json.JSONObject |
getJson(UWS uws)
Gets the JSON representation of the given UWS.
|
static org.json.JSONObject |
getJson(UWSJob job)
Gets the JSON representation of the given job.
|
static org.json.JSONObject |
getJson(UWSJob job,
UWSUrl jobsListUrl,
boolean reference)
Gets the JSON representation of the given job.
|
public static final org.json.JSONObject getJson(UWS uws) throws org.json.JSONException
uws - The UWS to represent in JSON.JSONException - If there is an error while building the JSON object.public static final org.json.JSONObject getJson(JobList jobsList, JobOwner owner) throws org.json.JSONException
jobsList - The jobs list to represent in JSON.owner - The user who asks to serialize the given jobs list.
(MAY BE NULL)JSONException - If there is an error while building the JSON
object.getJson(JobList, JobOwner, JobListRefiner)public static final org.json.JSONObject getJson(JobList jobsList, JobOwner owner, JobListRefiner listRefiner) throws org.json.JSONException
jobsList - The jobs list to represent in JSON.owner - The user who asks to serialize the given jobs list.
(MAY BE NULL)listRefiner - Represent all the specified job filters to apply ;
only the job that pass through this filter should be
displayed. If NULL, all jobs are displayed.JSONException - If there is an error while building the JSON
object.public static final org.json.JSONObject getJson(UWSJob job) throws org.json.JSONException
job - The job to represent in JSON.JSONException - If there is an error while building the JSON object.public static final org.json.JSONObject getJson(UWSJob job, UWSUrl jobsListUrl, boolean reference) throws org.json.JSONException
job - The job to represent in JSON.jobsListUrl - The URL of its jobs list. (MAY BE NULL)reference - true if only a reference to the given job must be returned rather than its full description,
false otherwise.JSONException - If there is an error while building the JSON object.public static final org.json.JSONObject getJobInfoJson(UWSJob job) throws org.json.JSONException
Important note:
This function transforms the XML returned by
JobInfo.getXML(String) into a JSON object
(see XML.toJSONObject(String)).
job - The job whose the jobInfo must be represented
in JSON.JSONException - If there is an error while building the JSON
object.JobInfo.getXML(String),
XML.toJSONObject(String)public static final org.json.JSONObject getJobParamsJson(UWSJob job) throws org.json.JSONException
job - The job whose the parameters must be represented in JSON.JSONException - If there is an error while building the JSON object.public static final org.json.JSONArray getJobResultsJson(UWSJob job) throws org.json.JSONException
job - The job whose the results must be represented in JSON.JSONException - If there is an error while building the JSON array.public static final org.json.JSONObject getJobResultJson(Result r) throws org.json.JSONException
r - The result to represent in JSON.JSONException - If there is an error while building the JSON object.public static final org.json.JSONObject getJson(ErrorSummary error) throws org.json.JSONException
error - The error summary to represent in JSON.JSONException - If there is an error while building the JSON object.public static final org.json.JSONObject getJson(java.lang.String key,
long value)
throws org.json.JSONException
key - The value name.value - The value of type long corresponding to the given key/name.JSONException - If there is an error while building the JSON object.public static final org.json.JSONObject getJson(java.lang.String key,
java.lang.String value)
throws org.json.JSONException
key - The value name.value - The value of type String corresponding to the given key/name.JSONException - If there is an error while building the JSON object.