First Steps

Configuration

The most important configuration step is the account credential configuration.
You have to change the property file xoperator.properties according to your account credentials.


Copy the file xoperator.properties-dist to xoperator.properties and open it in your favourite text editor. Follow the comments in the property file and change the values according to your setup.


The agent logs into your jabber account. Therefore the username, which is the full Jabber ID (JID), like user@example.com and the users password have to be given as parameters to the application (in the property file). Should the server to which the agent connects differ from the domain part of the JID, then the optional main_server parameter needs to be set. This is for example the case, when using a Google Talk account, where a JID would be someuser@googlemail.com and the main_server parameter is set to talk.google.com.


For creating a personal agent you need an additional jabber account. This account is neccesary for convenient communication with the agent. The proxy account does not have to be on the same server as the main account. The account does not need to have any contacts, the agent will automatically connect the accounts, therefore a brand new account on a server like http://jabber.chaotic.de will do the trick.


Now you can start the agent with ./start.sh (or start.bat on Windows). After that, the agent is ready. Now you have to add the proxy JID to your roster. If you see the agent in your roster, start a chat and enter help.


The help command list all possible commands and explain how to use them:

Managing Datastores

You can manage your trusted datastores with the following commands. Each source is locally identified by a name which is associated to an URI.

  • list ds – lists all configured datastores
  • add ds {name} {uri} – add a datastore to the agent
  • del ds {name} – remove a datastore

Example:

  • The following command adds the dbpedia sparql endpoint as an agent datastore: add ds dbpedia http://dbpedia.org/sparql?format=XML&default-graph-uri=http%3A%2F%2Fdbpedia.org

First Query / Managing Namespaces

The query command is used to send on-the-fly SPARQL queries to the xOperator. The query will be evaluated on every datastore and routed to every agent in the neighbourhood (not in group agent mode). The query results will be rendered by a default renderer.


The syntax of the command is: query {sparql query}


Before you send your first SPARQL query, you have to define some namespaces, which you can use in the query (you can also define it in the query). The add ns command can do that for you (type help for more namespace commands).


Namespace Example:

  • add ns foaf http://xmlns.com/foaf/0.1/
  • add ns dbpedia2 http://dbpedia.org/property/

After that, you can send your first query.


Query Example:

  • The following query asks dbpedia for people which are born in Berlin in the year 1900: query SELECT ?name ?birth ?death WHERE { ?person dbpedia2:birthPlace <http://dbpedia.org/resource/Berlin> . ?person dbpedia2:birth ?birth . ?person foaf:name ?name . ?person dbpedia2:death ?death. FILTER (?birth < "1901-01-01"^^xsd:date) . FILTER (?birth > "1899-12-31"^^xsd:date) . } ORDER BY ?name LIMIT 20

Using Templates


A template is a customizable SPARQL query which is executed by a given sentence. Instead of writing the whole query again and again, you can create it as a template, where
To add a template, type add template {pattern} {query}.


Template Example:

  • The following command creates a template from the query example above: add template "Who was born in berlin between * and *" "SELECT ?name ?birth ?death WHERE { ?person dbpedia2:birthPlace <http://dbpedia.org/resource/Berlin> . ?person dbpedia2:birth ?birth . ?person foaf:name ?name . ?person dbpedia2:death ?death. FILTER (?birth < '%%2%%'^^xsd:date) . FILTER (?birth > '%%1%%'^^xsd:date) . } ORDER BY ?name LIMIT 20" – After creating the template, try Who was born in Berlin between 1899–12–31 and 1901–01–01.

Writing Query Scripts

Query scripts basically are small pieces of software, which run in a special environment where they have access to all relevant subsystems. They are given access to the list of known data sources and neighbouring agents. xOperator, allows the execution of query scripts in the Groovy scripting language for Java.


To write query script, you need access to the xOperator installation. This advanced topic is described in more detail on our query scripts page.


 
There are no files on this page. [Display files/form]
There is no comment on this page. [Display comments/form]

Information

Last Modification: 2008-02-20 17:05:04 by Sebastian Dietzold