Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

dts.h

00001 #ifndef _dev_w3_org__2001_blindfold_dts
00002 #define _dev_w3_org__2001_blindfold_dts
00003 
00056 #include "iter.h"
00057 
00058 
00065 typedef struct objref_s objref; /*@}*/        /* workaround doc++ bug */
00067 
00068 
00075 int /* true or false */
00076 objref_known_to_be_equal(objref *a, objref *b);
00077 
00078 
00086 char *    
00087 objref_get_global_names(objref *a, iter *iterator);
00088 
00089 
00090 /*
00091   
00092 OLD COMMENTS
00093 
00094 .  We dont say or care
00095   much about what symbols "are" except that we can manipulate them in
00096   certain ways.   In general, a symbol 
00097 
00098 In general, a symbol
00099   is an immutable pointer to *anything*.  You cannot, in general,
00100   dereference a symbol.  It might denote a chair, a ray of sunlight,
00101   or my mother; our domain of discourse is not limitted
00102 
00103  Each Symbol has zero
00104   or more "global names" (which roughly follow the URI syntax) and may
00105   be known to denote a string of characters.
00106 
00107 
00108 
00109   RDF With Nesting
00110 
00111   This is an RDF API based on quads.  It tries to be plain C, without
00112   introducing all sorts of data-structure abstractions which C does
00113   not handle nicely.
00114 
00115   quads?  rather than just making RDF statements you always make an
00116   RDF statement IN SOME statement set.  The statement sets themselves
00117   are first-class objects -- they can be talked about in other
00118   statement sets.
00119 
00120   Interally, we use a pointer to a struct symbol (aka Symbol) as an
00121   identifier, and a struct symbol contains a list of triples.
00122 
00123   
00124   Do we want hashes of SWID -> Symbol, literal -> Symbol  ?
00125   Yeah, -- local/global/literal.
00126            _:, , data:,
00127 
00128 
00129 
00130   Symbol = Node = Object = Handle = ...
00131 
00132      a pointer to an RDF_Object....
00133 
00134 */
00135 
00136 
00145 void objref_mark_begin();
00151 int objref_is_marked(objref *);
00152 
00159 void objref_mark(objref *);
00160 
00168 void objref_mark_end();
00169 
00170 
00171 
00176 void objref_add(objref *set, objref *subject, objref *predicate, objref *object);
00177 
00182 void objref_include(objref *outer, objref *inner);
00183 
00198 void objref_keep(objref *r);
00205 void objref_release(objref *r);
00206 
00207 /* something like:
00208 typedef void* SSIter;
00209 SSIter iter(Symbol set);
00210 Symbol access(SSIter);
00211 SSIter advance(SSIter);
00212 
00213   What if I used first/last pointers, so include would just
00214   slink it in!   Interesting trick.
00215 
00216 void stream4_to(Symbol source, function, function_arg)
00217            3
00218 
00219 Eh - don't do it!   Just access structures!
00220 
00221 */
00222 
00228 void objref_reify_statement_sets(objref *outer_set, objref *flat_set);
00229 
00236 void objref_datafy(objref *s);
00237 
00241 void objref_genify(objref *s);
00242 
00243 /*   these should probably be in another file   */
00244 
00245 #include <stdio.h>
00246   
00247 
00254 void objref_write_n3(FILE* out, objref *top);
00255 
00257 void objref_write_canonical(FILE* out, objref *top);
00258 
00260 void objref_write_prolog_3(FILE* out, objref *top, char* predicate);
00262 void objref_write_prolog_4(FILE* out, objref *top, char* predicate);
00263 
00265 int objref_count(objref *s);
00266 
00271 objref *objref_new();
00272 
00278 objref *objref_new_local(char *);
00279 
00285 objref *objref_obtain_global(char *global_name);
00286 
00292 objref *objref_obtain_local(char *);
00293 
00299 objref *obtain_literal_utf8(char *);
00300 
00307 void objref_print(FILE *stream, objref *r);
00308 
00309 #endif 

Home to blindfold. This page generated via doxygen 1.2.11.1 Wed Oct 10 16:40:33 2001.