From 4038ab95a094b363f1748f3dcb51511a1217475d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 07:40:05 +0200 Subject: Adding upstream version 2.0.16. Signed-off-by: Daniel Baumann --- docs/html/tutorial-querying-functionality.html | 112 +++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 docs/html/tutorial-querying-functionality.html (limited to 'docs/html/tutorial-querying-functionality.html') diff --git a/docs/html/tutorial-querying-functionality.html b/docs/html/tutorial-querying-functionality.html new file mode 100644 index 0000000..70932eb --- /dev/null +++ b/docs/html/tutorial-querying-functionality.html @@ -0,0 +1,112 @@ + + + + +Listing built-in functionality: Raptor RDF Syntax Library Manual + + + + + + + + + + + + + + + + +
+

+Listing built-in functionality

+

+Raptor can be configured and compiled with support for different +lists of parsers and serializers. The list built into the +library can be found by means of +description functions. These take as input an +int counter and return descriptions of the object +at that offset in the list. The return value is a pointer to a +shared, read-only description of the object, or NULL if the counter +has gone too far into the list. +

+
+

Listing Functionality with Descriptions

+ ++++ + + + + + + + + + + + + + + +

Get descriptions of the parser syntaxes

+  const raptor_syntax_description*
+  raptor_world_get_parser_description(raptor_world* world,
+                                      unsigned int counter);
+

Get descriptions of the serializer syntaxes

+  const raptor_syntax_description*
+  raptor_world_get_serializer_description(raptor_world* world,
+                                          unsigned int counter);
+

Get descriptions of options

+
+  raptor_option_description*
+  raptor_world_get_option_description(raptor_world* world,
+                                      const raptor_domain domain,
+                                      const raptor_option option);
+
+

+Call with the appropriate domains for the class such as +RAPTOR_DOMAIN_PARSER, +RAPTOR_DOMAIN_SERIALIZER + etc. See the +raptor_domain +description for the full list. +

+
+
+

These functions can be called directly after creating a +raptor world object with +raptor_new_world(). +This is one way to find a parser (name) by it's MIME Type, the other +is to use the mime_type parameter of the +raptor_new_parser_for_content().

+
+

Example 1. List all parser options using option description

+
+
+  unsigned int i;
+  for(i = 0; i < raptor_option_get_count(); i++) {
+    raptor_option_description* od;
+
+    od = raptor_world_get_option_description(world, RAPTOR_DOMAIN_PARSER, i);
+
+    if(od) {
+      /* do something with od fields such as od->name, od->label */
+    }
+  }
+
+

There are more examples of this usage in the source for the +rapper utility in util/rapper.c. +

+
+
+
+
+ + + \ No newline at end of file -- cgit v1.2.3