Skip to content
architolk edited this page Jan 16, 2017 · 3 revisions

You use a Production to infer triples from other triples. With a production, you can use sparql insert and delete statements.

A typical production contains one or more scenes (like in a theatre production). Every scene can contain its own query. The result of each scene will be presented in a table appearance.

Please be aware that every scene is executed in its own transaction. So if for example, the second scene fails, then the results of the first scene will still be available.

As with a container, the URI of a production must be the same as the URL you use when you want to execute the production. All URI's must contain a /update part.

The following properties can be defined for a production:

  • (mandatory) elmo:contains states a scene that is part of this production. You can also include representations (like a menu). These representations will be depicted in the resultscreen (after the production has been executed). You might want to reuse scenes with multiple productions.
  • (optional) elmo:queryForm states an elmo:Form that is presented whenever some parameter is not present. You could use this form to enter some data that is used with the production (for example: the named graph that will contain the created triples).

A scene can have the following properties:

  • (mandatory) elmo:query defines the SPARQL query to be executed.
  • (optional) elmo:index states the order of scenes. If you have more than one scene, it is recommended to use an index, otherwise the execution order will be random.
  • (optional) rdfs:label states the label that is presented to the user to refer to the particular scene after the production has been executed.

Example

@prefix production: <http://localhost:8080/update/>
production:example a elmo:Production;
	elmo:contains production:example_scene1;
	elmo:queryForm stage:pform
.
stage:form a elmo:Form;
	elmo:fragment [
		elmo:applies-to "graph";
		rdfs:label "Graph";
	];
	elmo:fragment [
		elmo:appearance elmo:SubmitAppearance;
		rdfs:label "Create";
	];
.
production:example_scene1 a elmo:Scene;
	elmo:index "1";
	rdfs:label "Create some graph";
	elmo:query '''
		insert into <@GRAPH@> {
			<@GRAPH@> a <http://rdfs.org/ns/void#Dataset>
		}
	'''
.
Clone this wiki locally