ControlConstruct.java revision 15
2ronwalf// The MIT License
2ronwalf//
2ronwalf// Copyright (c) 2004 Evren Sirin
2ronwalf//
2ronwalf// Permission is hereby granted, free of charge, to any person obtaining a copy
2ronwalf// of this software and associated documentation files (the "Software"), to
2ronwalf// deal in the Software without restriction, including without limitation the
2ronwalf// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
2ronwalf// sell copies of the Software, and to permit persons to whom the Software is
2ronwalf// furnished to do so, subject to the following conditions:
2ronwalf//
2ronwalf// The above copyright notice and this permission notice shall be included in
2ronwalf// all copies or substantial portions of the Software.
2ronwalf//
2ronwalf// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2ronwalf// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2ronwalf// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2ronwalf// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2ronwalf// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2ronwalf// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2ronwalf// IN THE SOFTWARE.
2ronwalf
2ronwalf/*
2ronwalf * Created on Dec 27, 2003
2ronwalf *
2ronwalf */
2ronwalfpackage org.mindswap.owls.process;
2ronwalf
2ronwalfimport java.util.List;
2ronwalf
2ronwalfimport org.mindswap.owl.OWLIndividual;
2ronwalf
2ronwalf/**
10daenzerorama * @author Evren Sirin
10daenzerorama *
10daenzerorama */
10daenzeroramapublic interface ControlConstruct extends OWLIndividual {
10daenzerorama /**
10daenzerorama * Returns a list of all the Process objects used (directly or indirectly) in this control
2ronwalf * construct. These include all the processes that are performed as a result of executing
10daenzerorama * this control construct.
10daenzerorama *
10daenzerorama * @param recursive If true all the processes inside a Perform will be recursively added
10daenzerorama * to the results
10daenzerorama * @return List of Process objects
10daenzerorama */
10daenzerorama public ProcessList getAllProcesses( boolean recursive );
10daenzerorama
2ronwalf /**
10daenzerorama * Equivalent to the function call {@link #getAllProcesses(false)}
10daenzerorama * @return
10daenzerorama */
10daenzerorama public ProcessList getAllProcesses();
10daenzerorama
10daenzerorama /**
10daenzerorama * Returns a list of all the Binding objects used (directly or indirectly) in this control
10daenzerorama * construct.
10daenzerorama *
10daenzerorama * @param recursive If true all the bindings inside a Perform will be recursively added
2ronwalf * to the results
* @return List of bindings objects
*/
public BindingList getAllBindings();
/**
* Returns the immediate sub-constructs of this ControlConstruct. Unlike getComponents()
* function this function do not look at the process:components property. The result value
* of this function is computed differently for each construct. for example, IfThenElse
* construct would return the a list of size two (if it has both a process:then and
* process:else value) or a list of size one (if there is no process:else value).
*
*/
public List getConstructs();
/**
* Returns the name of this construct which is equals to local name defined in OWL-S
* process ontology, i.e. Sequence, Choice, If-Then-Else, etc.
*
* @return
*/
public String getConstructName();
/**
* Returns the process to which this control construct belongs.
*
* @return the parent process of this control construct.
*/
public Process getParentProcess();
/**
* Removes the given CC, which is contained in this CC. Control flow is rerouted from
* predecessor to successor of the given CC. Data flow from and to the given CC
* is removed too.
*
* @param CC the ControlConstruct to remove
* @return true, if removal was succesful. false otherwise
* @see #getAllBindings() used for retrieving the bindings from and to the given CC
*/
public boolean removeConstruct(ControlConstruct CC);
}