Soprano
2.7.6
|
Soprano provides two small tools that can make the life of a developer easier.
sopranocmd is a simple command line client to access Soprano repositories or the Soprano::Server. sopranocmd's usage is rather simple. It provides a comprehensive help message which can be accessed via:
onto2vocabularyclass is a small tool which creates C++ namespaces for ontologies such as Soprano::Vocabulary::RDF or Soprano::Vocabulary::NRL. Usage is as follows:
The value of –name
is use as the name of the generated namespace (the RDF in Soprano::Vocabulary::RDF).
The optional value of –namespace
is used as the surrounding namespace (the Soprano::Vocabulary in Soprano::Vocabulary::RDF). If none is specified the global namespace is used.
The value of –encoding
specifies the encoding of the ontologyfile used for parsing.
For historical reasons by default the Soprano visibility macro SOPRANO_EXPORT is used. This can be changed by specifying the visibility export module through –export-module
or disabling visibility all together with –no-visibility-export
. The latter is useful if the namespace is not part of a public API. When using the –export-module
parameter the value is used to generate the macro (<module>_EXPORT) and to generate the include file (<module>_export.h) which has to exist and define the macro.
See Some CMake Magic for simple integration of onto2vocabularyclass in the build system.