Changeset: fc36f23a8cd1 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fc36f23a8cd1 Added Files: monetdb5/extras/rdf/rdf.h Removed Files: monetdb5/extras/rdf/10_rdf.mal monetdb5/extras/rdf/rdf.mx Modified Files: monetdb5/extras/rdf/Makefile.ag monetdb5/extras/rdf/rdf_shredder.mx monetdb5/modules/kernel/algebra.mx monetdb5/modules/mal/tokenizer.c monetdb5/modules/mal/tokenizer.h monetdb5/modules/mal/tokenizer.mal sql/backends/monet5/Makefile.ag sql/backends/monet5/sql.mx Branch: default Log Message:
Backed out changeset 6b24cce47d0f Too many changes that we don't want. Duc is going to try to do them again, this time properly. diffs (truncated from 1034 to 300 lines): diff --git a/monetdb5/extras/rdf/10_rdf.mal b/monetdb5/extras/rdf/10_rdf.mal deleted file mode 100644 --- a/monetdb5/extras/rdf/10_rdf.mal +++ /dev/null @@ -1,20 +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://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://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html +# 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 @@ -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-2011 MonetDB B.V. +# Copyright August 2008-2012 MonetDB B.V. # All Rights Reserved. INCLUDES = ../../modules/atoms ../../modules/mal ../../mal \ @@ -24,25 +24,8 @@ INCLUDES = ../../modules/atoms ../../mod MTSAFE -lib__rdf = { +lib_rdf = { + NOINST DIR = libdir/monetdb5 - SOURCES = rdf.mx rdf_shredder.mx - LIBS = ../../tools/libmonetdb5 \ - ../../../gdk/libbat \ - $(MALLOC_LIBS) $(raptor_LIBS) + SOURCES = rdf_shredder.mx rdf.h } - -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 new file mode 100644 --- /dev/null +++ b/monetdb5/extras/rdf/rdf.h @@ -0,0 +1,71 @@ +/* + * 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 deleted file mode 100644 --- a/monetdb5/extras/rdf/rdf.mx +++ /dev/null @@ -1,78 +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://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 leftfetchjoin_sorted ( left:bat[:any_1,:oid], right:bat[:oid,:any_3] ) :bat[:any_1,:any_3] -address ALGleftfetchjoin_sorted -comment "like algebra_leftfetchjoin(), but asserts that the resulting tail column is sorted -- ONLY USE IF YOU ARE SURE OF THIS!!! also requires sorted tail left input" -@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(BAT **graph, 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://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html +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 @@ -13,16 +13,18 @@ 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-2011 MonetDB B.V. +Copyright August 2008-2012 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" @@ -90,15 +92,15 @@ typedef struct parserData { int line; /* locator for errors */ int column; /* locator for errors */ /**GRAPH DATA */ - BAT **graph; /* BATs for the result + BAT *graph[N_GRAPH_BAT]; /* BATs for the result 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; @@ -122,17 +124,17 @@ static void } } -@} - +@ @c @:rdf_parser_handler(fatal)@ _______________________________________________ Checkin-list mailing list [email protected] http://mail.monetdb.org/mailman/listinfo/checkin-list
