diff options
author | David Robillard <d@drobilla.net> | 2007-01-10 17:41:25 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-01-10 17:41:25 +0000 |
commit | b162a604d0452752c679e31fd6b3f3de0687151c (patch) | |
tree | 50ee3f35b650ef0b8e218a45aa21789a1e886de6 /src/libs/client/RDFWriter.h | |
parent | 641923335b88ddd8ca3df176f42810d8cea30685 (diff) | |
download | ingen-b162a604d0452752c679e31fd6b3f3de0687151c.tar.gz ingen-b162a604d0452752c679e31fd6b3f3de0687151c.tar.bz2 ingen-b162a604d0452752c679e31fd6b3f3de0687151c.zip |
Moved RDFWriter to RAUL.
More work on LADSPA->LV2 converter (use RAUL's RDFWriter now).
git-svn-id: http://svn.drobilla.net/lad/ingen@246 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client/RDFWriter.h')
-rw-r--r-- | src/libs/client/RDFWriter.h | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/src/libs/client/RDFWriter.h b/src/libs/client/RDFWriter.h deleted file mode 100644 index 7bc4b14f..00000000 --- a/src/libs/client/RDFWriter.h +++ /dev/null @@ -1,71 +0,0 @@ -/* This file is part of Ingen. Copyright (C) 2006 Dave Robillard. - * - * Ingen 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 - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef RDFWRITER_H -#define RDFWRITER_H - -#include <stdexcept> -#include <string> -#include <map> -#include <raptor.h> -#include "raul/Atom.h" -using std::string; using std::map; - - -class RdfId { -public: - enum Type { ANONYMOUS, RESOURCE }; - - RdfId(Type t, const string& s) : _type(t), _string(s) {} - - Type type() const { return _type; } - const string& to_string() const { return _string; } - -private: - Type _type; - string _string; ///< URI or blank node ID, depending on _type -}; - - -class RDFWriter { -public: - RDFWriter(); - - void setup_prefixes(); - string expand_uri(const string& uri); - - void start_to_filename(const string& filename) throw (std::logic_error); - void start_to_string() throw (std::logic_error); - string finish() throw (std::logic_error); - - bool serialization_in_progress() { return (_serializer != NULL); } - - void write(const RdfId& subject, - const RdfId& predicate, - const RdfId& object); - - void write(const RdfId& subject, - const RdfId& predicate, - const Atom& object); - -private: - raptor_serializer* _serializer; - unsigned char* _string_output; - map<string, string> _prefixes; -}; - - -#endif // RDFWRITER_H |