/** This function allows a document to be merged with this IndexedDocument. If flatten is true, bundles include in the document will be flattend into this one. * * * @param doc the document to be merge into this */ public void merge(Document doc) { u.forAllStatementOrBundle(doc.getStatementOrBundle(), this); }
/** This function allows a document to be merged with this IndexedDocument. If flatten is true, bundles include in the document will be flattend into this one. * * * @param doc the document to be merge into this */ public void merge(Document doc) { u.forAllStatementOrBundle(doc.getStatementOrBundle(), this); }
public IndexedDocument(ProvFactory pFactory, Document doc, boolean flatten) { this.pFactory=pFactory; this.flatten=flatten; if (doc!=null) { this.nss=doc.getNamespace(); u.forAllStatementOrBundle(doc.getStatementOrBundle(), this); } }
public IndexedDocument(ProvFactory pFactory, Document doc, boolean flatten) { this.pFactory=pFactory; this.flatten=flatten; if (doc!=null) { this.nss=doc.getNamespace(); u.forAllStatementOrBundle(doc.getStatementOrBundle(), this); } }
public Document persistInTransaction(Document doc) { try { Dagify dagifier=new Dagify(entityManager,table); ProvUtilities u=new ProvUtilities(); u.forAllStatementOrBundle(doc.getStatementOrBundle(), dagifier); entityManager.persist(doc); return doc; } catch (RuntimeException re) { re.printStackTrace(); return null; // FIXME: why not re-throw exception } }
static public Namespace gatherNamespaces(Document doc) { NamespaceGatherer gatherer=new NamespaceGatherer(); u.forAllStatementOrBundle(doc.getStatementOrBundle(), gatherer); Namespace ns=gatherer.getNamespace(); return ns; }
static public Namespace gatherNamespaces(Document doc) { NamespaceGatherer gatherer=new NamespaceGatherer(); u.forAllStatementOrBundle(doc.getStatementOrBundle(), gatherer); Namespace ns=gatherer.getNamespace(); return ns; }
public Document persist(Document doc) { try { beginTransaction(); Dagify dagifier=new Dagify(entityManager,table); ProvUtilities u=new ProvUtilities(); u.forAllStatementOrBundle(doc.getStatementOrBundle(), dagifier); entityManager.persist(doc); return doc; } catch (RuntimeException re) { re.printStackTrace(); return null; // FIXME: why not re-throw exception } finally { commitTransaction(); } }