URL serverBaseUrl;
serverBaseUrl = new URL("http://localhost:8081/dai/services/");
ResourceID drerId = new ResourceID("DataRequestExecutionResource");
ServerProxy serverProxy = new ServerProxy();
serverProxy.setDefaultBaseServicesURL(serverBaseUrl);
DataRequestExecutionResource drer = serverProxy
.getDataRequestExecutionResource(drerId);
CreateDataSource createDataSource = new CreateDataSource();
DeliverToRequestStatus deliverToRequestStatus = new DeliverToRequestStatus();
deliverToRequestStatus.connectInput(createDataSource.getResultOutput());
PipelineWorkflow createSourceWorkflow = new PipelineWorkflow();
createSourceWorkflow.add(createDataSource);
createSourceWorkflow.add(deliverToRequestStatus);
drer.execute(createSourceWorkflow, RequestExecutionType.SYNCHRONOUS);
ResourceID dataSourceID = createDataSource.nextResult();
DataSourceResource dataSource = serverProxy
.getDataSourceResource(dataSourceID);
// String SPARQLquery = "PREFIX p: <http://dbpedia.org/property/> " +
// "SELECT ?artist ?artwork ?museum ?director " +
// "WHERE {" +