<html>
<head>
	<title>FedX Documentation</title>
</head>

<body>
<div id="content" style="width:800px">

<h2>FedX CLI</h2>

<a href="../Index.html">back</a>

<p>FedX brings a comprehensive CLI to evaluate queries on a set of specified data sources.</p>

<pre>
Usage:
> FedX [Configuration] [Federation Setup] [Output] [Queries]
> FedX -{help|version}

WHERE
[Configuration] (optional)
Optionally specify the configuration to be used
        -c path/to/fedxConfig
        -verbose {0|1|2|3}
        -logtofile
        -p path/to/prefixDeclarations

[Federation Setup] (optional)
Specify one or more federation members
        -s urlToSparqlEndpoint
        -l path/to/NativeStore
        -d path/to/dataconfig.ttl

[Output] (optional)
Specify the output options, default stdout. Files are created per query to 
results/%outputFolder%/q_%id%.{json|xml}, where the outputFolder is the 
current timestamp, if not specified otherwise.
        -f {STDOUT,JSON,XML}
        -folder outputFolder

[Queries]
Specify one or more queries, in file: separation of queries by empty line
        -q sparqlquery
        @q path/to/queryfile

Notes:
The federation members can be specified explicitely (-s,-l,-d) or implicitely 
as 'dataConfig' via the fedx configuration (-f)

If no PREFIX declarations are specified in the configurations, the CLI provides
some common PREFIXES, currently rdf, rdfs and foaf. 
</pre>


<p>In the <i>examples</i> folder we provide many sample use cases. Here is 
a list of sample commands:<p>

<pre>
Evaluate query 1 at DBpedia and SemanticWebDogFood 
> cli -d examples\DBpediaSemanticWebDogFood.ttl @q examples\q1.txt

Evaluate query 1 at DBpedia and SemanticWebDogFood using JSON as output format
> cli -d examples\DBpediaSemanticWebDogFood.ttl -f JSON @q examples\q1.txt

Evaluate query 1 at DBpedia and SemanticWebDogFood using XML as output format, with folder "test"
> cli -d examples\DBpediaSemanticWebDogFood.ttl -f JSON -folder test @q examples\q1.txt

Evaluate query 3 at DBpedia and Drugbank
> cli -s http://dbpedia.org/sparql -s http://www4.wiwiss.fu-berlin.de/drugbank/sparql @q examples\q2.txt

Evaluate query 1 at DBpedia and SemanticWebDogFood, verbose log messages to stdout at highest level (TRACE)
> cli -verbose 2 -d examples\DBpediaSemanticWebDogFood.ttl @q examples\q1.txt

Evaluate query 1 at DBpedia and SemanticWebDogFood, verbose log messages to file at level 1 (INFO)
> cli -verbose 1 -logtofile -d examples\DBpediaSemanticWebDogFood.ttl @q examples\q1.txt

Evaluate a set of queries at DBpedia and SemanticWebDogFood
> cli -d examples\DBpediaNYTimesLinkedMDB.ttl @q examples\queries.txt

Evaluate the specified query at DBpedia
> cli -s http://dbpedia.org/sparql -q "SELECT ?President WHERE {?President &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#type&gt; &lt;http://dbpedia.org/class/yago/PresidentsOfTheUnitedStates&gt; . }"

Evaluate query 1 at DBpedia and SemanticWebDogFood, and apply the specified FedX configuration (prints query plan)
> cli -c examples\fedxConfig.prop -d examples\DBpediaSemanticWebDogFood.ttl @q examples\q1.txt

Evaluate query 1 at DBpedia and SemanticWebDogFood. Data sources specified implicitly using dataConfig setting in FedX configuration and apply the specified fedx configuration (prints query plan)
> cli -c examples\fedxConfig-dataCfg.prop @q examples\q1.txt

Evaluate query 5 at the specified local Sesame NativeStores of DBpedia and NYTimes
> cli -c examples\fedxConfig.prop -d examples\DBpediaNYTimes-local.ttl @q examples\q5.txt
</pre>



</div>
</body>
</html>