de.fuberlin.wiwiss.ng4j.semwebclient
Class CommandLineQuery

java.lang.Object
  extended by de.fuberlin.wiwiss.ng4j.semwebclient.CommandLineQuery

public class CommandLineQuery
extends Object


Constructor Summary
CommandLineQuery()
           
 
Method Summary
 void addSourceURI(String uri)
          Loads a file from the Web before the query is executed.
 void run()
          Executes the query specified using the other options.
 void setEnableGrddl(boolean enableGrddl)
          Enables the GRDDL transformations.
 void setFindTriple(Triple triple)
          Sets a triple pattern to be used as a query against the Semantic Web.
 void setLoadGraphSet(String file, String format)
          Loads a set of graphs from a file before the query is executed.
 void setMaxFilesize(int maxFilesize)
          Sets the maximal number of iterations of the retrieval algorithm.
 void setMaxSteps(int maxSteps)
          Sets the maximal number of iterations of the retrieval algorithm.
 void setMaxThreads(int maxThreads)
          Sets the maximal number of parallel threads for retrieving URIs.
 void setOutputFailedURIs(boolean outputFailedURIs)
          Output a list of all URIs that could not be retrieved?
 void setOutputRetrievedURIs(boolean outputRetrievedURIs)
          Output a list of all successfully retrieved URIs?
 void setSPARQLFile(String filename)
          A SPARQL query is loaded from a file and executed against the Semantic Web.
 void setSPARQLQuery(String query)
          Sets a SPARQL query to be executed against the Semantic Web.
 void setTimeout(long timeoutMilliseconds)
          Sets the timeout of the query in milliseconds.
 void setWriteGraphSet(String file, String format)
          Saves all graphs that have been retrieved into a file after query execution has finished.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandLineQuery

public CommandLineQuery()
Method Detail

setSPARQLQuery

public void setSPARQLQuery(String query)
Sets a SPARQL query to be executed against the Semantic Web.

Parameters:
query -

setSPARQLFile

public void setSPARQLFile(String filename)
A SPARQL query is loaded from a file and executed against the Semantic Web.

Parameters:
filename -

setFindTriple

public void setFindTriple(Triple triple)
Sets a triple pattern to be used as a query against the Semantic Web.

Parameters:
triple - An RDF triple, may contain Node.ANY wildcards

setMaxSteps

public void setMaxSteps(int maxSteps)
Sets the maximal number of iterations of the retrieval algorithm. The default value is 3.

Parameters:
maxSteps -

setMaxFilesize

public void setMaxFilesize(int maxFilesize)
Sets the maximal number of iterations of the retrieval algorithm. The default value is 3.

Parameters:
maxSteps -

setTimeout

public void setTimeout(long timeoutMilliseconds)
Sets the timeout of the query in milliseconds. The default value is 60000.

Parameters:
timeoutMilliseconds -

setMaxThreads

public void setMaxThreads(int maxThreads)
Sets the maximal number of parallel threads for retrieving URIs. The default is 10.

Parameters:
maxThreads -

setEnableGrddl

public void setEnableGrddl(boolean enableGrddl)
Enables the GRDDL transformations. The default is false.

Parameters:
enableGrddl -

addSourceURI

public void addSourceURI(String uri)
Loads a file from the Web before the query is executed.

Parameters:
uri -

setLoadGraphSet

public void setLoadGraphSet(String file,
                            String format)
Loads a set of graphs from a file before the query is executed.

Parameters:
file - Filename of the graph set file
format - "TRIG" or "TRIX"

setWriteGraphSet

public void setWriteGraphSet(String file,
                             String format)
Saves all graphs that have been retrieved into a file after query execution has finished.

Parameters:
file - Filename of the destination file
format - "TRIG" or "TRIX"

setOutputRetrievedURIs

public void setOutputRetrievedURIs(boolean outputRetrievedURIs)
Output a list of all successfully retrieved URIs?

Parameters:
outputRetrievedURIs -

setOutputFailedURIs

public void setOutputFailedURIs(boolean outputFailedURIs)
Output a list of all URIs that could not be retrieved?

Parameters:
outputFailedURIs -

run

public void run()
         throws Exception
Executes the query specified using the other options.

Throws:
Exception - Indicates an error