public class PropertyVisit extends AbstractCloneable implements Child<PropertyResource>, PropertyResource.PropertyVisit
Child
used by PropertyResource.accept(Visitor)
when visiting the map of PropertyResource.getProperties()
AbstractCloneable.Cloning, AbstractCloneable.CopyVisitor
Constructor and Description |
---|
PropertyVisit() |
PropertyVisit(PropertyResource propertyResource,
URI uri) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Visitor visitor)
Accepts a
Visitor to this WorkflowBean . |
PropertyVisit |
clone()
Create a deep clone of this bean.
|
protected void |
cloneInto(WorkflowBean clone,
AbstractCloneable.Cloning cloning) |
boolean |
equals(Object obj) |
PropertyResource |
getParent()
Returns the parent of this workflow bean, or
null if it is orphan. |
URI |
getPredicateUri() |
Set<PropertyObject> |
getPropertiesForPredicate() |
PropertyResource |
getPropertyResource() |
int |
hashCode() |
void |
setParent(PropertyResource parent)
Sets the parent of this workflow bean.
|
void |
setPredicateUri(URI predicateUri) |
String |
toString() |
cloneWorkflowBean
public PropertyVisit()
public PropertyVisit(PropertyResource propertyResource, URI uri)
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 PropertyVisit clone()
WorkflowBean
The cloned bean will have equivalent properties as the original bean. Any
Child
beans which parent match this bean will be cloned as well
(recursively), non-child beans will remain the same. If this bean is a
Child
, the returned clone will not have a parent set.
Note that children whose Child.getParent()
is null
might not be cloned, to avoid this, use
Scufl2Tools.setParents(uk.org.taverna.scufl2.api.container.WorkflowBundle)
before cloning.
clone
in interface WorkflowBean
clone
in class AbstractCloneable
protected void cloneInto(WorkflowBean clone, AbstractCloneable.Cloning cloning)
cloneInto
in class AbstractCloneable
public PropertyResource getParent()
Child
null
if it is orphan.getParent
in interface Child<PropertyResource>
null
if it is orphanpublic URI getPredicateUri()
getPredicateUri
in interface PropertyResource.PropertyVisit
public Set<PropertyObject> getPropertiesForPredicate()
getPropertiesForPredicate
in interface PropertyResource.PropertyVisit
public PropertyResource getPropertyResource()
public void setParent(PropertyResource parent)
Child
Setting the parent would normally also add the object to the relevant collection in the parent if it does not already exist there.
If the child has an existing, object-identity different parent, the child will first be removed from the parent collection if it exists there.
Note:If the child is Named
the parent collection will be a
NamedSet
. This implicit insertion would overwrite any conflicting sibling with the
same Named.getName()
- to avoid this, add the child to the parent collection by using
NamedSet.addWithUniqueName(Named)
before setting the parent.
setParent
in interface Child<PropertyResource>
parent
- the parent of this workflow beanpublic void setPredicateUri(URI predicateUri)
Copyright © 2013 myGrid. All rights reserved.