private static Dataset createAssembler() { String assemblerFile = "text-config-es.ttl"; Dataset ds = DatasetFactory.assemble(assemblerFile, "http://localhost/jena_example/#text_dataset") ; return ds; }
public static Dataset createAssembler() { log.info("Construct text dataset using an assembler description") ; // There are two datasets in the configuration: // the one for the base data and one with text index. // Therefore we need to name the dataset we are interested in. Dataset ds = DatasetFactory.assemble("text-config.ttl", "http://localhost/jena_example/#text_dataset") ; return ds ; }
public static Dataset createLuceneAssembler() { log.info("Construct lucene spatial dataset using an assembler description"); Dataset ds = DatasetFactory.assemble("src/test/resources/spatial-config.ttl", "http://localhost/jena_example/#spatial_dataset"); return ds; }
public static Dataset createAssembler() { log.info("Construct text dataset using an assembler description") ; // There are two datasets in the configuration: // the one for the base data and one with text index. // Therefore we need to name the dataset we are interested in. Dataset ds = DatasetFactory.assemble("text-config.ttl", "http://localhost/jena_example/#text_dataset") ; return ds ; }
public static Dataset createLuceneAssembler() { log.info("Construct lucene spatial dataset using an assembler description"); Dataset ds = DatasetFactory.assemble("src/test/resources/spatial-config.ttl", "http://localhost/jena_example/#spatial_dataset"); return ds; }
/** * Assemble a dataset from the model in a file * * @param filename The filename * @return Dataset */ public static Dataset assemble(String filename) { Objects.requireNonNull(filename, "file name can not be null") ; Model model = FileManager.get().loadModel(filename); return assemble(model); }
/** * Assemble a dataset from the model in a file * * @param filename The filename * @param resourceURI URI for the dataset to assembler * @return Dataset */ public static Dataset assemble(String filename, String resourceURI) { Objects.requireNonNull(filename, "file name can not be null") ; Objects.requireNonNull(resourceURI, "resourceURI can not be null") ; Model model = FileManager.get().loadModel(filename); Resource r = model.createResource(resourceURI); return assemble(r); }
/** * Assemble a dataset from the model * * @param model * @return Dataset */ public static Dataset assemble(Model model) { Objects.requireNonNull(model, "model can not be null") ; Resource r = GraphUtils.findRootByType(model, DatasetAssembler.getType()); if (r == null) throw new ARQException("No root found for type <" + DatasetAssembler.getType() + ">"); return assemble(r); }