Hello, Anuj-- I may be missing something about your question, but wouldn't Model.add(Model) [1] work here?
ajs6f [1] https://jena.apache.org/documentation/javadoc/jena/org/apache/jena/rdf/model/Model.html#add-org.apache.jena.rdf.model.Model- > On Apr 24, 2018, at 7:14 AM, anuj kumar <[email protected]> wrote: > > Hi, > I have a scenario, where I have an instance of a Model Object that contains > multiple Statements. > Now I want to index the statements in this Model in Jena Text ES indexing > implementation. > > *Question is*: How can i do that. :) > > Until now I was indexing data by reading the data from a file into a model > instance using RDFDataMgr which automatically binds the read with the index > lifecycle. This was done like this: > >> dataset.begin(ReadWrite.WRITE) ; >> try { >> Model m = dataset.getDefaultModel() ; >> RDFDataMgr.read(m, file) ; >> dataset.commit() ; >> } finally { dataset.end() ; } >> >> >> But now, instead of reading the triples from a file (or Inputstream), i > want to read the triples from a Model Instance. > > Can someone help me with this please. > > Thanks, > Anuj Kumar > > -- > *Anuj Kumar*
