public class RDFXMLSerializer.WorkflowSerialisationVisitor extends Object implements Visitor
Visitor.VisitorAdapter, Visitor.VisitorWithPath
Constructor and Description |
---|
WorkflowSerialisationVisitor(Workflow workflow) |
Modifier and Type | Method and Description |
---|---|
boolean |
visit(WorkflowBean node)
Called by
WorkflowBean.accept(Visitor) when the visited bean is a
leaf node. |
boolean |
visitEnter(WorkflowBean node)
Called by
WorkflowBean.accept(Visitor) when first visiting a bean
which potentially has children. |
boolean |
visitLeave(WorkflowBean node)
Called by
WorkflowBean.accept(Visitor) before leaving a bean
previously visited with Visitor.visitEnter(WorkflowBean) . |
public WorkflowSerialisationVisitor(Workflow workflow)
public boolean visit(WorkflowBean node)
Visitor
WorkflowBean.accept(Visitor)
when the visited bean is a
leaf node.
A leaf node is a bean that can't have children, like
InputWorkflowPort
, PortNode
or PropertyLiteral
.
visit
in interface Visitor
node
- the currently visited WorkflowBean
true
if the visits over the current beans' siblings
should continue, false
to immediately leave the
parent.Visitor.visitEnter(WorkflowBean)
public boolean visitEnter(WorkflowBean node)
Visitor
WorkflowBean.accept(Visitor)
when first visiting a bean
which potentially has children.
After visiting the children (which could be none),
WorkflowBean.accept(Visitor)
on the current bean will call
Visitor.visitLeave(WorkflowBean)
.
Note that a bean can have some children which are visited with
Visitor.visit(WorkflowBean)
and others which are visited with
Visitor.visitEnter(WorkflowBean)
(depending on if they themselves can
have children).
visitEnter
in interface Visitor
node
- the currently visited WorkflowBean
true
if the children of this bean should be visited.Visitor.visit(WorkflowBean)
,
Visitor.visitLeave(WorkflowBean)
public boolean visitLeave(WorkflowBean node)
Visitor
WorkflowBean.accept(Visitor)
before leaving a bean
previously visited with Visitor.visitEnter(WorkflowBean)
. This is called
after all of the bean's children have been recursively visited, even if
any of those aborted the visit by returning false
.visitLeave
in interface Visitor
node
- the currently visited WorkflowBean
false
if the visits over the current beans' siblings
should continue, false
to immediately leave the
parent.Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.