public class WorkflowBundle extends AbstractRevisioned implements WorkflowBean, Named, Root, Revisioned
A Workflow Bundle represents these resources as a whole, and have its own identifier.
Workflows are listed under getWorkflows()
, one of which SHOULD be
setMainWorkflow(Workflow)
.
Similarly, profiles are listed under getProfiles()
, one of which
SHOULD be setMainProfile(Profile)
.
Annotations are included under getAnnotations()
, and additional
resources inside getResources()
.
AbstractCloneable.Cloning, AbstractCloneable.CopyVisitor
Modifier and Type | Field and Description |
---|---|
static String |
APPLICATION_VND_TAVERNA_SCUFL2_WORKFLOW_BUNDLE |
static URI |
WORKFLOW_BUNDLE_ROOT |
Constructor and Description |
---|
WorkflowBundle() |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Visitor visitor)
Accepts a
Visitor to this WorkflowBean . |
protected void |
cloneInto(WorkflowBean clone,
AbstractCloneable.Cloning cloning) |
boolean |
equals(Object obj)
WorkflowBundles are only equal by instance identity.
|
static URI |
generateIdentifier() |
NamedSet<Annotation> |
getAnnotations() |
URI |
getGlobalBaseURI() |
protected URI |
getIdentifierRoot() |
Profile |
getMainProfile() |
Workflow |
getMainWorkflow() |
NamedSet<Profile> |
getProfiles() |
UCFPackage |
getResources() |
NamedSet<Workflow> |
getWorkflows() |
int |
hashCode() |
void |
setAnnotations(NamedSet<Annotation> annotations) |
void |
setGlobalBaseURI(URI globalBaseURI) |
void |
setMainProfile(Profile mainProfile) |
void |
setMainWorkflow(Workflow mainWorkflow) |
void |
setProfiles(Set<Profile> profiles) |
void |
setResources(UCFPackage resources) |
void |
setWorkflows(Set<Workflow> workflows) |
generateNewIdentifier, getCurrentRevision, getIdentifier, newRevision, newRevision, setCurrentRevision, setIdentifier
compareTo, getName, setName, toString
clone, cloneWorkflowBean
finalize, getClass, notify, notifyAll, wait, wait, wait
compareTo
getCurrentRevision, getIdentifier, newRevision, newRevision, setCurrentRevision, setIdentifier
clone
public static final String APPLICATION_VND_TAVERNA_SCUFL2_WORKFLOW_BUNDLE
public static final URI WORKFLOW_BUNDLE_ROOT
public static URI generateIdentifier()
public boolean accept(Visitor visitor)
WorkflowBean
Visitor
to this WorkflowBean
.accept
in interface WorkflowBean
visitor
- the Visitor
to accepttrue
if this WorkflowBeans
children should be visited.public Profile getMainProfile()
public Workflow getMainWorkflow()
public UCFPackage getResources()
public URI getGlobalBaseURI()
getGlobalBaseURI
in interface Root
public void setMainProfile(Profile mainProfile)
public void setMainWorkflow(Workflow mainWorkflow)
public void setResources(UCFPackage resources)
public void setGlobalBaseURI(URI globalBaseURI)
setGlobalBaseURI
in interface Root
public boolean equals(Object obj)
Thus, if you load or construct the same workflow bundle twice, say as
wb1
and wb2
, then
wb1.equals(wb2) == false
.
There are two reasons for this. Firstly, a workflow bundle is a complex
object, as it bundles not just the getWorkflows()
and
getProfiles()
, but also arbitrary resources in
getResources()
. Two workflow bundles can for most purposes be
assumed "equal" if they have the same identifier in
getGlobalBaseURI()
- they might however vary in which
annotations they carry.
The second is that applications might use WorkflowBundle
instances as keys in a Map
of open workflows, and want to
distinguish between two workflow bundles from two different (but possibly
identical) files; for instance a .t2flow and a .wfbundle.
Note that contained workflow beans such as Workflow
and
Activity
will likewise not be
AbstractNamed.equals(Object)
across workflow bundles, as a named
bean is considered equal only if its name matches and its parents are
(recursively) equal. You may however detach the children by setting their
parents to null
and check for equality in isolation.
equals
in class AbstractNamed
public int hashCode()
hashCode
in class AbstractNamed
public NamedSet<Annotation> getAnnotations()
public void setAnnotations(NamedSet<Annotation> annotations)
protected void cloneInto(WorkflowBean clone, AbstractCloneable.Cloning cloning)
cloneInto
in class AbstractNamed
protected URI getIdentifierRoot()
getIdentifierRoot
in class AbstractRevisioned
Copyright © 2013 myGrid. All rights reserved.