incubator-triplesoup-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leosim...@apache.org
Subject svn commit: r528394 [11/35] - in /incubator/triplesoup/donations/TRIPLES-3-RDFStore: ./ dbms/ dbms/client/ dbms/client/t/ dbms/dbmsproxy/ dbms/deamon/ dbms/doc/ dbms/include/ dbms/libdbms/ dbms/utils/ doc/ include/ lib/ lib/DBD/ lib/RDFStore/ lib/RDFSt...
Date Fri, 13 Apr 2007 08:56:16 GMT
Added: incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/rdfstore_log.h
URL: http://svn.apache.org/viewvc/incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/rdfstore_log.h?view=auto&rev=528394
==============================================================================
--- incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/rdfstore_log.h (added)
+++ incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/rdfstore_log.h Fri Apr 13 01:56:01
2007
@@ -0,0 +1,117 @@
+/*
+##############################################################################
+# 	Copyright (c) 2000-2006 All rights reserved
+# 	Alberto Reggiori <areggiori@webweaving.org>
+#	Dirk-Willem van Gulik <dirkx@webweaving.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer. 
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in
+#    the documentation and/or other materials provided with the
+#    distribution.
+#
+# 3. The end-user documentation included with the redistribution,
+#    if any, must include the following acknowledgment:
+#       "This product includes software developed by 
+#        Alberto Reggiori <areggiori@webweaving.org> and
+#        Dirk-Willem van Gulik <dirkx@webweaving.org>."
+#    Alternately, this acknowledgment may appear in the software itself,
+#    if and wherever such third-party acknowledgments normally appear.
+#
+# 4. All advertising materials mentioning features or use of this software
+#    must display the following acknowledgement:
+#    This product includes software developed by the University of
+#    California, Berkeley and its contributors. 
+#
+# 5. Neither the name of the University nor the names of its contributors
+#    may be used to endorse or promote products derived from this software
+#    without specific prior written permission.
+#
+# 6. Products derived from this software may not be called "RDFStore"
+#    nor may "RDFStore" appear in their names without prior written
+#    permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+# OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# ====================================================================
+#
+# This software consists of work developed by Alberto Reggiori and 
+# Dirk-Willem van Gulik. The RDF specific part is based based on public 
+# domain software written at the Stanford University Database Group by 
+# Sergey Melnik. For more information on the RDF API Draft work, 
+# please see <http://www-db.stanford.edu/~melnik/rdf/api.html>
+# The DBMS TCP/IP server part is based on software originally written
+# by Dirk-Willem van Gulik for Web Weaving Internet Engineering m/v Enschede,
+# The Netherlands.
+#
+##############################################################################
+#
+# $Id: rdfstore_log.h,v 1.6 2006/06/19 10:10:23 areggiori Exp $
+#
+*/
+
+#ifndef _H_RDFSTORE_LOG
+#define _H_RDFSTORE_LOG
+
+#ifndef A
+#define log(x)	{ printf x; printf("\n"); }
+#define plog(x)	{ printf x; perror("Reason:"); }
+#define pdie(x) { printf x; perror(NULL);exit(1); }
+#else
+#define log(x)	{ }
+#define plog(x)	{ }
+#define pdie(x) { printf x; perror(NULL);exit(1); }
+#endif
+
+#ifdef RDFSTORE_DEBUG_MALLOC
+void * rdfstore_log_debug_malloc( size_t len, char * file, int line); 
+void rdfstore_log_debug_free( void * addr, char * file, int line );
+void rdfstore_log_debug_malloc_dump();
+
+#define RDFSTORE_MALLOC(x) rdfstore_log_debug_malloc(x,__FILE__,__LINE__)
+#define RDFSTORE_FREE(x) rdfstore_log_debug_free(x,__FILE__,__LINE__)
+#else
+#define RDFSTORE_MALLOC(x) malloc(x)
+#define RDFSTORE_FREE(x)   free(x)
+#endif
+
+#if defined(BSD)
+#define _HAS_TIME_T
+#define _HAS_SENSIBLE_SPRINTF
+#endif
+
+#if defined(RDFSTORE_PLATFORM_SOLARIS) || defined(RDFSTORE_PLATFORM_CYGWIN) /* SOLARIS or
Cygwin */
+#define _HAS_TIME_T
+#define _HAS_SENSIBLE_SPRINTF
+#endif
+
+#if defined(_HAS_TIMESPEC)
+#define TIMESPEC struct timespec
+#endif
+
+#if defined(_HAS_TIMESTRUC_T)
+#define TIMESPEC timestruc_t
+#endif
+
+#if defined(_HAS_TIME_T)
+#define TIMESPEC time_t
+#endif
+
+#endif

Added: incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/rdfstore_ms.h
URL: http://svn.apache.org/viewvc/incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/rdfstore_ms.h?view=auto&rev=528394
==============================================================================
--- incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/rdfstore_ms.h (added)
+++ incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/rdfstore_ms.h Fri Apr 13 01:56:01
2007
@@ -0,0 +1,142 @@
+/*
+##############################################################################
+# 	Copyright (c) 2000-2006 All rights reserved
+# 	Alberto Reggiori <areggiori@webweaving.org>
+#	Dirk-Willem van Gulik <dirkx@webweaving.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer. 
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in
+#    the documentation and/or other materials provided with the
+#    distribution.
+#
+# 3. The end-user documentation included with the redistribution,
+#    if any, must include the following acknowledgment:
+#       "This product includes software developed by 
+#        Alberto Reggiori <areggiori@webweaving.org> and
+#        Dirk-Willem van Gulik <dirkx@webweaving.org>."
+#    Alternately, this acknowledgment may appear in the software itself,
+#    if and wherever such third-party acknowledgments normally appear.
+#
+# 4. All advertising materials mentioning features or use of this software
+#    must display the following acknowledgement:
+#    This product includes software developed by the University of
+#    California, Berkeley and its contributors. 
+#
+# 5. Neither the name of the University nor the names of its contributors
+#    may be used to endorse or promote products derived from this software
+#    without specific prior written permission.
+#
+# 6. Products derived from this software may not be called "RDFStore"
+#    nor may "RDFStore" appear in their names without prior written
+#    permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+# OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# ====================================================================
+#
+# This software consists of work developed by Alberto Reggiori and 
+# Dirk-Willem van Gulik. The RDF specific part is based based on public 
+# domain software written at the Stanford University Database Group by 
+# Sergey Melnik. For more information on the RDF API Draft work, 
+# please see <http://www-db.stanford.edu/~melnik/rdf/api.html>
+# The DBMS TCP/IP server part is based on software originally written
+# by Dirk-Willem van Gulik for Web Weaving Internet Engineering m/v Enschede,
+# The Netherlands.
+#
+##############################################################################
+#
+*/
+
+#ifndef _H_RDFSTORE_MS
+#define _H_RDFSTORE_MS
+
+typedef enum {
+  RDFSTORE_MS_RDF,
+  RDFSTORE_MS_RDFS,
+  RDFSTORE_MS_RSS,
+  RDFSTORE_MS_DAML,
+  RDFSTORE_MS_FOAF,
+  RDFSTORE_MS_OWL,
+  RDFSTORE_MS_DC,
+  RDFSTORE_MS_DCQ,
+  RDFSTORE_MS_XSD,
+  RDFSTORE_MS_RDFSTORE_CONTEXTS,
+
+  RDFSTORE_MS_LAST = RDFSTORE_MS_RDFSTORE_CONTEXTS
+} rdfstore_ms_xmlns;
+
+static const char* rdfstore_ms_prefix[RDFSTORE_MS_LAST+1]={
+	"rdf",
+	"rdfs",
+	"rss",
+	"daml",
+	"foaf",
+	"owl",
+	"dc",
+	"dcq",
+	"xsd",
+	"rdfstore"
+};
+
+static const char* rdfstore_ms_uri[RDFSTORE_MS_LAST+1]={
+	"http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+	"http://www.w3.org/2000/01/rdf-schema#",
+	"http://purl.org/rss/1.0/",
+	"http://www.daml.org/2001/03/daml+oil#",
+	"http://xmlns.com/foaf/0.1/",
+	"http://www.w3.org/2002/07/owl#",
+	"http://purl.org/dc/elements/1.1/",
+	"http://purl.org/dc/terms/",
+	"http://www.w3.org/2001/XMLSchema#",
+	"http://rdfstore.sourceforge.net/contexts/",
+};
+
+#define RDFSTORE_MS_RDF_PREFIX rdfstore_ms_prefix[RDFSTORE_MS_RDF]
+#define RDFSTORE_MS_RDFS_PREFIX rdfstore_ms_prefix[RDFSTORE_MS_RDFS]
+#define RDFSTORE_MS_RSS_PREFIX rdfstore_ms_prefix[RDFSTORE_MS_RSS]
+#define RDFSTORE_MS_DAML_PREFIX rdfstore_ms_prefix[RDFSTORE_MS_DAML]
+#define RDFSTORE_MS_FOAF_PREFIX rdfstore_ms_prefix[RDFSTORE_MS_FOAF]
+#define RDFSTORE_MS_OWL_PREFIX rdfstore_ms_prefix[RDFSTORE_MS_OWL]
+#define RDFSTORE_MS_DC_PREFIX rdfstore_ms_prefix[RDFSTORE_MS_DC]
+#define RDFSTORE_MS_DCQ_PREFIX rdfstore_ms_prefix[RDFSTORE_MS_DCQ]
+#define RDFSTORE_MS_XSD_PREFIX rdfstore_ms_prefix[RDFSTORE_MS_XSD]
+#define RDFSTORE_MS_RDFSTORE_CONTEXTS_PREFIX rdfstore_ms_prefix[RDFSTORE_MS_RDFSTORE_CONTEXTS]
+
+#define RDFSTORE_MS_RDF_URI rdfstore_ms_uri[RDFSTORE_MS_RDF]
+#define RDFSTORE_MS_RDFS_URI rdfstore_ms_uri[RDFSTORE_MS_RDFS]
+#define RDFSTORE_MS_RSS_URI rdfstore_ms_uri[RDFSTORE_MS_RSS]
+#define RDFSTORE_MS_DAML_URI rdfstore_ms_uri[RDFSTORE_MS_DAML]
+#define RDFSTORE_MS_FOAF_URI rdfstore_ms_uri[RDFSTORE_MS_FOAF]
+#define RDFSTORE_MS_OWL_URI rdfstore_ms_uri[RDFSTORE_MS_OWL]
+#define RDFSTORE_MS_DC_URI rdfstore_ms_uri[RDFSTORE_MS_DC]
+#define RDFSTORE_MS_DCQ_URI rdfstore_ms_uri[RDFSTORE_MS_DCQ]
+#define RDFSTORE_MS_XSD_URI rdfstore_ms_uri[RDFSTORE_MS_XSD]
+#define RDFSTORE_MS_RDFSTORE_CONTEXTS_URI rdfstore_ms_uri[RDFSTORE_MS_RDFSTORE_CONTEXTS]
+
+#define RDFSTORE_MS_XSD_STRING     "http://www.w3.org/2001/XMLSchema#string"
+#define RDFSTORE_MS_XSD_INTEGER    "http://www.w3.org/2001/XMLSchema#integer"
+#define RDFSTORE_MS_XSD_DECIMAL    "http://www.w3.org/2001/XMLSchema#decimal"
+#define RDFSTORE_MS_XSD_FLOAT      "http://www.w3.org/2001/XMLSchema#float"
+#define RDFSTORE_MS_XSD_DOUBLE     "http://www.w3.org/2001/XMLSchema#double"
+#define RDFSTORE_MS_XSD_DATE       "http://www.w3.org/2001/XMLSchema#date"
+#define RDFSTORE_MS_XSD_DATETIME   "http://www.w3.org/2001/XMLSchema#dateTime"
+
+#endif

Added: incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/rdfstore_serializer.h
URL: http://svn.apache.org/viewvc/incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/rdfstore_serializer.h?view=auto&rev=528394
==============================================================================
--- incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/rdfstore_serializer.h (added)
+++ incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/rdfstore_serializer.h Fri Apr
13 01:56:01 2007
@@ -0,0 +1,107 @@
+/*
+##############################################################################
+# 	Copyright (c) 2000-2006 All rights reserved
+# 	Alberto Reggiori <areggiori@webweaving.org>
+#	Dirk-Willem van Gulik <dirkx@webweaving.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer. 
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in
+#    the documentation and/or other materials provided with the
+#    distribution.
+#
+# 3. The end-user documentation included with the redistribution,
+#    if any, must include the following acknowledgment:
+#       "This product includes software developed by 
+#        Alberto Reggiori <areggiori@webweaving.org> and
+#        Dirk-Willem van Gulik <dirkx@webweaving.org>."
+#    Alternately, this acknowledgment may appear in the software itself,
+#    if and wherever such third-party acknowledgments normally appear.
+#
+# 4. All advertising materials mentioning features or use of this software
+#    must display the following acknowledgement:
+#    This product includes software developed by the University of
+#    California, Berkeley and its contributors. 
+#
+# 5. Neither the name of the University nor the names of its contributors
+#    may be used to endorse or promote products derived from this software
+#    without specific prior written permission.
+#
+# 6. Products derived from this software may not be called "RDFStore"
+#    nor may "RDFStore" appear in their names without prior written
+#    permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+# OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# ====================================================================
+#
+# This software consists of work developed by Alberto Reggiori and 
+# Dirk-Willem van Gulik. The RDF specific part is based based on public 
+# domain software written at the Stanford University Database Group by 
+# Sergey Melnik. For more information on the RDF API Draft work, 
+# please see <http://www-db.stanford.edu/~melnik/rdf/api.html>
+# The DBMS TCP/IP server part is based on software originally written
+# by Dirk-Willem van Gulik for Web Weaving Internet Engineering m/v Enschede,
+# The Netherlands.
+#
+##############################################################################
+#
+# $Id: rdfstore_serializer.h,v 1.4 2006/06/19 10:10:23 areggiori Exp $
+#
+*/
+
+#ifndef _H_RDFSTORE_SERIALIZER
+#define _H_RDFSTORE_SERIALIZER
+
+#include "rdfstore.h"
+
+/* some RDF concepts */
+#define RDF_SYNTAX_NS "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+#define RDF_SCHEMA_NS "http://www.w3.org/2000/01/rdf-schema#"
+#define XMLSCHEMA_prefix "xml"
+#define XMLSCHEMA "http://www.w3.org/XML/1998/namespace"
+#define XMLNS "xmlns"
+#define RDFMS_type "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
+#define RDFMS_predicate "http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate"
+#define RDFMS_subject "http://www.w3.org/1999/02/22-rdf-syntax-ns#subject"
+#define RDFMS_object "http://www.w3.org/1999/02/22-rdf-syntax-ns#object"
+#define RDFMS_Statement "http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement"
+
+char * rdfstore_get_localname( char * uri );
+
+int rdfstore_get_namespace( char * uri ); /* returns the size of the namespace part (0 is
empty) */
+
+int rdfstore_is_xml_name( char * name_char );
+
+int rdfstore_statement_getLabel(
+	RDF_Statement   * statement,
+	char * label
+	);
+
+char * rdfstore_ntriples_statement (
+        RDF_Statement   * statement,
+        RDF_Node	* given_context
+	);
+
+char * rdfstore_ntriples_node ( 
+        RDF_Node	* node
+	);
+
+#endif

Added: incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/rdfstore_utf8.h
URL: http://svn.apache.org/viewvc/incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/rdfstore_utf8.h?view=auto&rev=528394
==============================================================================
--- incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/rdfstore_utf8.h (added)
+++ incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/rdfstore_utf8.h Fri Apr 13 01:56:01
2007
@@ -0,0 +1,107 @@
+/*
+##############################################################################
+# 	Copyright (c) 2000-2006 All rights reserved
+# 	Alberto Reggiori <areggiori@webweaving.org>
+#	Dirk-Willem van Gulik <dirkx@webweaving.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer. 
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in
+#    the documentation and/or other materials provided with the
+#    distribution.
+#
+# 3. The end-user documentation included with the redistribution,
+#    if any, must include the following acknowledgment:
+#       "This product includes software developed by 
+#        Alberto Reggiori <areggiori@webweaving.org> and
+#        Dirk-Willem van Gulik <dirkx@webweaving.org>."
+#    Alternately, this acknowledgment may appear in the software itself,
+#    if and wherever such third-party acknowledgments normally appear.
+#
+# 4. All advertising materials mentioning features or use of this software
+#    must display the following acknowledgement:
+#    This product includes software developed by the University of
+#    California, Berkeley and its contributors. 
+#
+# 5. Neither the name of the University nor the names of its contributors
+#    may be used to endorse or promote products derived from this software
+#    without specific prior written permission.
+#
+# 6. Products derived from this software may not be called "RDFStore"
+#    nor may "RDFStore" appear in their names without prior written
+#    permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+# OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# ====================================================================
+#
+# This software consists of work developed by Alberto Reggiori and 
+# Dirk-Willem van Gulik. The RDF specific part is based based on public 
+# domain software written at the Stanford University Database Group by 
+# Sergey Melnik. For more information on the RDF API Draft work, 
+# please see <http://www-db.stanford.edu/~melnik/rdf/api.html>
+# The DBMS TCP/IP server part is based on software originally written
+# by Dirk-Willem van Gulik for Web Weaving Internet Engineering m/v Enschede,
+# The Netherlands.
+#
+##############################################################################
+#
+# $Id: rdfstore_utf8.h,v 1.5 2006/06/19 10:10:23 areggiori Exp $
+#
+*/
+
+#ifndef _H_RDFSTORE_UTF8
+#define _H_RDFSTORE_UTF8
+
+#define RDFSTORE_UTF8_MAXLEN 7
+#define RDFSTORE_UTF8_MAXLEN_FOLD (RDFSTORE_UTF8_MAXLEN*3) /* up to three times bigger when
case-folded */
+
+int rdfstore_utf8_cp_to_utf8(
+	unsigned long c, 
+	int * len, 
+	unsigned char * outbuff
+	);
+
+int rdfstore_utf8_utf8_to_cp(
+        int inlen,
+        unsigned char * inbuff,
+        unsigned long * cp
+        );
+
+int rdfstore_utf8_is_utf8(
+        unsigned char * bytes,
+        int * len
+        );
+
+int rdfstore_utf8_string_to_utf8(
+	int insize,
+        unsigned char * in,
+        int * outsize,
+        unsigned char * out
+	);
+
+int rdfstore_utf8_string_to_utf8_foldedcase(
+	int insize,
+        unsigned char * in,
+        int * outsize,
+        unsigned char * out
+	);
+
+#endif

Added: incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/rdfstore_xsd.h
URL: http://svn.apache.org/viewvc/incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/rdfstore_xsd.h?view=auto&rev=528394
==============================================================================
--- incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/rdfstore_xsd.h (added)
+++ incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/rdfstore_xsd.h Fri Apr 13 01:56:01
2007
@@ -0,0 +1,141 @@
+/*
+##############################################################################
+# 	Copyright (c) 2000-2006 All rights reserved
+# 	Alberto Reggiori <areggiori@webweaving.org>
+#	Dirk-Willem van Gulik <dirkx@webweaving.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer. 
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in
+#    the documentation and/or other materials provided with the
+#    distribution.
+#
+# 3. The end-user documentation included with the redistribution,
+#    if any, must include the following acknowledgment:
+#       "This product includes software developed by 
+#        Alberto Reggiori <areggiori@webweaving.org> and
+#        Dirk-Willem van Gulik <dirkx@webweaving.org>."
+#    Alternately, this acknowledgment may appear in the software itself,
+#    if and wherever such third-party acknowledgments normally appear.
+#
+# 4. All advertising materials mentioning features or use of this software
+#    must display the following acknowledgement:
+#    This product includes software developed by the University of
+#    California, Berkeley and its contributors. 
+#
+# 5. Neither the name of the University nor the names of its contributors
+#    may be used to endorse or promote products derived from this software
+#    without specific prior written permission.
+#
+# 6. Products derived from this software may not be called "RDFStore"
+#    nor may "RDFStore" appear in their names without prior written
+#    permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+# OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# ====================================================================
+#
+# This software consists of work developed by Alberto Reggiori and 
+# Dirk-Willem van Gulik. The RDF specific part is based based on public 
+# domain software written at the Stanford University Database Group by 
+# Sergey Melnik. For more information on the RDF API Draft work, 
+# please see <http://www-db.stanford.edu/~melnik/rdf/api.html>
+# The DBMS TCP/IP server part is based on software originally written
+# by Dirk-Willem van Gulik for Web Weaving Internet Engineering m/v Enschede,
+# The Netherlands.
+#
+##############################################################################
+#
+*/
+
+#ifndef _H_RDFSTORE_XSD
+#define _H_RDFSTORE_XSD
+
+#include <sys/types.h>
+#include <sys/time.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <string.h>
+#include <assert.h>
+
+/* see http://www.w3.org/TR/xmlschema-2/ */
+
+typedef enum {
+  RDFSTORE_XSD_STRING,
+  RDFSTORE_XSD_INTEGER,
+  RDFSTORE_XSD_DECIMAL,
+  RDFSTORE_XSD_FLOAT,
+  RDFSTORE_XSD_DOUBLE,
+  RDFSTORE_XSD_DATE,
+  RDFSTORE_XSD_DATETIME,
+
+  RDFSTORE_XSD_LAST = RDFSTORE_XSD_DATETIME
+} rdfstore_xsd;
+
+#define RDFSTORE_XSD_BAD_DATE (time_t)0
+
+static const char* rdfstore_xsd_format[RDFSTORE_XSD_LAST+1]={
+	"%s",
+	"%ld",
+	"%f",
+	"%f",
+	"%f",
+	"%Y-%m-%d",
+	"%Y-%m-%dT%H:%M:%SZ"
+	};
+
+#define RDFSTORE_XSD_STRING_FORMAT     rdfstore_xsd_format[RDFSTORE_XSD_STRING]
+#define RDFSTORE_XSD_INTEGER_FORMAT    rdfstore_xsd_format[RDFSTORE_XSD_INTEGER]
+#define RDFSTORE_XSD_DECIMAL_FORMAT    rdfstore_xsd_format[RDFSTORE_XSD_DECIMAL]
+#define RDFSTORE_XSD_FLOAT_FORMAT      rdfstore_xsd_format[RDFSTORE_XSD_FLOAT]
+#define RDFSTORE_XSD_DOUBLE_FORMAT     rdfstore_xsd_format[RDFSTORE_XSD_DOUBLE]
+#define RDFSTORE_XSD_DATE_FORMAT       rdfstore_xsd_format[RDFSTORE_XSD_DATE]
+#define RDFSTORE_XSD_DATETIME_FORMAT   rdfstore_xsd_format[RDFSTORE_XSD_DATETIME]
+
+#define RDFSTORE_XSD_INTEGER_FORMAT_SIZE   80
+#define RDFSTORE_XSD_DECIMAL_FORMAT_SIZE   80
+#define RDFSTORE_XSD_FLOAT_FORMAT_SIZE     80
+#define RDFSTORE_XSD_DOUBLE_FORMAT_SIZE    80
+#define RDFSTORE_XSD_DATE_FORMAT_SIZE      80
+#define RDFSTORE_XSD_DATETIME_FORMAT_SIZE  80
+
+void rdfstore_xsd_serialize_string( const char * value, char * result );
+int rdfstore_xsd_deserialize_string( const char * string, char * val );
+
+void rdfstore_xsd_serialize_integer( const long value, char * result );
+int rdfstore_xsd_deserialize_integer( const char * string, long * val );
+
+void rdfstore_xsd_serialize_decimal( const double value, char * result );
+int rdfstore_xsd_deserialize_decimal( const char * string, double * val );
+
+void rdfstore_xsd_serialize_float( const float value, char * result );
+int rdfstore_xsd_deserialize_float( const char * string, float * val );
+
+void rdfstore_xsd_serialize_double( const double value, char * result );
+int rdfstore_xsd_deserialize_double( const char * string, double * val );
+
+void rdfstore_xsd_serialize_date( const struct tm value, char * result );
+int rdfstore_xsd_deserialize_date( const char * string, struct tm * val );
+
+void rdfstore_xsd_serialize_dateTime( const struct tm value, char * result );
+int rdfstore_xsd_deserialize_dateTime( const char * string, struct tm * val );
+
+#endif

Added: incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/sflcomp.h
URL: http://svn.apache.org/viewvc/incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/sflcomp.h?view=auto&rev=528394
==============================================================================
--- incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/sflcomp.h (added)
+++ incubator/triplesoup/donations/TRIPLES-3-RDFStore/include/sflcomp.h Fri Apr 13 01:56:01
2007
@@ -0,0 +1,57 @@
+/*  ----------------------------------------------------------------<Prolog>-
+    Name:       sflcomp.h
+    Title:      Compression functions
+    Package:    Standard Function Library (SFL)
+
+    Written:    1991/05/20  iMatix SFL project team <sfl@imatix.com>
+    Revised:    1997/09/08
+
+    Synopsis:   Various compression/decompression functions.  The LZ-type
+                algorith (LZRW1/KH) was originally written by Kurt Haenen
+                <ghgaea8@blekul11> and made portable by P. Hintjens. This
+                is a reasonable LZ/RLE algorithm, very fast, but about 30%
+                less efficient than a ZIP-type algorithm in terms of space.
+                The RLE algorithms are better suited to compressing sparse
+                data.  The nulls variant is specifically tuned to data that
+                consists mostly of binary zeroes.  The bits variant is
+                tuned for compressing sparse bitmaps.
+
+    Copyright:  Copyright (c) 1996-2000 iMatix Corporation
+    License:    This is free software; you can redistribute it and/or modify
+                it under the terms of the SFL License Agreement as provided
+                in the file LICENSE.TXT.  This software is distributed in
+                the hope that it will be useful, but without any warranty.
+ ------------------------------------------------------------------</Prolog>-*/
+
+#include <stdio.h>
+
+#ifndef SFLCOMP_INCLUDED               /*  Allow multiple inclusions        */
+#define SFLCOMP_INCLUDED
+
+typedef unsigned int	Bool;           /*  Boolean TRUE/FALSE value         */
+typedef unsigned char   byte;           /*  Single unsigned byte = 8 bits    */
+typedef unsigned int	word;           /*  Alternative for double-byte      */
+
+#define TRUE (1)
+#define FALSE (0)
+
+/*  Function prototypes                                                      */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+word compress_block (const byte *source, byte *dest, word source_size);
+word expand_block   (const byte *source, byte *dest, word source_size);
+word compress_rle   (      byte *source, byte *dest, word source_size);
+word expand_rle     (const byte *source, byte *dest, word source_size);
+word compress_nulls (      byte *source, byte *dest, word source_size);
+word expand_nulls   (const byte *source, byte *dest, word source_size);
+word compress_bits  (      byte *source, byte *dest, word source_size);
+word expand_bits    (const byte *source, byte *dest, word source_size);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif



Mime
View raw message