public class Param
extends Ice.ObjectImpl
# 1 a = omero.grid.Params() a.optional = True a.prototype = omero.rtypes.rstring("") a.description = "An optional string which will be ignored by the script" omero.scripts.client(inputs = {"a":a})
# 2 a = omero.scripts.String("a", optional=True, description= * "An optional string which will be ignored by the script") omero.scripts.client(a)For advanced setters not available on the Type classes (like omero.script.String) use the getter type.param() and then set values directly.
a = omero.scripts.String("a") a.param().values = \["hi", "bye"]
Modifier and Type | Field and Description |
---|---|
static java.lang.String[] |
__ids |
java.lang.String |
description
Usage documentation of this param for script users.
|
java.lang.String |
grouping
Defines the grouping strategy for this
Param . |
RType |
max
Maximum value which an input may contain.
|
RType |
min
Minimum value which an input may contain.
|
java.util.List<java.lang.String> |
namespaces
Defines machine readable interpretations for this parameter.
|
boolean |
optional
Whether or not a script will require this value to be present
in the input or output.
|
RType |
prototype
RType which represents what the input or output
value should look like. |
static long |
serialVersionUID |
boolean |
useDefault
Whether or not the prototype should be used as a default.
|
RList |
values
An enumeration of acceptable values which can be used
for this parameter.
|
Constructor and Description |
---|
Param() |
Param(java.lang.String description,
boolean optional,
boolean useDefault,
RType prototype,
RType min,
RType max,
RList values,
java.lang.String grouping,
java.util.List<java.lang.String> namespaces) |
Modifier and Type | Method and Description |
---|---|
protected void |
__readImpl(IceInternal.BasicStream __is) |
protected void |
__writeImpl(IceInternal.BasicStream __os) |
Param |
clone() |
static Ice.ObjectFactory |
ice_factory() |
java.lang.String |
ice_id() |
java.lang.String |
ice_id(Ice.Current __current) |
java.lang.String[] |
ice_ids() |
java.lang.String[] |
ice_ids(Ice.Current __current) |
boolean |
ice_isA(java.lang.String s) |
boolean |
ice_isA(java.lang.String s,
Ice.Current __current) |
static java.lang.String |
ice_staticId() |
public static final java.lang.String[] __ids
public java.lang.String description
public boolean optional
ValidationException
will be
thrown on processJob
. A missing output param will be
marked after execution.public boolean useDefault
param = ...; inputs = ...; if name in inputs: value = inputs\[name] elif param.inputs\[name].useDefault: value = param.inputs\[name].prototype
public RType prototype
RType
which represents what the input or output
value should look like. If this is a collection type (i.e.
RCollection
or RMap
or their
subclasses), then the first contents of the collection will be
used (recursively).
param.prototype = rlist(rlist(rstring)))requires that a list of list of strings be passed.
public RType min
param.prototype = rlong(0) param.min = rlong(-5)but
param.prototype = rlist(rlong(0)) param.min = rlong(-5)
public RType max
param.prototype = rlong(0) param.max = rlong(5)but
param.prototype = rlist(rlong(0)) param.max = rlong(5)
public RList values
min
and max
are set,
this value will be ignored. If prototype
is an
RCollection
or RMap
instance, then
the values in this RList
will be of the member
types of the collection or map, and not a collection or map
instance.public java.lang.String grouping
Param
.
A set of Param
objects in a single JobParams
can
use dot notation to specify that they belong together,
and in which order they should be presented to the user.
inputs = {"a" : Param(..., grouping = "1.1"), "b" : Param(..., grouping = "1.2"), "c" : Param(..., grouping = "2.2"), "d" : Param(..., grouping = "2.1")}defines two groups of parameters which might be display to the user so:
Group 1: Group 2: +-----------------------+ +-----------------------+ | a: | | d: | +-----------------------+ +-----------------------+ | b: | | c: | +-----------------------+ +-----------------------+
Further dots (e.g. "1.2.3.5") can be used to specify deeper trees of parameters.
By most clients, Params missing grouping values (e.g. "") will be ordered after params with grouping values.
A group which has a boolean as the top-level object can be thought of as a checkbox which turns on or off all of the other group members. For example,
inputs = {"Image_Ids" : Param(prototype=rlist(), grouping = "1"), "Scale_Bar" : Param(prototype=rbool(), grouping = "2"), "Color" : Param(prototype=rinternal(Color()), grouping = "2.1"), "Size" : Param(prototype=rlong(), grouping = "2.2")}
might be displayed as:
Scale Bar: \[ on/off ] ====================== Color: \[rgb] Size: \[ 10]
public java.util.List<java.lang.String> namespaces
Where the description field should provide information for users, the assigned namespaces can define how clients may interpret the param.
omero.constants.namespaces.NSDOWNLOAD
, for example,
indicates that users may want to download the resulting
file. The prototype
of the Param
should be one
of: OriginalFile
,
FileAnnotation
,
or an annotation link (like
ImageAnnotationLink
)
which points to a file annotation.
public static final long serialVersionUID
public static Ice.ObjectFactory ice_factory()
public boolean ice_isA(java.lang.String s)
ice_isA
in interface Ice.Object
ice_isA
in class Ice.ObjectImpl
public boolean ice_isA(java.lang.String s, Ice.Current __current)
ice_isA
in interface Ice.Object
ice_isA
in class Ice.ObjectImpl
public java.lang.String[] ice_ids()
ice_ids
in interface Ice.Object
ice_ids
in class Ice.ObjectImpl
public java.lang.String[] ice_ids(Ice.Current __current)
ice_ids
in interface Ice.Object
ice_ids
in class Ice.ObjectImpl
public java.lang.String ice_id()
ice_id
in interface Ice.Object
ice_id
in class Ice.ObjectImpl
public java.lang.String ice_id(Ice.Current __current)
ice_id
in interface Ice.Object
ice_id
in class Ice.ObjectImpl
public static java.lang.String ice_staticId()
protected void __writeImpl(IceInternal.BasicStream __os)
__writeImpl
in class Ice.ObjectImpl
protected void __readImpl(IceInternal.BasicStream __is)
__readImpl
in class Ice.ObjectImpl
public Param clone()
clone
in interface Ice.Object
clone
in class Ice.ObjectImpl