Skip to content
alangrafu edited this page Dec 29, 2011 · 4 revisions

Export and import

One key feature of LODSPeaKr that was planned from the beginning, was the ability to replicate other people's work. For example, if Alice has a nice webapp using LODSPeaKr in http://example.org/aliceswebapp and Bob wants to have a similar one but with different data. Bob doesn't know Alice (or he cannot contact her), so what can he do?

How to replicate an app

By default, LODSPeaKr provides a URL of a document that specifies a Linked Data app using LDA covabulary. In the example of Alice's webapp, when it is accessed http://example.org/aliceswebapp/export users will have access to a representation of the models, views, static pages, SPARQL endpoints used, etc. We can copy the content of that file and keep it on our clipboard.

Now lets imagine we have a "fresh" instance of LODSPeaKr (i.e., no settings.inc.php) in http://anothersite.com/myapp. In order to replicate the other app, we paste the content of the clipboard (which contains the turtle of http://example.org/aliceswebapp/export) in the box that will appear at http://anothersite.com/myapp/import. A few minutes after submitting the form, we will have our own verison of the same application.

You can also import directly by running

http://anothersite.com/myapp/import?import=http://example.org/alicewebapp/export

It is important to make clear that you can't import an app in a working instance of LODSPeaKr. If you want to reuse one, simply delete settings.inc.php and everything in Models, Views, Statics and cache/.

How to disable the Exporting method?

In settings.inc.php simply turn

$conf['export'] = false;```

Clone this wiki locally