Clone wiki

lmf / Drupal-Module

LMF Drupal Module

LMF is developing a native Drupal module which provides some basic features to use LMF as backend in Drupal.

This module heavily uses the RDFx module, therefore it'd be interesting to read before how RDF works in Drupal.

<wiki:toc />

Source Code

hg clone


  • Drupal nodes importation and synchronization
  • Easy integration of other services (query, search and so on)


You just need to copy the module into the sites/all/modules directory of your Drupal installation, and enable it in the modules panel, which will require to install all additional dependent modules:


Once you have installed the module and configured your RDF mappings, you can let LMF to also manage your nodes data.

First you'd need to provide some data to allow the module access LMF:

Then you would be able to import your nodes into LMF quite easy:

As you can see, currently we are providing three different options to import data:

  1. Single node importantion using its node id
  2. Import all node of a given content type
  3. Import a whole taxonomy defined in your Drupal vocabularies

Then you'd be able to check what's the current status of the data in LMF:

If any content has been modified after being imported, the modules handles that and allows you to re-import it. For the future we are planning to implement some additional hooks within Drupal for being able to automatically do such refreshing of the data.

It's important to say that neither the user nor the developer of another module need to deal with RDF or the LMF web services: the first part is provided by RDFx, and the other is wrapped by the LMF PHP Client Library.

PHP Documentation

For those who need to use the functionality from other modules in Drupal, the list of public methods which are provided by the module façade (the class LMF):

<code language="PHP">

getStaticPage($name) (STATIC)

__construct($uri, $user, $pass)

















addReasoningProgram($name, $program)

createSearchCore($core, $configuration)


getRecommendation($query, $core)


It's usage from other modules actually is quite simple:

$lmf = new LMF();

since the default constructor automatically takes the missing arguments from the module within Drupal.

Use cases

LMF is not a CMS and does not pretend to replace Drupal as such. Importing your Drupal data into LMF allows to perform some advanced operations:

- Mix up and enrich your data with other relevant sources of information (from Social Media or the Linked Open Data cloud, for intance) with [[Module Reasoning reasoning]] support
- Query your data with a more flexible languages, such as SPARQL or LDPath
- ...


This project have been developed by <a href="">Salzburg Research</a> as part of Salzburg !NewMediaLab – The Next Generation (<a href="">SNML-TNG</a>), a K-Project in the Austrian <a href="">COMET programme</a>; and the <a href="">myTV</a> project, partially funded by the Federal Ministry for Transport Innovation and Technology (<a href="">BMVIT</a>) and the Austrian Research Promotion Agency (<a href="">FFG</a>).