diff options
author | David Robillard <d@drobilla.net> | 2007-11-29 03:56:23 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-11-29 03:56:23 +0000 |
commit | 813d62225110aa832e812873965c3a4fb95161fb (patch) | |
tree | 9b116ccbb6489e49da9cd402aff1bfbacb3b7db0 /raul | |
parent | cb4711a1ec48c9973c858ecd3355fa8ab76eda46 (diff) | |
download | raul-813d62225110aa832e812873965c3a4fb95161fb.tar.gz raul-813d62225110aa832e812873965c3a4fb95161fb.tar.bz2 raul-813d62225110aa832e812873965c3a4fb95161fb.zip |
Add base URI support to RDF model (ability to write pretty <> in Turtle with model.base()).
git-svn-id: http://svn.drobilla.net/lad/raul@922 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'raul')
-rw-r--r-- | raul/RDFModel.hpp | 4 | ||||
-rw-r--r-- | raul/RDFNode.hpp | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/raul/RDFModel.hpp b/raul/RDFModel.hpp index 40d524f..fb7350c 100644 --- a/raul/RDFModel.hpp +++ b/raul/RDFModel.hpp @@ -39,6 +39,9 @@ public: Model(World& world); Model(World& world, const Glib::ustring& uri, Glib::ustring base_uri=""); ~Model(); + + void set_base_uri(const Glib::ustring& uri); + const Node& base_uri() const { return _base; } void serialise_to_file_handle(FILE* fd); void serialise_to_file(const Glib::ustring& uri); @@ -68,6 +71,7 @@ private: void setup_prefixes(); World& _world; + Node _base; librdf_storage* _storage; librdf_model* _model; librdf_serializer* _serialiser; diff --git a/raul/RDFNode.hpp b/raul/RDFNode.hpp index cdc103b..48e9b6d 100644 --- a/raul/RDFNode.hpp +++ b/raul/RDFNode.hpp @@ -51,6 +51,7 @@ public: World* world() const { return _world; } librdf_node* get_node() const { return _node; } + librdf_uri* get_uri() const { return librdf_node_get_uri(_node); } operator bool() const { return (_world != NULL && _node != NULL); } |