Hi,

On 11/12/14 10:40, Encolpe DEGOUTE wrote:
These days we are migrating our LOM metadata to MLR to store them in marmotta
3.2.0 (the last war file available via the debian repository).

3.3.0 release is being vote currently. If it passes it, you would have a better version to use, also as .deb. Although that part of the system does not come with significant improvements, I'd recommend you to upgrade as soon as it gets out.

To test our conversion process we try to import data in turtle via the REST
import interface.

A file that works via the HTML interface raises an RDF error in the first case
and seem works in the second case:
- https://sources.colpi.org/_admin/gists/4
- https://sources.colpi.org/_admin/gists/5

The source file:
https://sources.colpi.org/_admin/gists/6

The Turtle file looks syntactically correct, that's fine.

Have you any clue to explain this difference in the two process ?

Well, as far as I see both request use the same rest web service. The difference is that the first one sends the file from its path, while the second one tries to send the file attached to the request, which I think is not supported (files' data must be send in the payload).

From my experience with requests in Python (for instance in ldpy [1]), I always used the parameter 'data' to send the payload [2] using the following construction:

  requests.post(url, data=open(path,'rb'), headers=headers)

You could find more details about the different method available to import data in the wiki [3].

BTW, if there is a need for our community, we could add to our roadmap the addition of a Python version to our Client Library [4].

Cheers,

[1] https://github.com/wikier/ldpy/blob/master/ldpy/client.py#L70
[2] http://docs.python-requests.org/en/latest/user/quickstart/#more-complicated-post-requests
[3] http://wiki.apache.org/marmotta/ImportData
[4] http://marmotta.apache.org/client-library

--
Sergio Fernández
Partner Technology Manager
Redlink GmbH
m: +43 660 2747 925
e: sergio.fernan...@redlink.co
w: http://redlink.co

Reply via email to