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/**
2ronwalf * @author Evren Sirin
2ronwalf *
2ronwalf */
2ronwalfpublic interface ControlConstruct extends OWLIndividual {
2ronwalf /**
2ronwalf * 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
2ronwalf * this control construct.
2ronwalf *
2ronwalf * @param recursive If true all the processes inside a Perform will be recursively added
2ronwalf * to the results
2ronwalf * @return List of Process objects
2ronwalf */
2ronwalf public ProcessList getAllProcesses( boolean recursive );
2ronwalf
2ronwalf /**
2ronwalf * Equivalent to the function call {@link #getAllProcesses(false)}
2ronwalf * @return
2ronwalf */
2ronwalf 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
10daenzerorama * to the results
10daenzerorama * @return List of bindings objects
10daenzerorama */
10daenzerorama public BindingList getAllBindings();
2ronwalf
2ronwalf /**
2ronwalf * Returns the immediate sub-constructs of this ControlConstruct. Unlike getComponents()
2ronwalf * function this function do not look at the process:components property. The result value
2ronwalf * of this function is computed differently for each construct. for example, IfThenElse
2ronwalf * construct would return the a list of size two (if it has both a process:then and
2ronwalf * process:else value) or a list of size one (if there is no process:else value).
2ronwalf *
2ronwalf */
2ronwalf public List getConstructs();
2ronwalf
2ronwalf /**
2ronwalf * Returns the name of this construct which is equals to local name defined in OWL-S
2ronwalf * process ontology, i.e. Sequence, Choice, If-Then-Else, etc.
2ronwalf *
2ronwalf * @return
2ronwalf */
2ronwalf public String getConstructName();
3daenzerorama
3daenzerorama /**
3daenzerorama * Returns the process to which this control construct belongs.
3daenzerorama *
3daenzerorama * @return the parent process of this control construct.
3daenzerorama */
3daenzerorama public Process getParentProcess();
10daenzerorama
10daenzerorama
10daenzerorama /**
10daenzerorama * Removes the given CC, which is contained in this CC. Control flow is rerouted from
10daenzerorama * predecessor to successor of the given CC. Data flow from and to the given CC
10daenzerorama * is removed too.
10daenzerorama *
10daenzerorama * @param CC the ControlConstruct to remove
10daenzerorama * @return true, if removal was succesful. false otherwise
10daenzerorama * @see #getAllBindings() used for retrieving the bindings from and to the given CC
10daenzerorama */
15daenzerorama public boolean removeConstruct(ControlConstruct CC);
10daenzerorama
2ronwalf}