use of org.apache.jena.jdbc.remote.connections.RemoteEndpointConnection in project jena by apache.
the class TestRemoteEndpointDriver method remote_driver_graph_uris_03.
/**
* Tests the different ways of specifying multiple values for a parameter
* @throws SQLException
*/
@Test
public void remote_driver_graph_uris_03() throws SQLException {
// May specify combination of multiple key=value pairs and key=value,value comma separated list(s)
String url = JenaDriver.DRIVER_PREFIX + RemoteEndpointDriver.REMOTE_DRIVER_PREFIX + RemoteEndpointDriver.PARAM_QUERY_ENDPOINT + "=http://example.org/query&" + RemoteEndpointDriver.PARAM_DEFAULT_GRAPH_URI + "=http://graph/1,http://graph/2&" + RemoteEndpointDriver.PARAM_DEFAULT_GRAPH_URI + "=http://graph/3";
RemoteEndpointDriver driver = (RemoteEndpointDriver) this.getDriver();
try (RemoteEndpointConnection conn = (RemoteEndpointConnection) driver.connect(url, new Properties())) {
Assert.assertEquals(3, conn.getDefaultGraphURIs().size());
}
}
use of org.apache.jena.jdbc.remote.connections.RemoteEndpointConnection in project jena by apache.
the class TestRemoteEndpointDriver method remote_driver_graph_uris_02.
/**
* Tests the different ways of specifying multiple values for a parameter
* @throws SQLException
*/
@Test
public void remote_driver_graph_uris_02() throws SQLException {
// May specify key=value,value as comma separated list
String url = JenaDriver.DRIVER_PREFIX + RemoteEndpointDriver.REMOTE_DRIVER_PREFIX + RemoteEndpointDriver.PARAM_QUERY_ENDPOINT + "=http://example.org/query&" + RemoteEndpointDriver.PARAM_DEFAULT_GRAPH_URI + "=http://graph/1,http://graph/2";
RemoteEndpointDriver driver = (RemoteEndpointDriver) this.getDriver();
try (RemoteEndpointConnection conn = (RemoteEndpointConnection) driver.connect(url, new Properties())) {
Assert.assertEquals(2, conn.getDefaultGraphURIs().size());
}
}
Aggregations