1st LarKC Early Adopters Workshop, 1 June 2009, Crete

Hands-on session - Urban Baby LarKC Scenario

PowerPoint Presentation

Apart from the correct importing and configuration of platform, plugins and pipelines with the respective Eclipse project (as per the rest of the workshop), only a few configurations are needed to run the Urban Baby LarKC pipelines. They are explained in the following together with the detailed explanation of the activities. The installation and running of the final user application that invokes the LarKC platform and displays the results on a map should be considered an optional step for the workshop.

First pipeline

This pipeline identifies a subset of the Milano roads (only the city center), by loading a specific RDF dump of such data from a remote address. Those RDF triples are analyzed and passed on to the path-finding algorithm which returns the found path.

The first pipeline is structured as follows:

The concrete plug-ins to realize the first pipeline are:

Some of the aforementioned plug-ins need specific configurations; those configurations can be modified within the ?UrbanBabyLarkcDecider class at the begin of the pipeline, invoking methods contained in UBL configuration class eu.larkc.plugin.identify.urbancomputing.ubl.Config. In the following we list the needed steps to prepare them.

?RemoteGraphLoaderIdentifier configuration:

Second pipeline

This pipeline identifies a subset of the Milano roads on the basis of some location-based choice of the relevant roads from the complete Milano map; to identify those roads, it takes into consideration the position of the starting and ending nodes. The identified RDF triples representing the roads subset are analyzed and passed on to the path-finding algorithm which returns the found path.

The second pipeline is structured as follows:

The alternative options to realize the second pipeline are:

Some of the aforementioned plug-ins need specific configurations; those configurations can be modified within the ?UrbanBabyLarkcDecider.java class (in the plugins project). In the following we list the needed steps to prepare them.

?GeoLocationIdentifier configuration:

?MixedStrategyIdentifier configuration:

Running the Urban Baby LarKC

In order to run the Urban Baby LarKC and test its various configurations, we prepared the eu.larkc.demo.ExecuteUrbanPipelineEAW.java class (located in the pipelines project and attached in a commented version); by changing the pipelines field in the first line of the main method, it is possible to launch the pipeline executions in the various pipeline configurations.

Running the UBL client

Once we tried the UBL from code, we can demonstrate the use of LarKC within a end-user application. In this case, we provide a client (within a Tomcat webapp) that displays a graphical interface to the user to select starting and ending point on a map, invokes the UBL to find the path and displays the result on the map itself.

Further UBL configuration

Some libraries must be added to the platform classpath in order to invoke it remotely.

Right-click on the "platform" project and select "Java Build Path", then go to the "Libraries" tab and click on "Add jars..."; then select the following libraries:

Edit the file plugins.ini that can be found under platform\conf: comment the line with the ?SimpleAnytimeDecider and add this line:

../plugins/bin/eu.larkc.plugin.decider.urbancomputing.ubl.UrbanBabyLarkcDecider.wsdl

In this way, you are instructing the platform to launch that decider.

Edit the eu.larkc.plugin.decider.urbancomputing.ubl.?UrbanBabyLarkcDecider.java class and at line 48 complete the code as follows:

public int configuration = 11;

In this way, you are telling the decider to execute the first pipeline.

Testing before launching the client

Run the eu.larkc.core.Larkc.java class under platform (configured as explained here).

Launch a SPARQL client like the one that can be downloaded here. Submit the following sample query:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns/>
PREFIX lud: <http://www.linkingurbandata.org/onto/ama/>
SELECT ?p ?w ?n1 ?l ?n2
WHERE{
 ?p rdf:type lud:Path.
 ?p lud:pathFrom <http://seip.cefriel.it/ama/resource/nodes/node8578>.
 ?p lud:pathTo <http://seip.cefriel.it/ama/resource/nodes/node8137>.
 ?p lud:contain ?l.
 ?l lud:lFrom ?n1.
 ?l lud:lTo ?n2.
 ?p lud:length ?w.
} ORDER BY ?w

If everything goes right, a new window will pop up with the XML variable bindings of the SPARQL query response.

UBL client installation and configuration

The client is provided as a file named UBL-Client.war available on the project SVN here. Put this file in the webapps folder of an Apache Tomcat and start the Tomcat server.

If needed, edit the service.jsp file in the following line:

LarkcConnector lc = new LarkcConnector("http://localhost:8000/sparql/");

by putting the correct address of the LarKC server running on your machine.

Having selected the first pipeline (1A), the client runs only with the streets belonging to the Milano city center. Please, be aware of this when you right-click on the map to select the starting and ending node: both points must be within the city center (see slide 14 of the presentation)




Server-side configuration (for workshop organizers only)

ServerSideInstructions




page in progress ...

more up-to-date information can be found on the project SVN at:

LarkcProject/1stEarlyAdoptersWorkshop/Scenarios/UrbanBabyLarKC (last edited 2009-05-29 18:26:55 by ?IreneCelino)