public static DatasetGraph initFuseki(URL rdfFile, String datasetName) { URI rdfFileUri = new File(rdfFile.getFile()).toURI(); DatasetGraph datasetGraph = DatasetGraphFactory.createMem(); RDFDataMgr.read(datasetGraph, rdfFileUri.toString()); ServerConfig serverConfig = FusekiConfig.defaultConfiguration(datasetName, datasetGraph, true); SPARQLServer fusekiServer = new SPARQLServer(serverConfig); Fuseki.setServer(fusekiServer); fusekiServer.start(); return datasetGraph; }
static { Fuseki.init(); }