Changeset: 7e887ab5b51c for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7e887ab5b51c
Added Files:
        monetdb5/extras/rdf/10_rdf.mal
        monetdb5/extras/rdf/rdf.mx
Removed Files:
        monetdb5/extras/rdf/rdf.h
Modified Files:
        monetdb5/extras/rdf/Makefile.ag
        monetdb5/extras/rdf/rdf_shredder.mx
        sql/backends/monet5/Makefile.ag
Branch: default
Log Message:

Get RDF module upgraded from FORTH (HSP) code.

Make the module compiled successfully on the current monetdb code.


diffs (truncated from 440 to 300 lines):

diff --git a/monetdb5/extras/rdf/10_rdf.mal b/monetdb5/extras/rdf/10_rdf.mal
new file mode 100644
--- /dev/null
+++ b/monetdb5/extras/rdf/10_rdf.mal
@@ -0,0 +1,20 @@
+# The contents of this file are subject to the MonetDB Public License
+# Version 1.1 (the "License"); you may not use this file except in
+# compliance with the License. You may obtain a copy of the License at
+# http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+# License for the specific language governing rights and limitations
+# under the License.
+#
+# The Original Code is the MonetDB Database System.
+#
+# The Initial Developer of the Original Code is CWI.
+# Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
+# Copyright August 2008-2011 MonetDB B.V.
+# All Rights Reserved.
+
+# This loads the MonetDB/RDF module
+include tokenizer;
+include rdf;
diff --git a/monetdb5/extras/rdf/Makefile.ag b/monetdb5/extras/rdf/Makefile.ag
--- a/monetdb5/extras/rdf/Makefile.ag
+++ b/monetdb5/extras/rdf/Makefile.ag
@@ -1,7 +1,7 @@
 # The contents of this file are subject to the MonetDB Public License
 # Version 1.1 (the "License"); you may not use this file except in
 # compliance with the License. You may obtain a copy of the License at
-# http://www.monetdb.org/Legal/MonetDBLicense
+# http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html
 #
 # Software distributed under the License is distributed on an "AS IS"
 # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
@@ -12,7 +12,7 @@
 #
 # The Initial Developer of the Original Code is CWI.
 # Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
-# Copyright August 2008-2012 MonetDB B.V.
+# Copyright August 2008-2011 MonetDB B.V.
 # All Rights Reserved.
 
 INCLUDES = ../../modules/atoms ../../modules/mal ../../mal \
@@ -24,8 +24,25 @@ INCLUDES = ../../modules/atoms ../../mod
 
 MTSAFE
 
-lib_rdf = {
-       NOINST
+lib__rdf = {
        DIR = libdir/monetdb5
-       SOURCES = rdf_shredder.mx rdf.h
+       SOURCES = rdf.mx rdf_shredder.mx
+       LIBS = ../../tools/libmonetdb5 \
+               ../../../gdk/libbat \
+               $(MALLOC_LIBS) $(raptor_LIBS)
 }
+
+headers_mal = {
+       HEADERS = mal
+       DIR = libdir/monetdb5
+       SOURCES = rdf.mx
+}
+
+headers_autoload = {
+       HEADERS = mal
+       DIR = libdir/monetdb5/autoload
+       SOURCES = 10_rdf.mal
+}
+
+#EXTRA_DIST_DIR = Tests
+EXTRA_DIST = 10_rdf.mal
diff --git a/monetdb5/extras/rdf/rdf.h b/monetdb5/extras/rdf/rdf.h
deleted file mode 100644
--- a/monetdb5/extras/rdf/rdf.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * The contents of this file are subject to the MonetDB Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.monetdb.org/Legal/MonetDBLicense
- *
- * Software distributed under the License is distributed on an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific language governing rights and limitations
- * under the License.
- *
- * The Original Code is the MonetDB Database System.
- *
- * The Initial Developer of the Original Code is CWI.
- * Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
- * Copyright August 2008-2012 MonetDB B.V.
- * All Rights Reserved.
- */
-
-/*
- * @f rdf
- * @a L.Sidirourgos
- *
- * @* The RDF module For MonetDB5 (aka. MonetDB/RDF)
- *
- */
-#ifndef _RDF_H_
-#define _RDF_H_
-
-#ifdef WIN32
-#ifndef LIBRDF
-#define rdf_export extern __declspec(dllimport)
-#else
-#define rdf_export extern __declspec(dllexport)
-#endif
-#else
-#define rdf_export extern
-#endif
-
-/* internal debug messages */
-#define _RDF_DEBUG
-
-rdf_export str
-RDFParser(int *retval, str *location, str *graphname, str *schemam);
-
-#define TRIPLE_STORE 1
-#define MLA_STORE    2
-
-#define STORE TRIPLE_STORE /* this should become a compile time option */
-
-#if STORE == TRIPLE_STORE
- typedef enum {
-       S_sort, P_sort, O_sort, /* sorted */
-       P_PO, O_PO, /* spo */
-       P_OP, O_OP, /* sop */
-       S_SO, O_SO, /* pso */
-       S_OS, O_OS, /* pos */
-       S_SP, P_SP, /* osp */
-       S_PS, P_PS, /* ops */
-       MAP_LEX
- } graphBATType;
-#elif STORE == MLA_STORE
- typedef enum {
-       S_sort, P_sort, O_sort,
-       MAP_LEX
- } graphBATType;
-#endif /* STORE */
-
-#define N_GRAPH_BAT (MAP_LEX+1)
-
-#endif /* _RDF_H_ */
diff --git a/monetdb5/extras/rdf/rdf.mx b/monetdb5/extras/rdf/rdf.mx
new file mode 100644
--- /dev/null
+++ b/monetdb5/extras/rdf/rdf.mx
@@ -0,0 +1,79 @@
+@/
+The contents of this file are subject to the MonetDB Public License
+Version 1.1 (the "License"); you may not use this file except in
+compliance with the License. You may obtain a copy of the License at
+http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html
+
+Software distributed under the License is distributed on an "AS IS"
+basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+License for the specific language governing rights and limitations
+under the License.
+
+The Original Code is the MonetDB Database System.
+
+The Initial Developer of the Original Code is CWI.
+Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
+Copyright August 2008-2011 MonetDB B.V.
+All Rights Reserved.
+@
+
+@f rdf
+@a L.Sidirourgos
+
+@* The RDF module For MonetDB5 (aka. MonetDB/RDF)
+
+@mal
+module rdf;
+
+command shred(location:str, graphname:str, schema:str):bat[:void, :bat]
+address RDFParser
+comment "look behind you!"
+
+@h
+#ifndef _RDF_H_
+#define _RDF_H_
+
+#ifdef WIN32
+#ifndef LIBRDF
+#define rdf_export extern __declspec(dllimport)
+#else
+#define rdf_export extern __declspec(dllexport)
+#endif
+#else
+#define rdf_export extern
+#endif
+
+/* internal debug messages */
+#define _RDF_DEBUG
+
+rdf_export str
+RDFParser(int *retval, str *location, str *graphname, str *schemam);
+
+#define TRIPLE_STORE 1
+#define MLA_STORE    2
+
+#define STORE TRIPLE_STORE /* this should become a compile time option */
+
+#if STORE == TRIPLE_STORE
+ typedef enum {
+       S_sort, P_sort, O_sort, /* sorted */
+       P_PO, O_PO, /* spo */
+       P_OP, O_OP, /* sop */
+       S_SO, O_SO, /* pso */
+       S_OS, O_OS, /* pos */
+       S_SP, P_SP, /* osp */
+       S_PS, P_PS, /* ops */
+       MAP_LEX
+ } graphBATType;
+#elif STORE == MLA_STORE
+ typedef enum {
+       S_sort, P_sort, O_sort,
+       MAP_LEX
+ } graphBATType;
+#endif /* STORE */
+
+#define N_GRAPH_BAT (MAP_LEX+1)
+
+#endif /* _RDF_H_ */
+
+@c
diff --git a/monetdb5/extras/rdf/rdf_shredder.mx 
b/monetdb5/extras/rdf/rdf_shredder.mx
--- a/monetdb5/extras/rdf/rdf_shredder.mx
+++ b/monetdb5/extras/rdf/rdf_shredder.mx
@@ -2,7 +2,7 @@
 The contents of this file are subject to the MonetDB Public License
 Version 1.1 (the "License"); you may not use this file except in
 compliance with the License. You may obtain a copy of the License at
-http://www.monetdb.org/Legal/MonetDBLicense
+http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html
 
 Software distributed under the License is distributed on an "AS IS"
 basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
@@ -13,18 +13,16 @@ The Original Code is the MonetDB Databas
 
 The Initial Developer of the Original Code is CWI.
 Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
-Copyright August 2008-2012 MonetDB B.V.
+Copyright August 2008-2011 MonetDB B.V.
 All Rights Reserved.
 @
 
 @f rdf_shredder
+@a L.Sidirourgos
+
+@+ Shredder for RDF Documents
 
 @c
-/*
- * @a L.Sidirourgos
- *
- * @+ Shredder for RDF Documents
- */
 #include "monetdb_config.h"
 #include "mal_exception.h"
 #include "url.h"
@@ -96,11 +94,11 @@ typedef struct parserData {
                                         shredded RDF graph     */
 } parserData;
 
-/*
- * @-
- * The (fatal) errors and warnings produced by the raptor parser are handled
- * by the next three message handler functions.
- */
+@{
+@-
+The (fatal) errors and warnings produced by the raptor parser are handled
+by the next three message handler functions.
+
 @= raptor_exception
 @1->exception++;
 @1->exceptionMsg = @2;
@@ -124,17 +122,17 @@ static void
        }
 }
 
-@
+@}
+
 @c
 @:rdf_parser_handler(fatal)@
 @:rdf_parser_handler(error)@
 @:rdf_parser_handler(warning)@
 
-/*
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to