Index: src/nongnu/cashews/owls/process/AtomicProcess.java =================================================================== RCS file: AtomicProcess.java diff -N AtomicProcess.java --- /dev/null Mon Mar 28 13:17:35 2005 +++ AtomicProcess.java Mon Mar 28 14:09:37 2005 @@ -0,0 +1,55 @@ +/* AtomicProcess.java -- Representation of an OWL-S atomic process. + Copyright (C) 2005 The University of Sheffield. + + This file is part of the CASheW-s editor. + + The CASheW-s editor is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + The CASheW-s editor is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with The CASheW-s editor; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. +*/ + +package nongnu.cashews.owls.process; + +/** + * An atomic process is the basic unit of a process implementation. + * Interacting with an atomic process involves a maximum of two messages; + * one containing the input parameters, and one containing the outputs. + * The internals of the process are a `black box'; the only description + * of the process is in terms of its external interface. An atomic + * process always has at least the two participants, the client + * and the server. To actually use the process, it must be related + * to a grounding. + * + * @author Andrew John Hughes (address@hidden) + * @see Input + * @see Output + * @see Participant#CLIENT + * @see Participant#SERVER + * @see nongnu.cashews.owls.service.ServiceGrounding + */ +public class AtomicProcess + extends Process +{ + + /** + * Default constructor, which constructs an AtomicProcess + * with the two initial participants, the client and the server. + */ + public AtomicProcess() + { + addParticipant(Participant.CLIENT); + addParticipant(Participant.SERVER); + } + +} Index: src/nongnu/cashews/owls/process/Input.java =================================================================== RCS file: /share/darwin/darwin4/cvs/java/src/nongnu/cashews/owls/process/Input.java,v retrieving revision 1.3 diff -u -3 -p -u -r1.3 Input.java --- src/nongnu/cashews/owls/process/Input.java 2005/03/24 23:29:26 1.3 +++ src/nongnu/cashews/owls/process/Input.java 2005/03/28 13:09:37 @@ -27,7 +27,8 @@ package nongnu.cashews.owls.process; * * @author Andrew John Hughes (address@hidden) */ -public class Input extends Parameter - +public class Input + extends Parameter { + } Index: src/nongnu/cashews/owls/process/Output.java =================================================================== RCS file: /share/darwin/darwin4/cvs/java/src/nongnu/cashews/owls/process/Output.java,v retrieving revision 1.3 diff -u -3 -p -u -r1.3 Output.java --- src/nongnu/cashews/owls/process/Output.java 2005/03/24 23:29:26 1.3 +++ src/nongnu/cashews/owls/process/Output.java 2005/03/28 13:09:37 @@ -26,7 +26,8 @@ package nongnu.cashews.owls.process; * * @author Andrew John Hughes (address@hidden) */ -public class Output extends Parameter +public class Output + extends Parameter { } Index: src/nongnu/cashews/owls/process/Participant.java =================================================================== RCS file: Participant.java diff -N Participant.java --- /dev/null Mon Mar 28 13:17:35 2005 +++ Participant.java Mon Mar 28 14:09:37 2005 @@ -0,0 +1,61 @@ +/* Participant.java -- Representation of a participant in the use of a process. + Copyright (C) 2005 The University of Sheffield. + + This file is part of the CASheW-s editor. + + The CASheW-s editor is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + The CASheW-s editor is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with The CASheW-s editor; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. +*/ + +package nongnu.cashews.owls.process; + +/** + * A Participant takes part in the use of a process. + * Usually, there are two participants: the client and the server. + * + * @author Andrew John Hughes (address@hidden) + */ +public class Participant +{ + + /** + * The identifier for this participant. + * + * @serial the participant's ID. + */ + private String id; + + /** + * A representation of the client as a participant in the process. + */ + public static final Participant CLIENT = new Participant("TheClient"); + + /** + * A representation of the server as a participant in the process. + */ + public static final Participant SERVER = new Participant("TheServer"); + + /** + * Constructs a Participant with the specified ID. + * + * @param id the id for this participant. + */ + public Participant(String id) + { + this.id = id; + } + + +} Index: src/nongnu/cashews/owls/process/Process.java =================================================================== RCS file: Process.java diff -N Process.java --- /dev/null Mon Mar 28 13:17:35 2005 +++ Process.java Mon Mar 28 14:09:37 2005 @@ -0,0 +1,119 @@ +/* Process.java -- Representation of an OWL-S process. + Copyright (C) 2005 The University of Sheffield. + + This file is part of the CASheW-s editor. + + The CASheW-s editor is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + The CASheW-s editor is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with The CASheW-s editor; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. +*/ + +package nongnu.cashews.owls.process; + +import java.util.ArrayList; +import java.util.List; + +import nongnu.cashews.owls.expression.Condition; +import nongnu.cashews.owls.service.ServiceModel; + +/** + * A Process is a generalisation of atomic and composite + * processes. It encapsulates the common process information, including + * the process name, parameters, preconditions, participants and results. + * + * @author Andrew John Hughes (address@hidden) + * @see Parameter + * @see Participant + * @see Result + * @see nongnu.cashews.owls.expression.Condition + */ +public abstract class Process + extends ServiceModel +{ + + /** + * The name of the process. These need not be unique. + * + * @serial the process name. + * FIXME: We type this as a String, for want of a defined type. + */ + private String name; + + /** + * The input parameters of this process. + * + * @serial the input parameters. + */ + private List inputs; + + /** + * The output parameters of this process. + * + * @serial the output parameters. + */ + private List outputs; + + /** + * The local parameters of this process. + * + * @serial the local parameters. + */ + private List locals; + + /** + * The results of this process. + * + * @serial the results. + */ + private List results; + + /** + * The participants in the use of the process. + * + * @serial the participants. + */ + private List participants; + + /** + * The preconditions of this process. + * + * @serial the preconditions. + */ + private List preconditions; + + /** + * Default constructor which initialises the internal storage. + */ + public Process() + { + inputs = new ArrayList(); + outputs = new ArrayList(); + locals = new ArrayList(); + results = new ArrayList(); + participants = new ArrayList(); + preconditions = new ArrayList(): + } + + /** + * Add a Participant to the list of participants + * associated with this process. + * + * @param participant the new participant. + */ + public void addParticipant(Participant participant) + { + participants.add(participant); + } + +} Index: src/nongnu/cashews/owls/service/ServiceGrounding.java =================================================================== RCS file: /share/darwin/darwin4/cvs/java/src/nongnu/cashews/owls/service/ServiceGrounding.java,v retrieving revision 1.1 diff -u -3 -p -u -r1.1 ServiceGrounding.java --- src/nongnu/cashews/owls/service/ServiceGrounding.java 2005/03/28 11:55:04 1.1 +++ src/nongnu/cashews/owls/service/ServiceGrounding.java 2005/03/28 13:09:37 @@ -29,7 +29,7 @@ package nongnu.cashews.owls.service; * @author Andrew John Hughes (address@hidden) * @see Service */ -public class ServiceGrounding +public abstract class ServiceGrounding { } Index: src/nongnu/cashews/owls/service/ServiceModel.java =================================================================== RCS file: /share/darwin/darwin4/cvs/java/src/nongnu/cashews/owls/service/ServiceModel.java,v retrieving revision 1.1 diff -u -3 -p -u -r1.1 ServiceModel.java --- src/nongnu/cashews/owls/service/ServiceModel.java 2005/03/28 11:55:04 1.1 +++ src/nongnu/cashews/owls/service/ServiceModel.java 2005/03/28 13:09:37 @@ -44,7 +44,7 @@ package nongnu.cashews.owls.service; * @author Andrew John Hughes (address@hidden) * @see Service */ -public class ServiceModel +public abstract class ServiceModel { } Index: src/nongnu/cashews/owls/service/ServiceProfile.java =================================================================== RCS file: /share/darwin/darwin4/cvs/java/src/nongnu/cashews/owls/service/ServiceProfile.java,v retrieving revision 1.1 diff -u -3 -p -u -r1.1 ServiceProfile.java --- src/nongnu/cashews/owls/service/ServiceProfile.java 2005/03/28 11:55:04 1.1 +++ src/nongnu/cashews/owls/service/ServiceProfile.java 2005/03/28 13:09:37 @@ -29,7 +29,7 @@ package nongnu.cashews.owls.service; * @author Andrew John Hughes (address@hidden) * @see Service */ -public class ServiceProfile +public abstract class ServiceProfile { }