The Nepomuk Programming Tutorial

There is a slight chance that you are in the wrong wiki -- if you wonder "Java? I was looking for the KDE C++ implementation." Then, please refer to the NEPOMUK KDE Project Documentation.

Introduction to Nepomuk programming

Before you start programming, have a look at the ProgrammingGuidelines that you must follow when committing code. They are similar to any other java-based open-source project, so if you never developed in an open-source project before, read them.

Take these first steps to get into NEPOMUK programming:

More advanced topics, which you will need once you are into developing:

  • AutomatedTesting - how to create automated tests of your components, which test data to use, and how to verify if you have broken something that worked before.
  • NepomukMockup - more about mockup objects which you can use to write JUnit tests.

NEPOMUK Architecture

Test Data and Claudia Stern

For development and demo purposes, an artificial test data set exists. The data circles around the user Claudia Stern and can be loaded into a running NEPOMUK system for testing and demo.

Creating Applications Using the NEPOMUK Services

This is the common case for development with NEPOMUK: you use it as a library to build your user interfaces or other algorithms. To get started with NEPOMUK, first get the desktop server and run it. Then download the client and connect to the server.

Download and run both before continuing. You will need Eclipse or another Java IDE to use the NepomukClient - it is a collection of driver jar's and some source code connecting them to the server.

Once you have the NightlyBuilds installed and running and the NepomukClient opened and compiled in your IDE of choice, look at this example file:

Run the example to see a Hello World application, it should work on all supported platforms.

Using Ontologies

Before diving into programming NEPOMUK, it is good to know a bit about the data structures that are used under the hood.

Contacting the RDF Repository

Once you know the basics about development and ontologies, learn about single services:

Developing in PSEW

Read

  • PimoUserInterface - general tips on user interfaces building on the nepomuk ontologies.
  • PSEWHacking - tips and tricks
  • GnognoInPsew - using visual components in PSEW to display lists, edits, treeviewers, icons conveniently
  • PimoInPSEW - showing PIMO related views in PSEW

Fields of development

Find more information about specific frameworks and development environments.

Programming NEPOMUK Services

Refer to EclipseDevelopment to setup your environment and the ProgrammingGuidelines for the rules you have to follow before committing to NEPOMUK

  • NepomukMiddleware - for sharing your services with the rest of Nepomuk
  • OSGINepomukDependencies utilities - If your service uses many other services, use this
  • DeclarativeServicesInOsgi - how to declare dependencies in an alternate way