public class FormatController extends java.lang.Object implements InputParamController
Let controlling the format of all job result in a TAP service. The default values are provided by the service connection.
Note: By default, the format can be modified by anyone without any limitation.
Modifier and Type | Field and Description |
---|---|
protected boolean |
allowModification
Indicates whether the output limit of jobs can be modified.
|
protected ServiceConnection |
service
Connection to the service which knows the maximum and default value of this parameter.
|
Constructor and Description |
---|
FormatController(ServiceConnection service)
Build a controller for the Format parameter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowModification()
Tells whether the controlled parameter may be modified after initialization.
|
void |
allowModification(boolean allowModif)
Lets indicating whether the format parameter can be modified.
|
java.lang.Object |
check(java.lang.Object format)
Checks the value of the controlled parameter and builds a new object from this value.
|
protected java.lang.String |
getAllowedFormats()
Get a list of all allowed output formats (for each, the main MIME type
but also the short type representation are given).
|
java.lang.Object |
getDefault()
Returns the default value of the controlled parameter.
|
protected final ServiceConnection service
protected boolean allowModification
public FormatController(ServiceConnection service)
service
- Connection to the TAP service.public final boolean allowModification()
InputParamController
allowModification
in interface InputParamController
public final void allowModification(boolean allowModif)
allowModif
- true if the format can be modified, false otherwise.public java.lang.Object getDefault()
InputParamController
getDefault
in interface InputParamController
public java.lang.Object check(java.lang.Object format) throws UWSException
InputParamController
Checks the value of the controlled parameter and builds a new object from this value.
check
in interface InputParamController
format
- Parameter value to check.UWSException
- If the given value is strongly incorrect.protected final java.lang.String getAllowedFormats()