Package omero.cmd.graphs
Class ChildOptionI
- java.lang.Object
-
- Ice.ObjectImpl
-
- omero.cmd.graphs.ChildOption
-
- omero.cmd.graphs.ChildOptionI
-
- All Implemented Interfaces:
Ice.Object
,java.io.Serializable
,java.lang.Cloneable
public class ChildOptionI extends ChildOption
Child options adjust how child objects are treated according to their type and, if annotations, namespace, overriding the default graph traversal policy for orphans.- Since:
- 5.1.0
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class omero.cmd.graphs.ChildOption
__ids, excludeNs, excludeType, includeNs, includeType, serialVersionUID
-
-
Constructor Summary
Constructors Constructor Description ChildOptionI(ome.services.graphs.GraphPathBean graphPathBean, com.google.common.collect.ImmutableSet<java.lang.String> defaultExcludeNs)
Construct a new child option instance.ChildOptionI(ChildOptionI original)
Construct a new child option instance identical to that given.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.List<ChildOptionI>
castChildOptions(java.util.Collection<ChildOption> childOptions)
CastChildOption[]
toChildOptionI[]
.void
init()
Initialize this child option instance.java.lang.Boolean
isIncludeType(java.lang.Class<? extends ome.model.IObject> objectClass)
Test if this child option adjusts graph traversal policy for the given child object class.boolean
isTargetNamespace(java.lang.String namespace)
Test if this child option adjusts graph traversal policy for child objects that are annotations in the given namespace.-
Methods inherited from class omero.cmd.graphs.ChildOption
__readImpl, __writeImpl, clone, ice_factory, ice_id, ice_id, ice_ids, ice_ids, ice_isA, ice_isA, ice_staticId
-
-
-
-
Constructor Detail
-
ChildOptionI
public ChildOptionI(ome.services.graphs.GraphPathBean graphPathBean, com.google.common.collect.ImmutableSet<java.lang.String> defaultExcludeNs)
Construct a new child option instance.- Parameters:
graphPathBean
- the graph path beandefaultExcludeNs
- annotation namespaces to exclude by default
-
ChildOptionI
public ChildOptionI(ChildOptionI original)
Construct a new child option instance identical to that given. If the original was initialized, this one is too.- Parameters:
original
- a child option instance
-
-
Method Detail
-
init
public void init()
Initialize this child option instance. An option takes effect according to theChildOption
field values set when this method was last called.
-
isIncludeType
public java.lang.Boolean isIncludeType(java.lang.Class<? extends ome.model.IObject> objectClass)
Test if this child option adjusts graph traversal policy for the given child object class. Requiresinit()
to have been called previously.- Parameters:
objectClass
- a child object class- Returns:
true
if such children should be included in the operation,false
if such children should not be included in the operation, ornull
if this child option does not affect the treatment of such children
-
isTargetNamespace
public boolean isTargetNamespace(java.lang.String namespace)
Test if this child option adjusts graph traversal policy for child objects that are annotations in the given namespace. Requiresinit()
to have been called previously.- Parameters:
namespace
- an annotation namespace- Returns:
- if child objects that are annotations in this namespace are affected by this child option
-
castChildOptions
public static java.util.List<ChildOptionI> castChildOptions(java.util.Collection<ChildOption> childOptions)
CastChildOption[]
toChildOptionI[]
.- Parameters:
childOptions
- an array ofChildOption
which may all be casted toChildOptionI
, may benull
- Returns:
- an array of
ChildOptionI
, may benull
-
-