Index: AUTHORS =================================================================== RCS file: /cvsroot/cashew-s-editor/cashews/AUTHORS,v retrieving revision 1.1.1.1 diff -u -3 -p -u -r1.1.1.1 AUTHORS --- AUTHORS 31 Jan 2005 04:02:18 -0000 1.1.1.1 +++ AUTHORS 28 Mar 2005 19:18:35 -0000 @@ -5,3 +5,5 @@ on either list, but should, let us know. alphabetic order. Andrew John Hughes (address@hidden) +Ravish Bhagdev (address@hidden) +Xian Liu (address@hidden) Index: HACKING =================================================================== RCS file: /cvsroot/cashew-s-editor/cashews/HACKING,v retrieving revision 1.1.1.1 diff -u -3 -p -u -r1.1.1.1 HACKING --- HACKING 31 Jan 2005 04:02:17 -0000 1.1.1.1 +++ HACKING 28 Mar 2005 19:18:35 -0000 @@ -5,5 +5,11 @@ You only need the information in this fi versions of the CASheW-s editor. Installation information for released versions of CASheW-s editor can be found in the INSTALL file. +To build: + 1) Run ./autogen.sh + 2) Run ./configure with appropriate options + 3) make + 4) make install + If you have any questions, suggestions, etc., send them to address@hidden Index: NEWS =================================================================== RCS file: /cvsroot/cashew-s-editor/cashews/NEWS,v retrieving revision 1.1.1.1 diff -u -3 -p -u -r1.1.1.1 NEWS --- NEWS 31 Jan 2005 04:02:17 -0000 1.1.1.1 +++ NEWS 28 Mar 2005 19:18:35 -0000 @@ -1 +1,2 @@ No releases yet :( +:) \ No newline at end of file Index: TODO =================================================================== RCS file: /cvsroot/cashew-s-editor/cashews/TODO,v retrieving revision 1.1.1.1 diff -u -3 -p -u -r1.1.1.1 TODO --- TODO 31 Jan 2005 04:02:17 -0000 1.1.1.1 +++ TODO 28 Mar 2005 19:18:35 -0000 @@ -0,0 +1,8 @@ +* RDF + * Parse RDF in XML form +* OWL +* OWL-S +* Eclipse diagram editor + * Serialize/Deserialize + * Extend with all elements for OWL-S + Index: acinclude.m4 =================================================================== RCS file: /cvsroot/cashew-s-editor/cashews/acinclude.m4,v retrieving revision 1.3 diff -u -3 -p -u -r1.3 acinclude.m4 --- acinclude.m4 7 Feb 2005 01:59:19 -0000 1.3 +++ acinclude.m4 28 Mar 2005 19:18:35 -0000 @@ -93,18 +93,18 @@ AC_DEFUN([CLASSPATH_CHECK_GCJ], GCJ_VERSION_MAJOR=`echo "$GCJ_VERSION" | cut -d '.' -f 1` GCJ_VERSION_MINOR=`echo "$GCJ_VERSION" | cut -d '.' -f 2` - if expr "$GCJ_VERSION_MAJOR" \< 3 > /dev/null; then + if expr "$GCJ_VERSION_MAJOR" \< 4 > /dev/null; then GCJ="" fi - if expr "$GCJ_VERSION_MAJOR" = 3 > /dev/null; then - if expr "$GCJ_VERSION_MINOR" \< 3; then + if expr "$GCJ_VERSION_MAJOR" = 4 > /dev/null; then + if expr "$GCJ_VERSION_MINOR" \< 0; then GCJ="" fi fi if test "x$GCJ" != x; then AC_MSG_RESULT($GCJ_VERSION) else - AC_MSG_WARN($GCJ_VERSION: gcj 3.3 or higher required) + AC_MSG_WARN($GCJ_VERSION: gcj 4.0 or higher required) fi fi ]) @@ -413,16 +413,24 @@ AC_DEFUN([CLASSPATH_CHECK_ECJ], fi ]) + dnl ------------------------------------------------------------ AC_DEFUN([CASHEWS_WITH_ECLIPSE], [ AC_ARG_WITH([eclipse], [AS_HELP_STRING(--with-eclipse,compile the Eclipse plug-in)], [ + AC_MSG_CHECKING(eclipse version) if test "x${withval}" != x && test "x${withval}" != xyes && test "x${withval}" != xno; then ECLIPSE="$withval" AC_SUBST(ECLIPSE) fi + if test "x$ECLIPSE" != "x"; then + AC_MSG_RESULT($ECLIPSE) + else + AC_MSG_WARN(not found) + fi ]) + AM_CONDITIONAL(FOUND_ECLIPSE, test "x${ECLIPSE}" != x) ]) Index: doc/api/Makefile.am =================================================================== RCS file: /cvsroot/cashew-s-editor/cashews/doc/api/Makefile.am,v retrieving revision 1.1.1.1 diff -u -3 -p -u -r1.1.1.1 Makefile.am --- doc/api/Makefile.am 31 Jan 2005 04:02:18 -0000 1.1.1.1 +++ doc/api/Makefile.am 28 Mar 2005 19:18:35 -0000 @@ -2,9 +2,9 @@ if CREATE_API_DOCS noinst_DATA = html endif -sourcepath = $(top_builddir):$(top_srcdir) +sourcepath = $(top_builddir):$(top_srcdir)/src -classpathbox = "CASheW-S Editor ($(VERSION))" +classpathbox = "CASheW-S Editor ($(VERSION))" install-data-local: $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/api @@ -30,12 +30,16 @@ uninstall-local: html: create_html clean: - -rm -rf html create_html + rm -rf html create_html + +distclean: + rm -rf html create_html create_html: -$(MKDIR) html > /dev/null 2>&1 $(GJDOC) -public -use \ -sourcepath "$(sourcepath)" \ + -author \ -encoding UTF-8 \ -breakiterator \ -licensetext \ @@ -45,5 +49,7 @@ create_html: -doctitle "CASheW-s Editor $(VERSION)" \ -windowtitle "CASheW-s Editor $(VERSION) Documentation" \ -header $(classpathbox) -footer $(classpathbox) \ - -subpackages java:javax:org + -subpackages nongnu \ + -source 1.4 +#-source 1.5 touch create_html Index: lib/.cvsignore =================================================================== RCS file: /cvsroot/cashew-s-editor/cashews/lib/.cvsignore,v retrieving revision 1.1.1.1 diff -u -3 -p -u -r1.1.1.1 .cvsignore --- lib/.cvsignore 31 Jan 2005 04:02:18 -0000 1.1.1.1 +++ lib/.cvsignore 28 Mar 2005 19:18:35 -0000 @@ -2,7 +2,9 @@ Makefile Makefile.in nongnu classes -cashews.jar +eclipse.jar +owls.jar +rdf.jar deps.sh gen-classlist.sh mkdep.pl Index: lib/Makefile.am =================================================================== RCS file: /cvsroot/cashew-s-editor/cashews/lib/Makefile.am,v retrieving revision 1.2 diff -u -3 -p -u -r1.2 Makefile.am --- lib/Makefile.am 1 Feb 2005 01:01:08 -0000 1.2 +++ lib/Makefile.am 28 Mar 2005 19:18:35 -0000 @@ -8,11 +8,27 @@ sinclude $(JAVA_DEPEND) #propertydirs := $(shell cd $(top_srcdir)/resource && $(FIND) nongnu -type d ! -name CVS -print) #propertyfiles := $(shell cd $(top_srcdir)/resource && $(FIND) nongnu -name \*\.properties -print) -compile_classpath = $(top_srcdir):.:$(USER_CLASSLIB) +if FOUND_ECLIPSE + RUNTIME=`echo $(ECLIPSE)/plugins/org.eclipse.core.runtime*/runtime.jar` + UI=`echo $(ECLIPSE)/plugins/org.eclipse.ui.workbench*/workbench.jar` + OSGI=`echo $(ECLIPSE)/plugins/org.eclipse.osgi*/osgi.jar` + JFACE=`echo $(ECLIPSE)/plugins/org.eclipse.jface*/jface.jar` + GEF=`echo $(ECLIPSE)/plugins/org.eclipse.gef*/gef.jar` + SWT=`find $(ECLIPSE) -name 'swt.jar'` + VIEWS=`find $(ECLIPSE) -name 'views.jar'` + DRAW2D=`find $(ECLIPSE) -name 'draw2d.jar'` + RESOURCES=`find $(ECLIPSE) -name 'resources.jar'` + IDE=`find $(ECLIPSE) -name 'ide.jar'` + INSTALLDIR=$(ECLIPSE)/plugins/nongnu.cashews.editor.composer_$(VERSION) + + compile_classpath = $(top_srcdir):.:$(RUNTIME):$(UI):$(OSGI):$(JFACE):$(GEF):$(SWT):$(VIEWS):$(DRAW2D):$(RESOURCES):$(IDE):$(USER_CLASSLIB) +else + compile_classpath = $(top_srcdir):.:$(USER_CLASSLIB) +endif # handling source to bytecode compiler programs like gcj, jikes and kjc if FOUND_ECJ -JAVAC = $(ECJ) -classpath $(compile_classpath) -d . @classes +JAVAC = $(ECJ) -1.5 -classpath $(compile_classpath) -d . @classes else if FOUND_GCJ JAVAC = $(GCJ) --classpath $(compile_classpath) -C -d . @classes @@ -35,7 +51,15 @@ JAVAH = $(USER_JAVAH) -jni -classpath .: if INSTALL_GLIBJ_ZIP -pkgdata_DATA = cashews.jar +if FOUND_ECLIPSE +pkgdata_DATA = rdf.jar owls.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 = rdf.jar owls.jar +endif endif # INSTALL_GLIBJ_ZIP @@ -55,8 +79,27 @@ endif # INSTALL_CLASS_FILES .PHONY: genclasses -cashews.jar: classes compile-classes # resources - if test "$(JAR)" != ""; then $(JAR) cf cashews.jar nongnu > /dev/null; fi +rdf.jar: classes compile-classes # resources + if test "$(JAR)" != ""; then rm rdf.jar; $(JAR) cf rdf.jar `find nongnu -path '*rdf*' -name '*class'` > /dev/null; fi +if FOUND_GCJ +$(GCJ) -shared -fjni -findirect-dispatch -o rdf.jar.so rdf.jar +endif + +owls.jar: classes compile-classes # resources + if test "$(JAR)" != ""; then rm owls.jar; $(JAR) cf owls.jar `find nongnu -path '*owls*' -name '*class'` > /dev/null; fi +#if FOUND GCJ +#$(GCJ) -shared -fjni -findirect-dispatch -o owls.jar.so owls.jar +#endif + +if FOUND_ECLIPSE + +eclipse.jar: classes compile-classes # resources + if test "$(JAR)" != ""; then rm eclipse.jar; $(JAR) cf eclipse.jar `find nongnu -path '*eclipse*' -name '*class'` > /dev/null; fi +#if FOUND GCJ +#$(GCJ) -shared -fjni -findirect-dispatch -o eclipse.jar.so eclipse.jar +#endif + +endif #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.3 diff -u -3 -p -u -r1.3 Graph.java --- src/nongnu/cashews/rdf/Graph.java 3 Feb 2005 00:35:52 -0000 1.3 +++ src/nongnu/cashews/rdf/Graph.java 28 Mar 2005 19:18:35 -0000 @@ -1,22 +1,22 @@ /* Graph.java -- Representation of a RDF graph. - Copyright (C) 2005 The University of Sheffield. + Copyright (C) 2005 The University of Sheffield. -This file is part of the CASheW-s editor. + 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 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. + 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; @@ -25,12 +25,10 @@ import java.io.Serializable; import java.util.Set; /** - * This class represents an RDF graph, - * formally described as a set of RDF triples. - * The graph is made up of nodes (the subjects - * and objects of the triples) and the links between - * these nodes (the predicates of the triples). - * + * This class represents an RDF graph, formally described as a set of RDF + * triples. The graph is made up of nodes (the subjects and objects of the + * triples) and the links between these nodes (the predicates of the triples). + * * @author Andrew John Hughes (address@hidden) * @see Triple * @see Node @@ -38,26 +36,31 @@ import java.util.Set; * @see RDFObject * @see Predicate */ -public class Graph +public class Graph implements Serializable { /** - * The set of RDF triples which make up - * this particular RDF Graph - * instance. - * + * Serialization UID for compatability. + */ + private static final long serialVersionUID = -4009151165788339408L; + + /** + * The set of RDF triples which make up this particular RDF + * Graph instance. + * * @see Triple * @serial the graph of RDF triples. */ - private Set graph; + private Set graph; /** * Returns true if the specified object is either of type Graph, - * or a sub-type, and contains an equivalent set of triples. If the - * specified object is null, false is returned. - * - * @param obj the object to compare this object with. + * or a sub-type, and contains an equivalent set of triples. If the specified + * object is null, false is returned. + * + * @param obj + * the object to compare this object with. * @return true if the two objects are equivalent. */ public boolean equals(Object obj) @@ -66,19 +69,30 @@ public class Graph return false; if (getClass() == obj.getClass()) { - Graph g = (Graph) obj; - return graph.equals(g.getGraph()); + Graph g = (Graph) obj; + return graph.equals(g.getGraph()); } else return false; } /** + * Returns the hashcode of this RDF graph. This is the code for the + * underlying collection of Triples. + * + * @return the hashcode for the RDF graph. + */ + public int hashCode() + { + return graph.hashCode(); + } + + /** * Returns the graph of RDF triples. - * + * * @return a graph of RDF triples. */ - public Set getGraph() + public Set getGraph() { return graph; } Index: src/nongnu/cashews/rdf/Literal.java =================================================================== RCS file: /cvsroot/cashew-s-editor/cashews/src/nongnu/cashews/rdf/Literal.java,v retrieving revision 1.1 diff -u -3 -p -u -r1.1 Literal.java --- src/nongnu/cashews/rdf/Literal.java 3 Feb 2005 00:39:36 -0000 1.1 +++ src/nongnu/cashews/rdf/Literal.java 28 Mar 2005 19:18:35 -0000 @@ -1,35 +1,61 @@ /* Literal.java -- Representation of a RDF literal. - Copyright (C) 2005 The University of Sheffield. + Copyright (C) 2005 The University of Sheffield. -This file is part of the CASheW-s editor. + 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 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. + 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 literal. + * This class represents an RDF literal. A literal has at least a lexical form. + * Untyped literals include an optional lower-case language tag, taken from the + * values in RFC3066. Typed literals instead include a datatype URI, which + * specifies the type of the data used in the literal. *

- * + * * @author Andrew John Hughes (address@hidden) + * @see Type */ -public class Literal +public class Literal implements RDFObject { + /** + * The lexical form of the literal. + * + * @serial the literal's lexical form. This may not be null. + */ + private String lexicalForm; + + /** + * The optional language tag for this literal. + * + * @serial a lower-case RFC3066 language tag. May be null. + */ + private String language; + + /** + * The optional type of the literal. + * + * @see Type + * @serial the type of the literal's data. May be null. + */ + private Type type; + } Index: src/nongnu/cashews/rdf/Node.java =================================================================== RCS file: /cvsroot/cashew-s-editor/cashews/src/nongnu/cashews/rdf/Node.java,v retrieving revision 1.1 diff -u -3 -p -u -r1.1 Node.java --- src/nongnu/cashews/rdf/Node.java 1 Feb 2005 01:01:08 -0000 1.1 +++ src/nongnu/cashews/rdf/Node.java 28 Mar 2005 19:18:35 -0000 @@ -1,33 +1,32 @@ /* Node.java -- Representation of a RDF node. - Copyright (C) 2005 The University of Sheffield. + Copyright (C) 2005 The University of Sheffield. -This file is part of the CASheW-s editor. + 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 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. + 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 + * 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 Index: src/nongnu/cashews/rdf/Predicate.java =================================================================== RCS file: /cvsroot/cashew-s-editor/cashews/src/nongnu/cashews/rdf/Predicate.java,v retrieving revision 1.1 diff -u -3 -p -u -r1.1 Predicate.java --- src/nongnu/cashews/rdf/Predicate.java 1 Feb 2005 01:01:08 -0000 1.1 +++ src/nongnu/cashews/rdf/Predicate.java 28 Mar 2005 19:18:35 -0000 @@ -1,32 +1,31 @@ /* Predicate.java -- Representation of a RDF predicate. - Copyright (C) 2005 The University of Sheffield. + Copyright (C) 2005 The University of Sheffield. -This file is part of the CASheW-s editor. + 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 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. + 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. + * This interface represents an RDF predicate. A predicate is a URI reference. *

- * + * * @author Andrew John Hughes (address@hidden) * @see RDFURI */ Index: src/nongnu/cashews/rdf/RDFObject.java =================================================================== RCS file: /cvsroot/cashew-s-editor/cashews/src/nongnu/cashews/rdf/RDFObject.java,v retrieving revision 1.1 diff -u -3 -p -u -r1.1 RDFObject.java --- src/nongnu/cashews/rdf/RDFObject.java 1 Feb 2005 01:01:08 -0000 1.1 +++ src/nongnu/cashews/rdf/RDFObject.java 28 Mar 2005 19:18:35 -0000 @@ -1,39 +1,39 @@ /* RDFObject.java -- Representation of a RDF object. - Copyright (C) 2005 The University of Sheffield. + Copyright (C) 2005 The University of Sheffield. -This file is part of the CASheW-s editor. + 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 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. + 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. + * 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 +public interface RDFObject + extends Node { } Index: src/nongnu/cashews/rdf/RDFURI.java =================================================================== RCS file: /cvsroot/cashew-s-editor/cashews/src/nongnu/cashews/rdf/RDFURI.java,v retrieving revision 1.1 diff -u -3 -p -u -r1.1 RDFURI.java --- src/nongnu/cashews/rdf/RDFURI.java 3 Feb 2005 00:39:36 -0000 1.1 +++ src/nongnu/cashews/rdf/RDFURI.java 28 Mar 2005 19:18:35 -0000 @@ -1,22 +1,22 @@ /* RDFURI.java -- Representation of a RDF URI. - Copyright (C) 2005 The University of Sheffield. + Copyright (C) 2005 The University of Sheffield. -This file is part of the CASheW-s editor. + 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 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. + 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; @@ -27,17 +27,17 @@ import java.net.URI; *

* This interface represents an RDF URI. *

- * + * * @author Andrew John Hughes (address@hidden) * @see java.net.URI */ -public class RDFURI +public class RDFURI implements Subject, Predicate, RDFObject { /** * The URI itself. - * + * * @see java.net.URI * @serial the uniform resource identifier. */ Index: src/nongnu/cashews/rdf/Subject.java =================================================================== RCS file: /cvsroot/cashew-s-editor/cashews/src/nongnu/cashews/rdf/Subject.java,v retrieving revision 1.1 diff -u -3 -p -u -r1.1 Subject.java --- src/nongnu/cashews/rdf/Subject.java 1 Feb 2005 01:01:08 -0000 1.1 +++ src/nongnu/cashews/rdf/Subject.java 28 Mar 2005 19:18:35 -0000 @@ -1,40 +1,40 @@ /* Subject.java -- Representation of a RDF subject. - Copyright (C) 2005 The University of Sheffield. + Copyright (C) 2005 The University of Sheffield. -This file is part of the CASheW-s editor. + 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 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. + 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. + * 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 +public interface Subject + extends Node { } Index: src/nongnu/cashews/rdf/Triple.java =================================================================== RCS file: /cvsroot/cashew-s-editor/cashews/src/nongnu/cashews/rdf/Triple.java,v retrieving revision 1.1 diff -u -3 -p -u -r1.1 Triple.java --- src/nongnu/cashews/rdf/Triple.java 1 Feb 2005 01:01:08 -0000 1.1 +++ src/nongnu/cashews/rdf/Triple.java 28 Mar 2005 19:18:35 -0000 @@ -1,22 +1,22 @@ /* Triple.java -- Representation of a RDF triple. - Copyright (C) 2005 The University of Sheffield. + Copyright (C) 2005 The University of Sheffield. -This file is part of the CASheW-s editor. + 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 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. + 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; @@ -25,21 +25,18 @@ import java.io.Serializable; /** *

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

*
    - *
  • a subject, which is a URI - * reference or a blank node.
  • - *
  • a predicate, which is a - * URI reference.
  • - *
  • an object, which is a - * URI reference, literal or blank node.
  • + *
  • a subject , which is a URI reference or a blank node. + *
  • + *
  • a predicate , which is a URI reference.
  • + *
  • an object , which is a URI reference, literal or blank + * node.
  • *
*

- * A set of these triples form a Graph - * object. - * + * A set of these triples form a Graph object. + * * @author Andrew John Hughes (address@hidden) * @see Graph * @see Node @@ -47,13 +44,18 @@ import java.io.Serializable; * @see RDFObject * @see Predicate */ -public class Triple +public class Triple implements Serializable { /** + * Serialization UID for compatability. + */ + private static final long serialVersionUID = -6440582411545169192L; + + /** * The subject of this triple. - * + * * @see Subject * @serial the triple's subject. */ @@ -61,7 +63,7 @@ public class Triple /** * The predicate of this triple. - * + * * @see Predicate * @serial the triple's predicate. */ @@ -69,7 +71,7 @@ public class Triple /** * The object of this triple. - * + * * @see RDFObject * @serial the triple's object. */ Index: src/nongnu/cashews/rdf/Type.java =================================================================== RCS file: src/nongnu/cashews/rdf/Type.java diff -N src/nongnu/cashews/rdf/Type.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/nongnu/cashews/rdf/Type.java 28 Mar 2005 19:18:35 -0000 @@ -0,0 +1,46 @@ +/* Type.java -- Representation of a RDF literal type. + 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 the type of an RDF literal. Implementing type + * classes provide the conversion between the literal and the actual value + * represented, by applying a lexical-to-value mapping. A literal which does + * not map to a value is erroneous, but not synatically invalid. + *

+ * + * @author Andrew John Hughes (address@hidden) + */ +public interface Type +{ + + /** + * Retrieves the actual value of this type instance by applying a lexical to + * value mapping. + * + * @param lexical the lexical representation of the literal. + * @return an Object representing the value. + */ + Object getValue(String lexical); + +} Index: src/nongnu/cashews/rdf/XMLParser.java =================================================================== RCS file: /cvsroot/cashew-s-editor/cashews/src/nongnu/cashews/rdf/XMLParser.java,v retrieving revision 1.1.1.1 diff -u -3 -p -u -r1.1.1.1 XMLParser.java --- src/nongnu/cashews/rdf/XMLParser.java 31 Jan 2005 04:02:18 -0000 1.1.1.1 +++ src/nongnu/cashews/rdf/XMLParser.java 28 Mar 2005 19:18:35 -0000 @@ -1,32 +1,30 @@ /* XMLParser.java -- Parser for RDF in XML form. - Copyright (C) 2005 The University of Sheffield. + Copyright (C) 2005 The University of Sheffield. -This file is part of the CASheW-s editor. + 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 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. + 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 class deals with the parsing - * of RDF in XML form, as defined by the - * RDFXML - * syntax standard. It turns an XML-based - * representation of an RDF graph into a + * This class deals with the parsing of RDF in XML form, as defined by the + * RDFXML syntax + * standard. It turns an XML-based representation of an RDF graph into a * Graph object. * * @author Andrew John Hughes (address@hidden) @@ -34,4 +32,5 @@ package nongnu.cashews.rdf; */ public class XMLParser { + }