1 /*
2 ##############################################################################
3 # 	Copyright (c) 2000-2006 All rights reserved
4 # 	Alberto Reggiori <areggiori@webweaving.org>
5 #	Dirk-Willem van Gulik <dirkx@webweaving.org>
6 #
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted provided that the following conditions
9 # are met:
10 #
11 # 1. Redistributions of source code must retain the above copyright
12 #    notice, this list of conditions and the following disclaimer.
13 #
14 # 2. Redistributions in binary form must reproduce the above copyright
15 #    notice, this list of conditions and the following disclaimer in
16 #    the documentation and/or other materials provided with the
17 #    distribution.
18 #
19 # 3. The end-user documentation included with the redistribution,
20 #    if any, must include the following acknowledgment:
21 #       "This product includes software developed by
22 #        Alberto Reggiori <areggiori@webweaving.org> and
23 #        Dirk-Willem van Gulik <dirkx@webweaving.org>."
24 #    Alternately, this acknowledgment may appear in the software itself,
25 #    if and wherever such third-party acknowledgments normally appear.
26 #
27 # 4. All advertising materials mentioning features or use of this software
28 #    must display the following acknowledgement:
29 #    This product includes software developed by the University of
30 #    California, Berkeley and its contributors.
31 #
32 # 5. Neither the name of the University nor the names of its contributors
33 #    may be used to endorse or promote products derived from this software
34 #    without specific prior written permission.
35 #
36 # 6. Products derived from this software may not be called "RDFStore"
37 #    nor may "RDFStore" appear in their names without prior written
38 #    permission.
39 #
40 # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
41 # ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
42 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
43 # PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
44 # FOR ANY DIRECT, INDIRECT, INCIDENTAL,
45 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
46 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
47 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
49 # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
50 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
51 # OF THE POSSIBILITY OF SUCH DAMAGE.
52 #
53 # ====================================================================
54 #
55 # This software consists of work developed by Alberto Reggiori and
56 # Dirk-Willem van Gulik. The RDF specific part is based based on public
57 # domain software written at the Stanford University Database Group by
58 # Sergey Melnik. For more information on the RDF API Draft work,
59 # please see <http://www-db.stanford.edu/~melnik/rdf/api.html>
60 # The DBMS TCP/IP server part is based on software originally written
61 # by Dirk-Willem van Gulik for Web Weaving Internet Engineering m/v Enschede,
62 # The Netherlands.
63 #
64 ##############################################################################
65 #
66 # $Id: rdfstore_serializer.h,v 1.4 2006/06/19 10:10:23 areggiori Exp $
67 #
68 */
69 
70 #ifndef _H_RDFSTORE_SERIALIZER
71 #define _H_RDFSTORE_SERIALIZER
72 
73 #include "rdfstore.h"
74 
75 /* some RDF concepts */
76 #define RDF_SYNTAX_NS "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
77 #define RDF_SCHEMA_NS "http://www.w3.org/2000/01/rdf-schema#"
78 #define XMLSCHEMA_prefix "xml"
79 #define XMLSCHEMA "http://www.w3.org/XML/1998/namespace"
80 #define XMLNS "xmlns"
81 #define RDFMS_type "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
82 #define RDFMS_predicate "http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate"
83 #define RDFMS_subject "http://www.w3.org/1999/02/22-rdf-syntax-ns#subject"
84 #define RDFMS_object "http://www.w3.org/1999/02/22-rdf-syntax-ns#object"
85 #define RDFMS_Statement "http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement"
86 
87 char * rdfstore_get_localname( char * uri );
88 
89 int rdfstore_get_namespace( char * uri ); /* returns the size of the namespace part (0 is empty) */
90 
91 int rdfstore_is_xml_name( char * name_char );
92 
93 int rdfstore_statement_getLabel(
94 	RDF_Statement   * statement,
95 	char * label
96 	);
97 
98 char * rdfstore_ntriples_statement (
99         RDF_Statement   * statement,
100         RDF_Node	* given_context
101 	);
102 
103 char * rdfstore_ntriples_node (
104         RDF_Node	* node
105 	);
106 
107 #endif
108