Index: acinclude.m4 =================================================================== RCS file: /cvsroot/cashew-s-editor/cashews/acinclude.m4,v retrieving revision 1.1.1.1 diff -u -3 -p -u -r1.1.1.1 acinclude.m4 --- acinclude.m4 31 Jan 2005 04:02:18 -0000 1.1.1.1 +++ acinclude.m4 1 Feb 2005 00:56:59 -0000 @@ -10,20 +10,23 @@ AC_DEFUN([CLASSPATH_FIND_JAVAC], CLASSPATH_WITH_JIKES CLASSPATH_WITH_KJC CLASSPATH_WITH_GCJX + CLASSPATH_WITH_ECJ if test "x${user_specified_javac}" = x; then AM_CONDITIONAL(FOUND_GCJ, test "x${GCJ}" != x) AM_CONDITIONAL(FOUND_JIKES, test "x${JIKES}" != x) + AM_CONDITIONAL(FOUND_ECJ, test "x${ECJ}" != x) else AM_CONDITIONAL(FOUND_GCJ, test "x${user_specified_javac}" = xgcj) AM_CONDITIONAL(FOUND_JIKES, test "x${user_specified_javac}" = xjikes) + AM_CONDITIONAL(FOUND_ECJ, test "x${user_specified_javac}" = xecj) fi AM_CONDITIONAL(FOUND_KJC, test "x${user_specified_javac}" = xkjc) AM_CONDITIONAL(FOUND_GCJX, test "x${user_specified_javac}" = xgcjx) if test "x${GCJ}" = x && test "x${JIKES}" = x && test "x${user_specified_javac}" != xkjc && test "x${user_specified_javac}" != xgcjx; then # FIXME: use autoconf error function - echo "configure: cannot find javac, try --with-gcj, --with-jikes, --with-kjc, or --with-gcjx" 1>&2 + echo "configure: cannot find javac, try --with-gcj, --with-jikes, --with-kjc, --with-ecj or --with-gcjx" 1>&2 exit 1 fi ]) @@ -310,26 +313,26 @@ AC_DEFUN([CLASSPATH_WITH_GLIBJ], [AS_HELP_STRING([--with-glibj],[define what to install (zip|flat|both|none) [default=zip]])], [ if test "x${withval}" = xyes || test "x${withval}" = xzip; then - AC_PATH_PROG(ZIP, zip) + AC_PATH_PROG(JAR, jar) install_class_files=no elif test "x${withval}" = xboth; then - AC_PATH_PROG(ZIP, zip) + AC_PATH_PROG(JAR, jar) install_class_files=yes elif test "x${withval}" = xflat; then - ZIP= + JAR= install_class_files=yes elif test "x${withval}" = xno || test "x${withval}" = xnone; then - ZIP= + JAR= install_class_files=no else AC_MSG_ERROR([unknown value given to --with-glibj]) fi ], [ - AC_PATH_PROG(ZIP, zip) + AC_PATH_PROG(JAR, jar) install_class_files=no ]) - AM_CONDITIONAL(INSTALL_GLIBJ_ZIP, test "x${ZIP}" != x) + AM_CONDITIONAL(INSTALL_GLIBJ_ZIP, test "x${JAR}" != x) AM_CONDITIONAL(INSTALL_CLASS_FILES, test "x${install_class_files}" = xyes) AC_ARG_ENABLE([examples], @@ -340,7 +343,7 @@ AC_DEFUN([CLASSPATH_WITH_GLIBJ], *) AC_MSG_ERROR(bad value ${enableval} for --enable-examples) ;; esac], [EXAMPLESDIR="examples"]) - if test "x${ZIP}" = x && test "x${install_class_files}" = xno; then + if test "x${JAR}" = x && test "x${install_class_files}" = xno; then EXAMPLESDIR="" fi AC_SUBST(EXAMPLESDIR) @@ -375,3 +378,37 @@ AC_DEFUN([CLASSPATH_WITH_GJDOC], AM_CONDITIONAL(CREATE_API_DOCS, test "x${WITH_GJDOC}" = xyes) ]) +dnl ----------------------------------------------------------- +AC_DEFUN([CLASSPATH_WITH_ECJ], +[ + AC_ARG_WITH([ecj], + [AS_HELP_STRING(--with-ecj,bytecode compilation with ecj)], + [ + if test "x${withval}" != x && test "x${withval}" != xyes && test "x${withval}" != xno; then + CLASSPATH_CHECK_ECJ(${withval}) + else + if test "x${withval}" != xno; then + CLASSPATH_CHECK_ECJ + fi + fi + user_specified_javac=ecj + ], + [ + CLASSPATH_CHECK_ECJ + ]) + AC_SUBST(ECJ) +]) + +dnl ----------------------------------------------------------- +AC_DEFUN([CLASSPATH_CHECK_ECJ], +[ + if test "x$1" != x; then + if test -f "$1"; then + ECJ="$1" + else + AC_PATH_PROG(ECJ, "$1") + fi + else + AC_PATH_PROG(ECJ, "ecj") + fi +]) Index: lib/Makefile.am =================================================================== RCS file: /cvsroot/cashew-s-editor/cashews/lib/Makefile.am,v retrieving revision 1.1.1.1 diff -u -3 -p -u -r1.1.1.1 Makefile.am --- lib/Makefile.am 31 Jan 2005 04:02:18 -0000 1.1.1.1 +++ lib/Makefile.am 1 Feb 2005 00:56:59 -0000 @@ -11,6 +11,9 @@ sinclude $(JAVA_DEPEND) compile_classpath = $(top_srcdir):.:$(USER_CLASSLIB) # handling source to bytecode compiler programs like gcj, jikes and kjc +if FOUND_ECJ +JAVAC = $(ECJ) -classpath $(compile_classpath) -d . @classes +else if FOUND_GCJ JAVAC = $(GCJ) --classpath $(compile_classpath) -C -d . @classes else @@ -26,6 +29,7 @@ endif # FOUND_GCJX endif # FOUND_KJC endif # FOUND_GCJ endif # FOUND_JIKES +endif # FOUND_ECJ JAVAH = $(USER_JAVAH) -jni -classpath .:$(USER_CLASSLIB) @@ -52,7 +56,7 @@ endif # INSTALL_CLASS_FILES .PHONY: genclasses cashews.jar: classes compile-classes # resources - if test "$(ZIP)" != ""; then $(ZIP) -r -D cashews.jar nongnu > /dev/null; fi + if test "$(JAR)" != ""; then $(JAR) cf cashews.jar nongnu > /dev/null; fi #resources: # if ! [ -e gnu ]; then mkdir gnu; fi Index: src/nongnu/cashews/rdf/Graph.java =================================================================== RCS file: /cvsroot/cashew-s-editor/cashews/src/nongnu/cashews/rdf/Graph.java,v retrieving revision 1.1.1.1 diff -u -3 -p -u -r1.1.1.1 Graph.java --- src/nongnu/cashews/rdf/Graph.java 31 Jan 2005 04:02:18 -0000 1.1.1.1 +++ src/nongnu/cashews/rdf/Graph.java 1 Feb 2005 00:56:59 -0000 @@ -35,7 +35,7 @@ import java.util.Set; * @see Triple * @see Node * @see Subject - * @see Object + * @see RDFObject * @see Predicate */ public class Graph Index: src/nongnu/cashews/rdf/Node.java =================================================================== RCS file: src/nongnu/cashews/rdf/Node.java diff -N src/nongnu/cashews/rdf/Node.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/rdf/Node.java 1 Feb 2005 00:56:59 -0000 @@ -0,0 +1,38 @@ +/* Node.java -- Representation of a RDF node. + 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.rdf; + +/** + *

+ * This interface represents an RDF node. + * A node can either be a URI reference + * or a blank node. + *

+ * + * @author Andrew John Hughes (address@hidden) + * @see RDFURI + * @see Blank + */ +public interface Node +{ + +} Index: src/nongnu/cashews/rdf/Predicate.java =================================================================== RCS file: src/nongnu/cashews/rdf/Predicate.java diff -N src/nongnu/cashews/rdf/Predicate.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/rdf/Predicate.java 1 Feb 2005 00:56:59 -0000 @@ -0,0 +1,36 @@ +/* Predicate.java -- Representation of a RDF predicate. + 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.rdf; + +/** + *

+ * This interface represents an RDF predicate. + * A predicate is a URI reference. + *

+ * + * @author Andrew John Hughes (address@hidden) + * @see RDFURI + */ +public interface Predicate +{ + +} Index: src/nongnu/cashews/rdf/RDFObject.java =================================================================== RCS file: src/nongnu/cashews/rdf/RDFObject.java diff -N src/nongnu/cashews/rdf/RDFObject.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/rdf/RDFObject.java 1 Feb 2005 00:56:59 -0000 @@ -0,0 +1,39 @@ +/* RDFObject.java -- Representation of a RDF object. + 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.rdf; + +/** + *

+ * This interface represents an RDF object. + * An object can either be a URI reference, + * a blank node or a literal. + *

+ * + * @author Andrew John Hughes (address@hidden) + * @see RDFURI + * @see Blank + * @see Literal + */ +public interface RDFObject extends Node +{ + +} Index: src/nongnu/cashews/rdf/Subject.java =================================================================== RCS file: src/nongnu/cashews/rdf/Subject.java diff -N src/nongnu/cashews/rdf/Subject.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/rdf/Subject.java 1 Feb 2005 00:56:59 -0000 @@ -0,0 +1,40 @@ +/* Subject.java -- Representation of a RDF subject. + 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.rdf; + +/** + *

+ * This interface represents an RDF subject. + * A subject can either be a URI reference + * or a blank node. + *

+ * + * @author Andrew John Hughes (address@hidden) + * @see Node + * @see Subject + * @see RDFURI + * @see Blank + */ +public interface Subject extends Node +{ + +} Index: src/nongnu/cashews/rdf/Triple.java =================================================================== RCS file: src/nongnu/cashews/rdf/Triple.java diff -N src/nongnu/cashews/rdf/Triple.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/rdf/Triple.java 1 Feb 2005 00:56:59 -0000 @@ -0,0 +1,78 @@ +/* Triple.java -- Representation of a RDF triple. + 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.rdf; + +import java.io.Serializable; + +/** + *

+ * This class represents an RDF triple, + * Each triple consists of: + *

+ * + *

+ * A set of these triples form a Graph + * object. + * + * @author Andrew John Hughes (address@hidden) + * @see Graph + * @see Node + * @see Subject + * @see RDFObject + * @see Predicate + */ +public class Triple + implements Serializable +{ + + /** + * The subject of this triple. + * + * @see Subject + * @serial the triple's subject. + */ + private Subject subject; + + /** + * The predicate of this triple. + * + * @see Predicate + * @serial the triple's predicate. + */ + private Predicate predicate; + + /** + * The object of this triple. + * + * @see RDFObject + * @serial the triple's object. + */ + private RDFObject object; + +}