public void forAllStatementOrBundle(List<StatementOrBundle> records, StatementAction action) { for (StatementOrBundle o : records) { doAction(o, action); } } public void forAllStatement(List<Statement> records, StatementAction action) {
public void forAllStatement(List<Statement> records, StatementAction action) { for (Statement o : records) { doAction(o, action); } }
public void forAllStatementOrBundle(List<StatementOrBundle> records, StatementAction action) { for (StatementOrBundle o : records) { doAction(o, action); } } public void forAllStatement(List<Statement> records, StatementAction action) {
public void forAllStatement(List<Statement> records, StatementAction action) { for (Statement o : records) { doAction(o, action); } }
@SuppressWarnings("unchecked") public <T extends Statement> T newStatement(T s) { return (T) util.doAction(s,new Cloner()); }
@SuppressWarnings("unchecked") public <T extends Statement> T newStatement(T s) { return (T) util.doAction(s,new Cloner()); }
@Override public void doAction(Bundle bu, ProvUtilities u) { register(bu.getId()); for (Statement s2: bu.getStatement()) { u.doAction(s2, this); } }
@Override public void doAction(Bundle bu, ProvUtilities u) { register(bu.getId()); for (Statement s2: bu.getStatement()) { u.doAction(s2, this); } }
public Document doAction(Document doc) { List<Bundle> bRecords = new LinkedList<Bundle>(); List<Statement> sRecords = new LinkedList<Statement>(); Namespace docNamespace=doc.getNamespace(); Namespace.withThreadNamespace(docNamespace); c.startDocument(doc.getNamespace()); for (Statement s : u.getStatement(doc)) { sRecords.add((Statement) u.doAction(s, this)); } for (Bundle bu : u.getNamedBundle(doc)) { Namespace.withThreadNamespace(new Namespace(docNamespace)); Bundle o = doAction(bu,u); if (o != null) bRecords.add(o); } return c.newDocument(doc.getNamespace(), sRecords, bRecords); }
public Document doAction(Document doc) { List<Bundle> bRecords = new LinkedList<Bundle>(); List<Statement> sRecords = new LinkedList<Statement>(); Namespace docNamespace=doc.getNamespace(); Namespace.withThreadNamespace(docNamespace); c.startDocument(doc.getNamespace()); for (Statement s : u.getStatement(doc)) { sRecords.add((Statement) u.doAction(s, this)); } for (Bundle bu : u.getNamedBundle(doc)) { Namespace.withThreadNamespace(new Namespace(docNamespace)); Bundle o = doAction(bu,u); if (o != null) bRecords.add(o); } return c.newDocument(doc.getNamespace(), sRecords, bRecords); }
public Bundle doAction(Bundle b, ProvUtilities u) { List<Statement> sRecords = new LinkedList<Statement>(); QualifiedName bundleId=b.getId(); Namespace old=Namespace.getThreadNamespace(); Namespace bundleNamespace; if (b.getNamespace()!=null) { bundleNamespace=new Namespace(b.getNamespace()); } else { bundleNamespace=new Namespace(); } bundleNamespace.setParent(new Namespace(old)); //ensure to make a copy of old, since setting might otherwise create a loop Namespace.withThreadNamespace(bundleNamespace); c.startBundle(bundleId, b.getNamespace()); for (Statement s : u.getStatement(b)) { sRecords.add((Statement) u.doAction(s, this)); } return c.newNamedBundle(bundleId, b.getNamespace(), sRecords); }
public Bundle doAction(Bundle b, ProvUtilities u) { List<Statement> sRecords = new LinkedList<Statement>(); QualifiedName bundleId=b.getId(); Namespace old=Namespace.getThreadNamespace(); Namespace bundleNamespace; if (b.getNamespace()!=null) { bundleNamespace=new Namespace(b.getNamespace()); } else { bundleNamespace=new Namespace(); } bundleNamespace.setParent(new Namespace(old)); //ensure to make a copy of old, since setting might otherwise create a loop Namespace.withThreadNamespace(bundleNamespace); c.startBundle(bundleId, b.getNamespace()); for (Statement s : u.getStatement(b)) { sRecords.add((Statement) u.doAction(s, this)); } return c.newNamedBundle(bundleId, b.getNamespace(), sRecords); }