예제 #1
0
파일: Helper.java 프로젝트: GeoKnow/rsine
 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();
 }