|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.larkc.shared.SimpleSparqlClient
public class SimpleSparqlClient
A very simple SPARQL client which is capable of asking queries to the LarKC platform. This code is taken mostly from the SPARQLClient GUI from the development kit.
Field Summary | |
---|---|
static java.lang.String |
serverLocalhost
Default address of the LarKC SPARQL server. |
Constructor Summary | |
---|---|
SimpleSparqlClient()
Constructor. |
|
SimpleSparqlClient(java.lang.String serverAddress)
Constructor. |
Method Summary | |
---|---|
java.lang.String |
sendQuery(java.lang.String query)
Sends a SPARQL query to the LarKC SPARQL server specified in the constructor. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String serverLocalhost
Constructor Detail |
---|
public SimpleSparqlClient() throws java.net.MalformedURLException
java.net.MalformedURLException
public SimpleSparqlClient(java.lang.String serverAddress) throws java.net.MalformedURLException
serverAddress
- the address of the LarKC SPARQL server (e.g.
http://localhost:8000). A trailing forward slash ("/") will be
added if missing. The path to the SPARQL endpoint will be
added as well ("sparql/").
java.net.MalformedURLException
- if the URL is malformedMethod Detail |
---|
public java.lang.String sendQuery(java.lang.String query) throws java.io.IOException
query
- the SPARQL query to send
java.io.IOException
- if the server is unreachable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |