I have a .trig file which I want to query without pushing to Jena Fuseki. However when I try to load the model using:
Model model= FileManager.get().loadModel("filepath/demo.trig");
certain links in the original TRIG file are getting lost.
this is the code snippet:
FileManager.get().addLocatorClassLoader(RDFProject.class.getClassLoader());
Model model= FileManager.get().loadModel("filePath/demo.trig");
model.write(System.out);
Is there any alternate way to do this?
Use RDFDataMgr
to load a dataset (not a model) and query that.
Dataset ds = RDFDataMgr.loadDataset("filepath/demo.trig");