Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkRdfStore.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MITKRDFSTORE_H
18 #define MITKRDFSTORE_H
19 
20 #include <MitkRDFExports.h>
21 #include <map>
22 #include <list>
23 
24 #include "mitkRdfTriple.h"
25 #include <mitkCommon.h>
26 
27 namespace mitk {
28  class RdfStorePrivate;
29 
33  class MITKRDF_EXPORT RdfStore
34  {
35  public:
36 
37  typedef std::map<std::string, std::list<RdfNode> > ResultMap;
38  typedef std::map<std::string, RdfUri> PrefixMap;
39 
43  RdfStore();
44 
48  ~RdfStore();
49 
54  void SetBaseUri(RdfUri uri);
55 
59  RdfUri GetBaseUri() const;
60 
66  void AddPrefix(std::string prefix, RdfUri uri);
67 
72  PrefixMap GetPrefixes() const;
73 
77  void CleanUp();
78 
85  bool Add(RdfTriple triple);
86 
93  bool Remove(RdfTriple triple);
94 
100  bool Contains(RdfTriple triple);
101 
108  DEPRECATED(ResultMap Query(const std::string& query) const);
109 
115  ResultMap ExecuteTupleQuery(const std::string& query) const;
116 
125  bool ExecuteBooleanQuery(const std::string& query) const;
126 
132  void Save(std::string filename, std::string format = "");
133 
139  void Import(std::string url, std::string format = "");
140 
141  private:
142  RdfStorePrivate* d;
143  };
144 }
145 
146 #endif // MITKRDFSTORE_H
std::map< std::string, std::list< RdfNode > > ResultMap
Definition: mitkRdfStore.h:37
DataCollection - Class to facilitate loading/accessing structured data.
#define DEPRECATED(func)
Definition: mitkCommon.h:183
static const std::string filename
std::map< std::string, RdfUri > PrefixMap
Definition: mitkRdfStore.h:38