de.sones.GraphDSClient
Class GraphDSClient
java.lang.Object
de.sones.GraphDSClient.GraphDSClient
public class GraphDSClient
- extends java.lang.Object
Constructor Summary |
GraphDSClient(java.lang.String myHost,
java.lang.String myUsername,
java.lang.String myPassword,
int myPort)
Constructor for a GraphDS REST Client. |
Method Summary |
java.lang.String |
getHost()
|
QueryResult |
Query(java.lang.String myGQLString)
|
void |
setHost(java.lang.String myHost)
Sets the host in the correct format |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GraphDSClient
public GraphDSClient(java.lang.String myHost,
java.lang.String myUsername,
java.lang.String myPassword,
int myPort)
- Constructor for a GraphDS REST Client. Instantiate one per GraphDB instance.
- Parameters:
myHost
- The host to connect (e.g. 'localhost')myUsername
- The username to the GarphDBmyPassword
- The password to the GraphDBmyPort
- The current port of the REST interface
getHost
public java.lang.String getHost()
- Returns:
- the host used for the connection
Query
public QueryResult Query(java.lang.String myGQLString)
throws java.io.IOException,
org.jdom.JDOMException
- Parameters:
myGQLString
-
- Returns:
- QueryResutlt which contains all information about the result of the query
- Throws:
java.io.IOException
org.jdom.JDOMException
setHost
public void setHost(java.lang.String myHost)
- Sets the host in the correct format
- Parameters:
myHost
-