diff --git a/Modules/RDF/mitkRdfNode.h b/Modules/RDF/mitkRdfNode.h index ca18b0d43f..b3ebbbdb6c 100644 --- a/Modules/RDF/mitkRdfNode.h +++ b/Modules/RDF/mitkRdfNode.h @@ -1,114 +1,114 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef MITKRDFNODE_H #define MITKRDFNODE_H #include #include "mitkRdfUri.h" #include #include namespace mitk { /** * \ingroup MitkRDFModule */ - class MitkRDF_EXPORT RdfNode + class MITKRDF_EXPORT RdfNode { public: /** * Enumeration for node types. */ enum Type { NOTHING, URI, LITERAL, BLANK }; /** * Construct a empty invalid node. */ RdfNode(); /** * Construct a node from type URI which represents a object of the real world. * @param uri An RdfUri which represents a URI. */ RdfNode(RdfUri uri); /** * Construct a node from type LITERAL. * @param text A std::string which represents a literal. */ RdfNode(std::string text); /** * Construct a node from type LITERAL with a specific data type. * @param text A std::string which represents a literal. * @param dataType An RdfUri which represents a specific data type. */ RdfNode(std::string text, RdfUri dataType); virtual ~RdfNode(); /** * Set the type of a Node. * @param type An RdfNode::Type which represents a type of a node. */ void SetType(Type type); /** * Set the data type of a LITERAL Node. * @param dataType An RdfUri which represents an URI of a specific data type. */ void SetDatatype(RdfUri dataType); /** * Set the internal represantation of an URI or a text. * @param value A std::string which represents an URI or a text. */ void SetValue(std::string value); /** * Get the type of a node. * @return The type of a node. */ Type GetType() const; /** * Get the data type of the internal value of a node. * @return The data type of the internal value of a node. */ RdfUri GetDatatype() const; /** * Get the internal value of a node. * @return The internal value of a node. */ std::string GetValue() const; bool operator==(const RdfNode &u) const; bool operator!=(const RdfNode &u) const; private: Type m_Type; RdfUri m_Datatype; std::string m_Value; }; - MitkRDF_EXPORT std::ostream & operator<<(std::ostream &out, const mitk::RdfNode &n); + MITKRDF_EXPORT std::ostream & operator<<(std::ostream &out, const mitk::RdfNode &n); } #endif diff --git a/Modules/RDF/mitkRdfStore.h b/Modules/RDF/mitkRdfStore.h index 01ae7018ef..e95eee9877 100644 --- a/Modules/RDF/mitkRdfStore.h +++ b/Modules/RDF/mitkRdfStore.h @@ -1,127 +1,127 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef MITKRDFSTORE_H #define MITKRDFSTORE_H #include #include #include #include "mitkRdfTriple.h" namespace mitk { class RdfStorePrivate; /** * \ingroup MitkRDFModule */ - class MitkRDF_EXPORT RdfStore + class MITKRDF_EXPORT RdfStore { public: typedef std::map > ResultMap; typedef std::map PrefixMap; /** * Construct a new triplestore. */ RdfStore(); /** * Destruct a triplestore. */ ~RdfStore(); /** * Set the base URI of the triplestore. * @param uri An URI which is the base for the triplestore and for new nodes. */ void SetBaseUri(RdfUri uri); /** * Get the base URI of the triplestore. */ RdfUri GetBaseUri() const; /** * Add a new prefix which represents an URI as an abbreviation to the triplestore. * @param prefix The short form of an URI. * @param uri The full form of an URI. */ void AddPrefix(std::string prefix, RdfUri uri); /** * Get a Map with all prefixes of the triplestore. * @return A Map with all Prefixes of the RdfStore. */ PrefixMap GetPrefixes() const; /** * Clean up the triplestore to the state of a new store. */ void CleanUp(); /** * Add a new triple to the triplestore. * Checks if the triplestore contains the triple. * @param triple A triple. * @return If the triple is successfully added or if the triplestore already contains the triple, true will be returned. If none of the previous options happen, false will be returned. */ bool Add(RdfTriple triple); /** * Remove a triple from the triplestore. * Checks if the triplestore contains the triple. * @param triple A triple. * @return If the triple is successfully removed or if the triplestore doesn't contain the triple, true will be returned. If none of the previous options happen, false will be returned. */ bool Remove(RdfTriple triple); /** * Checks if the triplestore contains the triple. * @param triple A triple. * @return If the triplestore contains the triple, true will be returned. Otherwise, false will be returned. */ bool Contains(RdfTriple triple); /** * Queries over the triplestore with the given SPARQL query. * @param query A std:string which stands for a SPARQL query text. * @return The result of the query will be returned as a map of keys with there values as lists of nodes. */ ResultMap Query(std::string query) const; /** * Saves the current state of the triplestore in a file. The currently supported formats are: "ntriples", "turtle"(default), "nquads". * @param filename A full filepath to the lokal storage. * @param format One of the supported formats. Default: "turtle". */ void Save(std::string filename, std::string format = ""); /** * Imports the state of the triplestore of an URL (URI). * @param filename A full filepath to the lokal storage or http address as URL. A lokal file path has to look like "file:YOURPATH" ( Example: file:D:/home/readme.txt ). * @param format The current supported formats are: "turtle" (default), "ntriples", "nquads". */ void Import(std::string url, std::string format = ""); private: RdfStorePrivate* d; }; } #endif // MITKRDFSTORE_H diff --git a/Modules/RDF/mitkRdfTriple.h b/Modules/RDF/mitkRdfTriple.h index 724db581ca..ba52e14125 100644 --- a/Modules/RDF/mitkRdfTriple.h +++ b/Modules/RDF/mitkRdfTriple.h @@ -1,109 +1,109 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef MITKRDFTRIPLE_H #define MITKRDFTRIPLE_H #include #include "mitkRdfNode.h" namespace mitk { /** * \ingroup MitkRDFModule */ - class MitkRDF_EXPORT RdfTriple + class MITKRDF_EXPORT RdfTriple { public: /** * Construct a empty invalid triple. */ RdfTriple(); /** * Construct a normal triple with two nodes and an object property node between. * @param subject A node. * @param predicate A node which represents an object property. * @param object A node. */ RdfTriple(RdfNode subject, RdfNode predicate, RdfNode object); /** * Construct a normal triple with a node, a data property and a value. * @param subject A node. * @param predicate A node which represents a data property. * @param value A text value. */ RdfTriple(RdfNode subject, RdfNode property, std::string value); virtual ~RdfTriple(); /** * Set the subject of a triple. * @param subject A node from type URI or BLANK. */ void SetTripleSubject(RdfNode subject); /** * Set the predicate of a triple. * @param predicate A node from type URI which can represent an object property or a data property. */ void SetTriplePredicate(RdfNode predicate); /** * Set the object of a triple with an object property. * @param object A node from type URI, BLANK or LITERAL. */ void SetTripleObject(RdfNode object); /** * Set the object of a triple with a data property as text. * @param text A literal value.. */ void SetTripleObject(std::string text); /** * Get the subject of a triple. * @return The subject of a triple. */ RdfNode GetTripleSubject() const; /** * Get the predicate of a triple. * @return The predicate of a triple. */ RdfNode GetTriplePredicate() const; /** * Get the object of a triple. * @return The object of a triple. */ RdfNode GetTripleObject() const; bool operator==(const RdfTriple &u) const; bool operator!=(const RdfTriple &u) const; private: RdfNode m_Subject; RdfNode m_Predicate; RdfNode m_Object; }; - MitkRDF_EXPORT std::ostream & operator<<(std::ostream &out, const RdfTriple &t); + MITKRDF_EXPORT std::ostream & operator<<(std::ostream &out, const RdfTriple &t); } #endif // MITKRDFTRIPLE_H diff --git a/Modules/RDF/mitkRdfUri.h b/Modules/RDF/mitkRdfUri.h index e5ca22c265..0c4ddcbf2d 100644 --- a/Modules/RDF/mitkRdfUri.h +++ b/Modules/RDF/mitkRdfUri.h @@ -1,65 +1,65 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef MITKRDFURI_H #define MITKRDFURI_H #include #include namespace mitk { /** * \ingroup MitkRDFModule */ - class MitkRDF_EXPORT RdfUri + class MITKRDF_EXPORT RdfUri { public: /** * Construct a empty RdfUri. */ RdfUri(); /** * Construct a RdfUri with a value. * @param uri A std:string which represents the transfer parameter from a URI. */ explicit RdfUri(std::string uri); virtual ~RdfUri(); /** * Returns the string value of an RdfUri. * @return Value of RdfUri as std:string. */ std::string ToString() const; /** * Set the value of an RdfUri. * @param uri New value of an RdfUri. */ void SetUri(std::string uri); bool operator==(const RdfUri &u) const; bool operator!=(const RdfUri &u) const; private: std::string m_Uri; }; } #endif // MITKRDFURI_H diff --git a/Plugins/PluginList.cmake b/Plugins/PluginList.cmake index 47a985a503..56e6ee4e40 100644 --- a/Plugins/PluginList.cmake +++ b/Plugins/PluginList.cmake @@ -1,70 +1,70 @@ # Plug-ins must be ordered according to their dependencies set(MITK_PLUGINS org.blueberry.core.runtime:ON org.blueberry.core.expressions:OFF org.blueberry.core.commands:OFF org.blueberry.core.jobs:OFF org.blueberry.ui.qt:OFF org.blueberry.ui.qt.help:OFF org.blueberry.ui.qt.log:ON org.blueberry.ui.qt.objectinspector:OFF #org.blueberry.test:ON #org.blueberry.uitest:ON #Testing/org.blueberry.core.runtime.tests:ON #Testing/org.blueberry.osgi.tests:ON org.mitk.core.services:ON org.mitk.gui.common:ON org.mitk.planarfigure:ON org.mitk.core.ext:OFF org.mitk.core.jobs:OFF org.mitk.diffusionimaging:OFF org.mitk.simulation:OFF org.mitk.gui.qt.application:ON org.mitk.gui.qt.coreapplication:OFF org.mitk.gui.qt.ext:OFF org.mitk.gui.qt.extapplication:OFF org.mitk.gui.qt.common:ON org.mitk.gui.qt.stdmultiwidgeteditor:ON org.mitk.gui.qt.common.legacy:OFF org.mitk.gui.qt.cmdlinemodules:OFF org.mitk.gui.qt.diffusionimagingapp:OFF org.mitk.gui.qt.datamanager:ON org.mitk.gui.qt.datamanagerlight:OFF org.mitk.gui.qt.properties:ON org.mitk.gui.qt.basicimageprocessing:OFF org.mitk.gui.qt.dicom:OFF org.mitk.gui.qt.diffusionimaging:OFF org.mitk.gui.qt.dtiatlasapp:OFF org.mitk.gui.qt.geometrytools:OFF org.mitk.gui.qt.igtexamples:OFF org.mitk.gui.qt.igttracking:OFF org.mitk.gui.qt.igtlplugin:OFF org.mitk.gui.qt.imagecropper:OFF org.mitk.gui.qt.imagenavigator:ON org.mitk.gui.qt.viewnavigator:OFF org.mitk.gui.qt.materialeditor:OFF org.mitk.gui.qt.measurementtoolbox:OFF org.mitk.gui.qt.moviemaker:OFF org.mitk.gui.qt.pointsetinteraction:OFF org.mitk.gui.qt.python:OFF org.mitk.gui.qt.registration:OFF org.mitk.gui.qt.remeshing:OFF org.mitk.gui.qt.segmentation:OFF org.mitk.gui.qt.simulation:OFF org.mitk.gui.qt.aicpregistration:OFF org.mitk.gui.qt.toftutorial:OFF org.mitk.gui.qt.tofutil:OFF org.mitk.gui.qt.tubegraph:OFF org.mitk.gui.qt.ugvisualization:OFF org.mitk.gui.qt.ultrasound:OFF org.mitk.gui.qt.volumevisualization:OFF org.mitk.gui.qt.eventrecorder:OFF org.mitk.gui.qt.xnat:OFF - org.mitk.gui.qt.rdftriplestore:OFF + org.mitk.gui.qt.rdftriplestore:ON ) diff --git a/Plugins/org.mitk.gui.qt.rdftriplestore/CMakeLists.txt b/Plugins/org.mitk.gui.qt.rdftriplestore/CMakeLists.txt index f83b67f1e6..57ff44a4c6 100644 --- a/Plugins/org.mitk.gui.qt.rdftriplestore/CMakeLists.txt +++ b/Plugins/org.mitk.gui.qt.rdftriplestore/CMakeLists.txt @@ -1,8 +1,8 @@ project(org_mitk_gui_qt_rdftriplestore) -MACRO_CREATE_MITK_CTK_PLUGIN( +mitk_create_plugin( EXPORT_DIRECTIVE RDFTRIPLESTORE_EXPORT EXPORTED_INCLUDE_SUFFIXES src MODULE_DEPENDS MitkRDF - PACKAGE_DEPENDS Qt4|QtCore + PACKAGE_DEPENDS Qt4|QtCore Qt5|OpenGL ) diff --git a/Plugins/org.mitk.gui.qt.rdftriplestore/src/internal/org_mitk_gui_qt_rdftriplestore_Activator.h b/Plugins/org.mitk.gui.qt.rdftriplestore/src/internal/org_mitk_gui_qt_rdftriplestore_Activator.h index 7f5a6aecaf..9a2d65ebfa 100644 --- a/Plugins/org.mitk.gui.qt.rdftriplestore/src/internal/org_mitk_gui_qt_rdftriplestore_Activator.h +++ b/Plugins/org.mitk.gui.qt.rdftriplestore/src/internal/org_mitk_gui_qt_rdftriplestore_Activator.h @@ -1,43 +1,42 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef org_mitk_gui_qt_rdftriplestore_Activator_h #define org_mitk_gui_qt_rdftriplestore_Activator_h #include -#include namespace mitk { class MITK_LOCAL org_mitk_gui_qt_rdftriplestore_Activator : public QObject, public ctkPluginActivator { Q_OBJECT #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_rdftriplestore") #endif Q_INTERFACES(ctkPluginActivator) public: void start(ctkPluginContext* context); void stop(ctkPluginContext* context); }; // org_mitk_gui_qt_rdftriplestore_Activator } // end of namespace mitk #endif // org_mitk_gui_qt_rdftriplestore_Activator_h