Created
March 26, 2012 23:20
-
-
Save msalvadores/2210565 to your computer and use it in GitHub Desktop.
Java function to pass the api key to BioPortal SPARQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ResultSet executeQuery(String queryString) throws Exception { | |
Query query = QueryFactory.create(queryString) ; | |
QueryEngineHTTP qexec = QueryExecutionFactory.createServiceRequest(this.service, query) | |
qexec.addParam("apikey", this.apikey) | |
ResultSet results = qexec.execSelect() ; | |
return results; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment