Index: lib/.cvsignore =================================================================== RCS file: /cvsroot/cashew-s-editor/cashews/lib/.cvsignore,v retrieving revision 1.3 diff -u -3 -p -u -r1.3 .cvsignore --- lib/.cvsignore 18 Apr 2005 00:54:30 -0000 1.3 +++ lib/.cvsignore 4 May 2005 07:16:33 -0000 @@ -4,6 +4,7 @@ nongnu classes eclipse.jar owls.jar +cashews.jar rdf.jar commons.jar xml.jar Index: lib/Makefile.am =================================================================== RCS file: /cvsroot/cashew-s-editor/cashews/lib/Makefile.am,v retrieving revision 1.5 diff -u -3 -p -u -r1.5 Makefile.am --- lib/Makefile.am 9 Apr 2005 22:11:10 -0000 1.5 +++ lib/Makefile.am 4 May 2005 07:16:33 -0000 @@ -52,13 +52,13 @@ JAVAH = $(USER_JAVAH) -jni -classpath .: if INSTALL_GLIBJ_ZIP if FOUND_ECLIPSE -pkgdata_DATA = commons.jar xml.jar rdf.jar owls.jar eclipse.jar +pkgdata_DATA = commons.jar xml.jar rdf.jar owls.jar cashews.jar eclipse.jar install-data-local: genclasses compile-classes eclipse.jar mkdir $(INSTALLDIR) cp eclipse.jar $(INSTALLDIR) cp $(top_srcdir)/resource/plugin.xml $(INSTALLDIR) else -pkgdata_DATA = commons.jar xml.jar rdf.jar owls.jar +pkgdata_DATA = commons.jar xml.jar rdf.jar cashews.jar owls.jar endif endif # INSTALL_GLIBJ_ZIP @@ -103,6 +103,12 @@ if FOUND_GCJ $(GCJ) -shared -fjni -findirect-dispatch -o owls.jar.so owls.jar endif +cashews.jar: classes compile-classes # resources + if test "$(JAR)" != ""; then rm cashews.jar; $(JAR) cf cashews.jar `find nongnu -path '*language*' -name '*class'` > /dev/null; fi +if FOUND_GCJ +$(GCJ) -shared -fjni -findirect-dispatch -o cashews.jar.so cashews.jar +endif + if FOUND_ECLIPSE eclipse.jar: classes compile-classes # resources Index: src/nongnu/cashews/language/expression/Expression.java =================================================================== RCS file: src/nongnu/cashews/language/expression/Expression.java diff -N src/nongnu/cashews/language/expression/Expression.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/language/expression/Expression.java 4 May 2005 07:16:33 -0000 @@ -0,0 +1,32 @@ +/* Expression.java -- An arbitrary expression used for conditions and funcs. + 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.language.expression; + +/** + * An arbitrary Expression for use where conditions or functions + * are required. + * + * @author Andrew John Hughes (address@hidden) + */ +public interface Expression +{ +} Index: src/nongnu/cashews/language/grounding/Grounding.java =================================================================== RCS file: src/nongnu/cashews/language/grounding/Grounding.java diff -N src/nongnu/cashews/language/grounding/Grounding.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/language/grounding/Grounding.java 4 May 2005 07:16:33 -0000 @@ -0,0 +1,32 @@ +/* Grounding.java -- The association between an abstract process and a WS. + 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.language.grounding; + +/** + * Associates an abstract AtomicProcess with a concrete + * web service that can be called and executed. + * + * @author Andrew John Hughes (address@hidden) + */ +public interface Grounding +{ +} Index: src/nongnu/cashews/language/process/AnyOrder.java =================================================================== RCS file: src/nongnu/cashews/language/process/AnyOrder.java diff -N src/nongnu/cashews/language/process/AnyOrder.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/language/process/AnyOrder.java 4 May 2005 07:16:33 -0000 @@ -0,0 +1,36 @@ +/* AnyOrder.java -- A list of processes which execute serially in any order. + 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.language.process; + +/** + * An AnyOrder executes each performance serially, + * but without any particular order (as there is with Sequence). + * + * @author Andrew John Hughes (address@hidden) + * @see Performance + * @see Sequence + */ +public class AnyOrder + extends MultiPerform +{ + +} Index: src/nongnu/cashews/language/process/AtomicProcess.java =================================================================== RCS file: src/nongnu/cashews/language/process/AtomicProcess.java diff -N src/nongnu/cashews/language/process/AtomicProcess.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/language/process/AtomicProcess.java 4 May 2005 07:16:34 -0000 @@ -0,0 +1,47 @@ +/* AtomicProcess.java -- A simple process grounded in some web service. + 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.language.process; + +import nongnu.cashews.language.grounding.Grounding; + +/** + * Represents a simple process with a set of inputs and outputs, + * grounded in a web service. The AtomicProcess provides + * the connection between the CASheW-s language and the underlying + * web services that provide the functionality. + * + * @author Andrew John Hughes (address@hidden) + */ +public class AtomicProcess + extends Process +{ + + /** + * The grounding for this AtomicProcess, which links + * it to a real web service. + * + * @serial the process grounding. + */ + private Grounding grounding; + +} + Index: src/nongnu/cashews/language/process/ChooseOne.java =================================================================== RCS file: src/nongnu/cashews/language/process/ChooseOne.java diff -N src/nongnu/cashews/language/process/ChooseOne.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/language/process/ChooseOne.java 4 May 2005 07:16:34 -0000 @@ -0,0 +1,35 @@ +/* ChooseOne.java -- A list of processes from which one is picked to execute. + 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.language.process; + +/** + * A ChooseOne picks one of the performances and executes + * it. The choice is non-deterministic. + * + * @author Andrew John Hughes (address@hidden) + * @see Performance + */ +public class ChooseOne + extends MultiPerform +{ + +} Index: src/nongnu/cashews/language/process/CompositeProcess.java =================================================================== RCS file: src/nongnu/cashews/language/process/CompositeProcess.java diff -N src/nongnu/cashews/language/process/CompositeProcess.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/language/process/CompositeProcess.java 4 May 2005 07:16:34 -0000 @@ -0,0 +1,62 @@ +/* CompositeProcess.java -- A composite process which wraps 1+ performances. + 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.language.process; + +import java.util.List; + +/** + *

+ * Represents the amalgamation of one or more Performances + * using some control structure. A set of Performance + * can be run both serially and concurrently, and provision + * is also made for looping and determinstic and non-deterministic + * choice. + *

+ *

+ * A CompositeProcess can also have one or more consumers, + * and one or more producers. These associate the inputs of the composite + * processes with the inputs of the internal performances, and perform + * aggregation of the output data, respectively. + *

+ * + * @author Andrew John Hughes (address@hidden) + */ +public abstract class CompositeProcess + extends Process +{ + + /** + * The consumers for this composite process. + * + * @serial the consumers. + */ + private List consumers; + + /** + * The producers for this composite process. + * + * @serial the producers. + */ + private List producers; + +} + Index: src/nongnu/cashews/language/process/Connection.java =================================================================== RCS file: src/nongnu/cashews/language/process/Connection.java diff -N src/nongnu/cashews/language/process/Connection.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/language/process/Connection.java 4 May 2005 07:16:34 -0000 @@ -0,0 +1,73 @@ +/* Connection.java -- A connection between two performances for data flow. + 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.language.process; + +import java.net.URI; + +/** + * Represents the connection between two performances, which provides + * the necessary data flow from one to the other. The output of + * one performance is connected to a indexed input on another. + * + * @author Andrew John Hughes (address@hidden) + */ +public class Connection + implements MultiPerformElement +{ + + /** + * The performance from which the output comes. + * + * @serial the source performance. + */ + private URI fromPerformance; + + /** + * The output on the source performance. + * + * @serial the source output. + */ + private URI fromOutput; + + /** + * The performance to where the output goes. + * + * @serial the destination performance. + */ + private URI toPerformance; + + /** + * The input on the destination performance. + * + * @serial the destination input. + */ + private URI toInput; + + /** + * The index of the input on the destination performance. + * + * @serial the index of the destination input. + */ + private int toIndex; + +} + Index: src/nongnu/cashews/language/process/Constant.java =================================================================== RCS file: src/nongnu/cashews/language/process/Constant.java diff -N src/nongnu/cashews/language/process/Constant.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/language/process/Constant.java 4 May 2005 07:16:34 -0000 @@ -0,0 +1,43 @@ +/* Constant.java -- Representation of the constant data for a value data. + 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.language.process; + +import org.w3c.dom.Document; + +/** + * Representation of the constant data supplied to a ValueData. + * + * @author Andrew John Hughes (address@hidden) + * @see ValueData + */ +public class Constant +{ + + /** + * The data as unparsed XML. + * + * @serial the unparsed XML data. + */ + private Document data; + +} + Index: src/nongnu/cashews/language/process/Consume.java =================================================================== RCS file: src/nongnu/cashews/language/process/Consume.java diff -N src/nongnu/cashews/language/process/Consume.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/language/process/Consume.java 4 May 2005 07:16:34 -0000 @@ -0,0 +1,65 @@ +/* Consume.java -- Consumes input for use in a composite 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.language.process; + +import java.net.URI; + +/** + * Consumes input for use in a CompositeProcess. + * The consumer associates the inputs of the composite process + * with a particular performance inside the process. + * + * @author Andrew John Hughes (address@hidden) + * @see Performance + */ +public class Consume +{ + + /** + * The input on the composite process. + * + * @serial the source input. + */ + private URI fromInput; + + /** + * The internal performance where the input goes. + * + * @serial the destination performance. + */ + private URI toPerformance; + + /** + * The input on the destination performance. + * + * @serial the destination input. + */ + private URI toInput; + + /** + * The index of the input on the destination performance. + * + * @serial the index of the destination input. + */ + private int toIndex; +} + Index: src/nongnu/cashews/language/process/IfThenElse.java =================================================================== RCS file: src/nongnu/cashews/language/process/IfThenElse.java diff -N src/nongnu/cashews/language/process/IfThenElse.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/language/process/IfThenElse.java 4 May 2005 07:16:34 -0000 @@ -0,0 +1,59 @@ +/* IfThenElse.java -- A conditional performance choice. + 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.language.process; + +import nongnu.cashews.language.expression.Expression; + +/** + * An IfThenElse construct chooses one of two performances, + * based on the result of a Expression. + * + * @author Andrew John Hughes (address@hidden) + * @see Performance + * @see nongnu.cashews.language.expression.Expression + */ +public class IfThenElse + extends CompositeProcess +{ + + /** + * The condition on which the branch is decided. + * + * @serial the condition. + */ + private Expression condition; + + /** + * The performance used for the `then' branch. + * + * @serial the performance taken on a result of true. + */ + private Performance thenPerform; + + /** + * The performance used for the `else' branch. + * + * @serial the performance taken on a result of false. + */ + private Performance elsePerform; + +} Index: src/nongnu/cashews/language/process/Loop.java =================================================================== RCS file: src/nongnu/cashews/language/process/Loop.java diff -N src/nongnu/cashews/language/process/Loop.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/language/process/Loop.java 4 May 2005 07:16:34 -0000 @@ -0,0 +1,52 @@ +/* Loop.java -- An abstract subclass for looping composite processes. + 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.language.process; + +import nongnu.cashews.language.expression.Expression; + +/** + * Loop is simply an abstraction of all looping composite + * processes. + * + * @author Andrew John Hughes (address@hidden) + * @see CompositeProcess + */ +public class Loop + extends CompositeProcess +{ + + /** + * The condition on which the loop depends. + * + * @serial the condition. + */ + private Expression condition; + + /** + * The performance which is repeatedly executed while the condition + * returns true. + * + * @serial the performance which is executed while the condition holds. + */ + private Performance perform; + +} Index: src/nongnu/cashews/language/process/MultiPerform.java =================================================================== RCS file: src/nongnu/cashews/language/process/MultiPerform.java diff -N src/nongnu/cashews/language/process/MultiPerform.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/language/process/MultiPerform.java 4 May 2005 07:16:34 -0000 @@ -0,0 +1,47 @@ +/* MultiPerform.java -- A composite process which wraps several performances. + 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.language.process; + +import java.util.List; + +/** + * A generic superclass for composite processes which handle an arbitrary + * length list of Performances, interleaved with + * Connections. + * + * @author Andrew John Hughes (address@hidden) + * @see Performance + * @see Connection + */ +public abstract class MultiPerform + extends CompositeProcess +{ + + /** + * The interleaved list of performances and connections. + * + * @serial the interleaved list. + */ + private List content; + +} + Index: src/nongnu/cashews/language/process/MultiPerformElement.java =================================================================== RCS file: src/nongnu/cashews/language/process/MultiPerformElement.java diff -N src/nongnu/cashews/language/process/MultiPerformElement.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/language/process/MultiPerformElement.java 4 May 2005 07:16:34 -0000 @@ -0,0 +1,33 @@ +/* MultiPerformElement.java -- Marks a class as a member of a multiperform. + 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.language.process; + +/** + * Marks implementing classes as usable within the list maintained by + * the MultiPerform. + * + * @author Andrew John Hughes (address@hidden) + * @see MultiPerform + */ +public interface MultiPerformElement +{ +} Index: src/nongnu/cashews/language/process/Performance.java =================================================================== RCS file: src/nongnu/cashews/language/process/Performance.java diff -N src/nongnu/cashews/language/process/Performance.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/language/process/Performance.java 4 May 2005 07:16:34 -0000 @@ -0,0 +1,75 @@ +/* Performance.java -- An instance 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.language.process; + +import java.net.URI; +import java.util.List; + +/** + * Represents an instance of an atomic or + * composite process. Each performance has a name + * and an associated process, which it realises. Each performance + * also has the possibility of multiple ValueDatas and + * ValueCollectors which link inputs to constant data and + * functions, respectively. + * + * @author Andrew John Hughes (address@hidden) + * @see Process + * @see ValueData + * @see ValueCollector + */ +public class Performance + implements MultiPerformElement +{ + + /** + * The name of this performance. + * + * @serial the performance name. + */ + private URI name; + + /** + * The process this performance references. + * + * @serial the referenced process. + */ + private Process process; + + /** + * The ValueDatas for this performance. A + * ValueData links an input to some constant data. + * + * @serial the ValueDatas. + */ + private List valueDatas; + + /** + * The ValueCollectors for this performance. A + * ValueCollector links an input to the result of + * some function. + * + * @serial the ValueCollectors. + */ + private List valueCollectors; + +} Index: src/nongnu/cashews/language/process/Process.java =================================================================== RCS file: src/nongnu/cashews/language/process/Process.java diff -N src/nongnu/cashews/language/process/Process.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/language/process/Process.java 4 May 2005 07:16:34 -0000 @@ -0,0 +1,53 @@ +/* Process.java -- An abstraction of the two process types. + 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.language.process; + +import java.net.URI; + +/** + * Takes a set of inputs, does some processing and returns a set of + * outputs. The internal makeup of the process is split between + * atomic and composite process. + * The former are exactly as the description implies, with some code + * performing the operation on the inputs. This code is accessed via + * a Grounding to a web service. In contrast, composite + * processes appear the same to the casual observer, looking at the + * interface, but the internal structure is the result of the + * composition of several services. + * + * @author Andrew John Hughes (address@hidden) + * @see AtomicProcess + * @see CompositeProcess + * @see Grounding + */ +public abstract class Process +{ + + /** + * The name of this process. + * + * @serial the process name. + */ + private URI name; + +} + Index: src/nongnu/cashews/language/process/Produce.java =================================================================== RCS file: src/nongnu/cashews/language/process/Produce.java diff -N src/nongnu/cashews/language/process/Produce.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/language/process/Produce.java 4 May 2005 07:16:34 -0000 @@ -0,0 +1,59 @@ +/* Produce.java -- Produces output for use in a composite 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.language.process; + +import java.net.URI; + +/** + * Produces output for a CompositeProcess as a whole. + * The producer performs data aggregation on the outputs of the internal + * performances in order to produce one output for the process. + * + * @author Andrew John Hughes (address@hidden) + * @see Performance + */ +public class Produce +{ + + /** + * The output of the internal performance. + * + * @serial the internal performance input. + */ + private URI fromOutput; + + /** + * The internal performance where the output comes from. + * + * @serial the source performance. + */ + private URI fromPerformance; + + /** + * The output of the composite process. + * + * @serial the composite process output. + */ + private URI toOutput; + +} + Index: src/nongnu/cashews/language/process/RepeatUntil.java =================================================================== RCS file: src/nongnu/cashews/language/process/RepeatUntil.java diff -N src/nongnu/cashews/language/process/RepeatUntil.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/language/process/RepeatUntil.java 4 May 2005 07:16:34 -0000 @@ -0,0 +1,33 @@ +/* RepeatUntil.java -- A loop which executes until true. + 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.language.process; + +/** + * A RepeatUntil construct repeatedly executes its + * performance until the condition holds. + * + * @author Andrew John Hughes (address@hidden) + */ +public class RepeatUntil + extends Loop +{ +} Index: src/nongnu/cashews/language/process/RepeatWhile.java =================================================================== RCS file: src/nongnu/cashews/language/process/RepeatWhile.java diff -N src/nongnu/cashews/language/process/RepeatWhile.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/language/process/RepeatWhile.java 4 May 2005 07:16:34 -0000 @@ -0,0 +1,33 @@ +/* RepeatWhile.java -- A loop which executes while true. + 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.language.process; + +/** + * A RepeatWhile construct repeatedly executes its + * performance while the condition holds. + * + * @author Andrew John Hughes (address@hidden) + */ +public class RepeatWhile + extends Loop +{ +} Index: src/nongnu/cashews/language/process/Sequence.java =================================================================== RCS file: src/nongnu/cashews/language/process/Sequence.java diff -N src/nongnu/cashews/language/process/Sequence.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/language/process/Sequence.java 4 May 2005 07:16:34 -0000 @@ -0,0 +1,36 @@ +/* Sequence.java -- A list of processes which execute in order. + 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.language.process; + +/** + * A Sequence executes each control construct sequentially and + * serially. The sequence completes when all performances have + * completed. + * + * @author Andrew John Hughes (address@hidden) + * @see Performance + */ +public class Sequence + extends MultiPerform +{ + +} Index: src/nongnu/cashews/language/process/Split.java =================================================================== RCS file: src/nongnu/cashews/language/process/Split.java diff -N src/nongnu/cashews/language/process/Split.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/language/process/Split.java 4 May 2005 07:16:34 -0000 @@ -0,0 +1,36 @@ +/* Split.java -- A list of performances which execute concurrently. + 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.language.process; + +/** + * A Split schedules each performance to execute + * concurrently. The construct completes when each performance + * has been scheduled. + * + * @author Andrew John Hughes (address@hidden) + * @see Performance + */ +public class Split + extends MultiPerform +{ + +} Index: src/nongnu/cashews/language/process/SplitJoin.java =================================================================== RCS file: src/nongnu/cashews/language/process/SplitJoin.java diff -N src/nongnu/cashews/language/process/SplitJoin.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/language/process/SplitJoin.java 4 May 2005 07:16:34 -0000 @@ -0,0 +1,35 @@ +/* SplitJoin.java -- A list of performs which execute concurrently with synch. + 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.language.process; + +/** + * A SplitJoin schedules each performance to execute + * concurrently with barrier synchronization. The construct completes + * when each performance has completed. + * + * @author Andrew John Hughes (address@hidden) + * @see Performance + */ +public class SplitJoin + extends MultiPerform +{ +} Index: src/nongnu/cashews/language/process/ValueCollector.java =================================================================== RCS file: src/nongnu/cashews/language/process/ValueCollector.java diff -N src/nongnu/cashews/language/process/ValueCollector.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/language/process/ValueCollector.java 4 May 2005 07:16:34 -0000 @@ -0,0 +1,60 @@ +/* ValueCollector.java -- Collects data from the result of a function. + 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.language.process; + +import java.net.URI; + +import nongnu.cashews.language.expression.Expression; + +/** + * Connects a performance input to the result of some function. + * + * @author Andrew John Hughes (address@hidden) + * @see Performance + * @see Expression + */ +public class ValueCollector +{ + + /** + * The input on the performance. + * + * @serial the performance input. + */ + private URI toInput; + + /** + * The width of the collector. + * + * @serial the collector's width. + */ + private int collectorWidth; + + /** + * The function which provides the input. + * + * @serial the function. + */ + private Expression function; + +} + Index: src/nongnu/cashews/language/process/ValueData.java =================================================================== RCS file: src/nongnu/cashews/language/process/ValueData.java diff -N src/nongnu/cashews/language/process/ValueData.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/language/process/ValueData.java 4 May 2005 07:16:34 -0000 @@ -0,0 +1,49 @@ +/* ValueData.java -- Connects an input to some constant data. + 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.language.process; + +import java.net.URI; + +/** + * Connects a performance input to some constant data. + * + * @author Andrew John Hughes (address@hidden) + */ +public class ValueData +{ + + /** + * The input on the performance. + * + * @serial the input. + */ + private URI toInput; + + /** + * The constant data to link to the input. + * + * @serial the constant data. + */ + private Constant value; + +} + Index: src/nongnu/cashews/owls/process/SplitJoin.java =================================================================== RCS file: /cvsroot/cashew-s-editor/cashews/src/nongnu/cashews/owls/process/SplitJoin.java,v retrieving revision 1.1 diff -u -3 -p -u -r1.1 SplitJoin.java --- src/nongnu/cashews/owls/process/SplitJoin.java 31 Mar 2005 17:18:27 -0000 1.1 +++ src/nongnu/cashews/owls/process/SplitJoin.java 4 May 2005 07:16:34 -0000 @@ -24,7 +24,7 @@ package nongnu.cashews.owls.process; import java.util.List; /** - * A Split schedules each control construct to execute + * A SplitJoin schedules each control construct to execute * concurrently with barrier synchronization. The construct completes * when each control construct has completed. * Index: src/nongnu/cashews/rdf/RDFHandler.java =================================================================== RCS file: /cvsroot/cashew-s-editor/cashews/src/nongnu/cashews/rdf/RDFHandler.java,v retrieving revision 1.2 diff -u -3 -p -u -r1.2 RDFHandler.java --- src/nongnu/cashews/rdf/RDFHandler.java 18 Apr 2005 00:54:30 -0000 1.2 +++ src/nongnu/cashews/rdf/RDFHandler.java 4 May 2005 07:16:34 -0000 @@ -510,7 +510,7 @@ public class RDFHandler else { /* Closure of nested triple; return to previous state */ - object = (RDFObject) subject; + object = (Node) subject; Pair previous = currentState.pop(); rdfLogger.finer("New state: " + previous); subject = previous.getLeft();