Http://techbase.kde.org/Projects/Nepomuk/OntologyExtension: Difference between revisions

From KDE TechBase
(Prepare for translation)
(Marked this version for translation)
Line 2: Line 2:
<translate>
<translate>


== Introducing Ontologies ==
== Introducing Ontologies == <!--T:1-->


<!--T:2-->
The [http://oscaf.sourceforge.net/ Shared Desktop Ontologies] were written with a very broad purpose in mind. That being said, they are still cases that are often not covered by it. In that case there are two possible options for extending the ontologies
The [http://oscaf.sourceforge.net/ Shared Desktop Ontologies] were written with a very broad purpose in mind. That being said, they are still cases that are often not covered by it. In that case there are two possible options for extending the ontologies


== Contributing to SDO ==
== Contributing to SDO == <!--T:3-->


<!--T:4-->
The Shared Desktop Ontologies project follows a strict review policy. In order for any changes to be made, a [http://sourceforge.net/apps/trac/oscaf/newticket new ticket] must first be filed stating the changes that you wish to be made, and the rationale behind them.
The Shared Desktop Ontologies project follows a strict review policy. In order for any changes to be made, a [http://sourceforge.net/apps/trac/oscaf/newticket new ticket] must first be filed stating the changes that you wish to be made, and the rationale behind them.


<!--T:5-->
Here is a [http://sourceforge.net/apps/trac/oscaf/report/1 list] of all the currently open tickets.
Here is a [http://sourceforge.net/apps/trac/oscaf/report/1 list] of all the currently open tickets.


<!--T:6-->
Most discussions happen in the [https://mail.kde.org/mailman/listinfo/nepomuk nepomuk mailing list]. Feel free to email us about any changes.
Most discussions happen in the [https://mail.kde.org/mailman/listinfo/nepomuk nepomuk mailing list]. Feel free to email us about any changes.


== Creating a custom ontology ==
== Creating a custom ontology == <!--T:7-->


<!--T:8-->
Most of the ontologies are written in the [http://www4.wiwiss.fu-berlin.de/bizer/trig/ trig syntax].  
Most of the ontologies are written in the [http://www4.wiwiss.fu-berlin.de/bizer/trig/ trig syntax].  


<!--T:9-->
In order to install an ontology, the follow files are required -
In order to install an ontology, the follow files are required -


<!--T:10-->
* <tt>ontology-name.trig</tt> The TriG file containing the ontology
* <tt>ontology-name.trig</tt> The TriG file containing the ontology
* <tt>ontology-name.ontology.in</tt> A file describing the ontology
* <tt>ontology-name.ontology.in</tt> A file describing the ontology




<!--T:11-->
In order to ease the process of creating custom ontologies a template ontology is provided in [http://quickgit.kde.org/index.php?p=kdeexamples.git&a=tree&h=44b1d8b2b6d2d140437ca03102fa56279232227b&hb=80a322af2bc5975c01c704173e937ccb8df605e3&f=nepomuk%2Fontology kdeexamples/nepomuk/ontology]
In order to ease the process of creating custom ontologies a template ontology is provided in [http://quickgit.kde.org/index.php?p=kdeexamples.git&a=tree&h=44b1d8b2b6d2d140437ca03102fa56279232227b&hb=80a322af2bc5975c01c704173e937ccb8df605e3&f=nepomuk%2Fontology kdeexamples/nepomuk/ontology]


=== Ontology C++ files ===
=== Ontology C++ files === <!--T:12-->


<!--T:13-->
In order to easily access the ontology in your code. It is recommended to generate ontology headers. This can be done using some cmake magic provided by '''Soprano'''.
In order to easily access the ontology in your code. It is recommended to generate ontology headers. This can be done using some cmake magic provided by '''Soprano'''.


<!--T:14-->
<syntaxhighlight lang=cmake>
<syntaxhighlight lang=cmake>
include(SopranoAddOntology)
include(SopranoAddOntology)


<!--T:15-->
# Generating headers for the nie ontology
# Generating headers for the nie ontology
soprano_add_ontology(SRCS "${SHAREDDESKTOPONTOLOGIES_ROOT_DIR}/nie/nie.trig" "NIE" "Nepomuk2::Vocabulary" "trig")
soprano_add_ontology(SRCS "${SHAREDDESKTOPONTOLOGIES_ROOT_DIR}/nie/nie.trig" "NIE" "Nepomuk2::Vocabulary" "trig")
Line 38: Line 49:




<!--T:16-->
The Nepomuk-Core repository already provides ontology headers for the most commonly used ontologies.
The Nepomuk-Core repository already provides ontology headers for the most commonly used ontologies.


<!--T:17-->
[[Category:Documentation]]
[[Category:Documentation]]
[[Category:Development]]
[[Category:Development]]
[[Category:Tutorials]]
[[Category:Tutorials]]
</translate>
</translate>

Revision as of 10:04, 14 December 2012


Introducing Ontologies

The Shared Desktop Ontologies were written with a very broad purpose in mind. That being said, they are still cases that are often not covered by it. In that case there are two possible options for extending the ontologies

Contributing to SDO

The Shared Desktop Ontologies project follows a strict review policy. In order for any changes to be made, a new ticket must first be filed stating the changes that you wish to be made, and the rationale behind them.

Here is a list of all the currently open tickets.

Most discussions happen in the nepomuk mailing list. Feel free to email us about any changes.

Creating a custom ontology

Most of the ontologies are written in the trig syntax.

In order to install an ontology, the follow files are required -

  • ontology-name.trig The TriG file containing the ontology
  • ontology-name.ontology.in A file describing the ontology


In order to ease the process of creating custom ontologies a template ontology is provided in kdeexamples/nepomuk/ontology

Ontology C++ files

In order to easily access the ontology in your code. It is recommended to generate ontology headers. This can be done using some cmake magic provided by Soprano.

include(SopranoAddOntology)

# Generating headers for the nie ontology
soprano_add_ontology(SRCS "${SHAREDDESKTOPONTOLOGIES_ROOT_DIR}/nie/nie.trig" "NIE" "Nepomuk2::Vocabulary" "trig")


The Nepomuk-Core repository already provides ontology headers for the most commonly used ontologies.