protected void Page_Load(object sender, EventArgs e) { var FormattingPlaceHolder = Master.FindControl("BottomLinkButtonDiv"); FormattingPlaceHolder.Visible = false; if(!IsPostBack) { var ds = new DataService(); rptType.DataSource = ds.GetLocationIDs(); rptType.DataBind(); } }
/** Build a DataService starting at Resource svc, with the standard (default) set of services. */ public static DataService buildDataServiceStd(DatasetGraph dsg, boolean allowUpdate) { DataService dataService = new DataService(dsg) ; populateStdServices(dataService, allowUpdate); return dataService ; }
var dataService = new DataService({ serviceName: "aaa/bbb/myService", hasServerMetadata: false }); return new EntityManager({ dataService: dataService, });
/** Build a DataService starting at Resource svc, with the standard (default) set of services. */ public static DataService buildDataServiceStd(DatasetGraph dsg, boolean allowUpdate) { DataService dataService = new DataService(dsg) ; populateStdServices(dataService, allowUpdate); return dataService ; }
var ds = new DataService("tempDatabase.db"); ds.CreateDB();
var ds = new DataService ("existing.db");
DataService dataService = new DataService(ds.asDatasetGraph()) ;
DataService dataService = new DataService(ds.asDatasetGraph()) ;
@Test public void cfg_dataservice() { // Create a DataService and add the endpoint -> operation association. // This still needs the server to have the operation registered. DatasetGraph dsg = DatasetGraphFactory.createTxnMem(); DataService dataService = new DataService(dsg); FusekiBuilder.populateStdServices(dataService, true); FusekiBuilder.addServiceEP(dataService, newOp, endpointName); FusekiServer server = FusekiServer.create() .port(port) .registerOperation(newOp, contentType, customHandler) .add("/ds", dataService) .build(); testServer(server, true, true); }
@Test public void cfg_dataservice() { // Create a DataService and add the endpoint -> operation association. // This still needs the server to have the operation registered. DatasetGraph dsg = DatasetGraphFactory.createTxnMem(); DataService dataService = new DataService(dsg); FusekiBuilder.populateStdServices(dataService, true); FusekiBuilder.addServiceEP(dataService, newOp, endpointName); FusekiServer server = FusekiServer.create() .setPort(port) .registerOperation(newOp, contentType, customHandler) .add("/ds", dataService) .build(); testServer(server, true, true); }
@Test public void cfg_dataservice() { // Create a DataService and add the endpoint -> operation association. // This still needs the server to have the operation registered. DatasetGraph dsg = DatasetGraphFactory.createTxnMem(); DataService dataService = new DataService(dsg); FusekiBuilder.populateStdServices(dataService, true); FusekiBuilder.addServiceEP(dataService, newOp, endpointName); FusekiServer server = FusekiServer.create() .port(port) .registerOperation(newOp, contentType, customHandler) .add("/ds", dataService) .build(); testServer(server, true, true); }
@Test public void embedded_20() { DatasetGraph dsg = dataset() ; int port = FusekiLib.choosePort() ; DataService dSrv = new DataService(dsg) ; dSrv.addEndpoint(Operation.Query, "q") ; dSrv.addEndpoint(Operation.GSP_R, "gsp") ; FusekiServer server = FusekiServer.create() .add("/dsrv1", dSrv) .setPort(port) .build() ; server.start() ; try { query("http://localhost:"+port+"/dsrv1/q","ASK{}",x->{}) ; String x1 = HttpOp.execHttpGetString("http://localhost:"+port+"/dsrv1/gsp") ; assertNotNull(x1) ; } finally { server.stop() ; } }
@Test public void embedded_20() { DatasetGraph dsg = dataset() ; int port = WebLib.choosePort() ; DataService dSrv = new DataService(dsg) ; dSrv.addEndpoint(Operation.Query, "q") ; dSrv.addEndpoint(Operation.GSP_R, "gsp") ; FusekiServer server = FusekiServer.create() .add("/dsrv1", dSrv) .port(port) .build() ; server.start() ; try { query("http://localhost:"+port+"/dsrv1/q","ASK{}",x->{}) ; String x1 = HttpOp.execHttpGetString("http://localhost:"+port+"/dsrv1/gsp") ; assertNotNull(x1) ; } finally { server.stop() ; } }
@Test public void embedded_20() { DatasetGraph dsg = dataset() ; int port = WebLib.choosePort() ; DataService dSrv = new DataService(dsg) ; dSrv.addEndpoint(Operation.Query, "q") ; dSrv.addEndpoint(Operation.GSP_R, "gsp") ; FusekiServer server = FusekiServer.create() .add("/dsrv1", dSrv) .port(port) .build() ; server.start() ; try { query("http://localhost:"+port+"/dsrv1/q","ASK{}",x->{}) ; String x1 = HttpOp.execHttpGetString("http://localhost:"+port+"/dsrv1/gsp") ; assertNotNull(x1) ; } finally { server.stop() ; } }
@Test public void embedded_21() { DatasetGraph dsg = dataset() ; int port = WebLib.choosePort() ; DataService dSrv = new DataService(dsg) ; dSrv.addEndpoint(Operation.Query, "q") ; dSrv.addEndpoint(Operation.GSP_R, "gsp") ; FusekiServer server = FusekiServer.create() .add("/dsrv1", dSrv) .staticFileBase(DIR) .port(port) .build() ; server.start() ; try { query("http://localhost:"+port+"/dsrv1/q","ASK{}",x->{}) ; String x1 = HttpOp.execHttpGetString("http://localhost:"+port+"/dsrv1/gsp") ; assertNotNull(x1) ; // Static String x2 = HttpOp.execHttpGetString("http://localhost:"+port+"/test.txt"); assertNotNull(x2) ; } finally { server.stop() ; } }
@Test public void embedded_21() { DatasetGraph dsg = dataset() ; int port = FusekiLib.choosePort() ; DataService dSrv = new DataService(dsg) ; dSrv.addEndpoint(Operation.Query, "q") ; dSrv.addEndpoint(Operation.GSP_R, "gsp") ; FusekiServer server = FusekiServer.create() .add("/dsrv1", dSrv) .setStaticFileBase(DIR) .setPort(port) .build() ; server.start() ; try { query("http://localhost:"+port+"/dsrv1/q","ASK{}",x->{}) ; String x1 = HttpOp.execHttpGetString("http://localhost:"+port+"/dsrv1/gsp") ; assertNotNull(x1) ; // Static String x2 = HttpOp.execHttpGetString("http://localhost:"+port+"/test.txt"); assertNotNull(x2) ; } finally { server.stop() ; } }
@Test public void embedded_21() { DatasetGraph dsg = dataset() ; int port = WebLib.choosePort() ; DataService dSrv = new DataService(dsg) ; dSrv.addEndpoint(Operation.Query, "q") ; dSrv.addEndpoint(Operation.GSP_R, "gsp") ; FusekiServer server = FusekiServer.create() .add("/dsrv1", dSrv) .staticFileBase(DIR) .port(port) .build() ; server.start() ; try { query("http://localhost:"+port+"/dsrv1/q","ASK{}",x->{}) ; String x1 = HttpOp.execHttpGetString("http://localhost:"+port+"/dsrv1/gsp") ; assertNotNull(x1) ; // Static String x2 = HttpOp.execHttpGetString("http://localhost:"+port+"/test.txt"); assertNotNull(x2) ; } finally { server.stop() ; } }
DataService dSrv = new DataService(DatasetGraphFactory.createTxnMem()); FusekiBuilder.populateStdServices(dSrv, false); AuthPolicy reqAuth = Auth.policyAllowSpecific("user1");
DataService dSrv = new DataService(DatasetGraphFactory.createTxnMem()); FusekiBuilder.populateStdServices(dSrv, false); AuthPolicy reqAuth = Auth.policyAllowSpecific("user1");
DataService dataService = new DataService(dsg) ; dataService.addEndpoint(Operation.Quads_RW, ""); dataService.addEndpoint(Operation.Query, "");