diff options
author | David Robillard <d@drobilla.net> | 2007-01-22 05:00:29 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-01-22 05:00:29 +0000 |
commit | aa454620bff8b6c5dcd4e0e379726307ad1918da (patch) | |
tree | fb178d760381f9492039235faa9d610bb5040f2b /src/RDFWriter.cpp | |
parent | ae90063afb7ddabcb505f8390b3b90bc7fea96ca (diff) | |
download | raul-aa454620bff8b6c5dcd4e0e379726307ad1918da.tar.gz raul-aa454620bff8b6c5dcd4e0e379726307ad1918da.tar.bz2 raul-aa454620bff8b6c5dcd4e0e379726307ad1918da.zip |
Created Raul namespace.
git-svn-id: http://svn.drobilla.net/lad/raul@265 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/RDFWriter.cpp')
-rw-r--r-- | src/RDFWriter.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/RDFWriter.cpp b/src/RDFWriter.cpp index 972286d..66b166a 100644 --- a/src/RDFWriter.cpp +++ b/src/RDFWriter.cpp @@ -1,11 +1,11 @@ -/* This file is part of Ingen. Copyright (C) 2006 Dave Robillard. +/* This file is part of Raul. Copyright (C) 2007 Dave Robillard. * - * Ingen is free software; you can redistribute it and/or modify it under the + * Raul is free software; you can redistribute it and/or modify it under the * terms of the GNU General Public License as published by the Free Software * Foundation; either version 2 of the License, or (at your option) any later * version. * - * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY + * Raul is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. * @@ -19,6 +19,9 @@ #define U(x) ((const unsigned char*)(x)) +namespace Raul { + + //static const char* const RDF_LANG = "rdfxml-abbrev"; static const char* const RDF_LANG = "turtle"; @@ -44,7 +47,7 @@ RDFWriter::setup_prefixes() { assert(_serializer); - for (map<string,string>::const_iterator i = _prefixes.begin(); i != _prefixes.end(); ++i) { + for (Namespaces::const_iterator i = _prefixes.begin(); i != _prefixes.end(); ++i) { raptor_serialize_set_namespace(_serializer, raptor_new_uri(U(i->second.c_str())), U(i->first.c_str())); } @@ -56,7 +59,7 @@ RDFWriter::setup_prefixes() string RDFWriter::expand_uri(const string& uri) { - for (map<string,string>::const_iterator i = _prefixes.begin(); i != _prefixes.end(); ++i) + for (Namespaces::const_iterator i = _prefixes.begin(); i != _prefixes.end(); ++i) if (uri.substr(0, i->first.length()+1) == i->first + ":") return i->second + uri.substr(i->first.length()+1); @@ -216,3 +219,7 @@ RDFWriter::write(const RdfId& subject, raptor_free_uri((raptor_uri*)triple.predicate); } + + +} // namespace Raul + |