You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by Apache Wiki <wi...@apache.org> on 2013/08/29 08:55:19 UTC

[Marmotta Wiki] Update of "ImportData" by SergioFernandez

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Marmotta Wiki" for change notification.

The "ImportData" page has been changed by SergioFernandez:
https://wiki.apache.org/marmotta/ImportData

Comment:
added some doc about how to import data

New page:
RDF data can be imported into Marmotta in different ways:

== Import data via the UI ==

This is maybe the easiest way to do it. Just just need to access the Admin UI ([[http://host/marmotta/core/admin/import.html|http://host/marmotta/core/admin/import.html]]), and then provide the file or URL with the file your would like to import. Based on the file name, the wizard should automatically detect details such as the RDF format that is encoded; but you customize those details, such as the target context name where you would like to import the data.

== Import data via the Web Service ==

A very convenient method for batch processes. The UI described before just makes use of a web service, which you can directly use. For instance, using CURL:

{{{
curl -sfS -X POST -H "Content-Type: text/turtle; charset=utf-8" -d @file.ttl http://host/marmotta/import/upload
}}}

Optionally you can specify the target context by appending a query parameter with the urlencoded name:

{{{
curl -sfS -X POST -H "Content-Type: text/turtle; charset=utf-8" -d @file.ttl "http://host/marmotta/import/upload?context=http%3A%2F%2Fexample.org"
}}}

== Import data via the local directory ==

There is an special directory (`/path/to/marmotta/home/import`) which is being watched by Marmotta. Every RDF file copied there would be imported into the triple store; and once the import has finished, the file will be removed.

The files copied in the root on that directory would be imported into the default context. But sub-folders would be taken into account to select the target context name. For instance, if you copy a RDF file into `/path/to/marmotta/home/import/foo/bar`, the data would be imported into a context named `http://host/marmotta/context/foo/bar`.