I am trying to analyse large datadumps for my semantic web project which I created with eclipse/jena. I am using tdb database, which works fine for 2gb but I am experiencing memory issues with files over 6gb. My goal is to extract all predicates objects and subjects from a datasource (and write them into json files). Is there a way that I can directly query tdb data without loading all into a model ? Also : does model.read in the following code also store the entire data in memory ?
HttpSession session = request.getSession();
session.setAttribute("dataSource", data);
ServletContext servletContext = request.getServletContext();
String tdbPath = servletContext.getRealPath("/tdb");
File dir = new File(contextPath);
Dataset dataset = TDBFactory.createDataset(tdbPath);
Model model = dataset.getDefaultModel();
InputStream str = FileManager.get().open(data);
model.read(str,null);