static public Namespace gatherNamespaces(Bundle bundle, ProvFactory pFactory) { NamespaceGatherer gatherer=new NamespaceGatherer(); u.forAllStatement(bundle.getStatement(), gatherer); gatherer.register(bundle.getId()); Namespace ns=gatherer.getNamespace(); Namespace ns2=pFactory.newNamespace(ns); return ns2; }
@Override public void doAction(Bundle bu, ProvUtilities u) { register(bu.getId()); for (Statement s2: bu.getStatement()) { u.doAction(s2, this); } }
@Override public void doAction(WasDerivedFrom der) { register(der.getId()); register(der.getGeneratedEntity()); register(der.getUsedEntity()); register(der.getActivity()); register(der.getGeneration()); register(der.getUsage()); registerType(der.getType()); registerOther(der.getOther()); }
public String displaySize(HasOther p) { for (Other o: p.getOther()) { if (SUM_SIZE.equals(o.getElementName())) { return " (" + o.getConvertedValue() + ")"; } } return ""; }
public WasGeneratedBy newWasGeneratedBy(QualifiedName id, QualifiedName aid, String role, QualifiedName pid) { WasGeneratedBy res = of.createWasGeneratedBy(); res.setId(id); res.setActivity(pid); res.setEntity(aid); if (role!=null) addRole(res, newRole(role,getName().XSD_STRING)); return res; }
@Override public void doAction(WasInvalidatedBy inv) { register(inv.getId()); register(inv.getEntity()); register(inv.getActivity()); registerLocation(inv.getLocation()); registerRole(inv.getRole()); registerType(inv.getType()); registerOther(inv.getOther()); }
public TreeTraversal(ModelConstructor c, ProvFactory pFactory) { this.c=c; this.pFactory=pFactory; this.name=pFactory.getName(); this.namespace=pFactory.newNamespace(); this.namespace.addKnownNamespaces(); this.vconv=new ValueConverter(pFactory); }
@Override public void doAction(WasAttributedTo attr) { register(attr.getId()); register(attr.getEntity()); register(attr.getAgent()); registerType(attr.getType()); registerOther(attr.getOther()); }
static public Namespace gatherNamespaces(Document doc) { NamespaceGatherer gatherer=new NamespaceGatherer(); u.forAllStatementOrBundle(doc.getStatementOrBundle(), gatherer); Namespace ns=gatherer.getNamespace(); return ns; }
/** 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 WasAttributedTo newWasAttributedTo(QualifiedName id, QualifiedName entity, QualifiedName agent, Collection<Attribute> attributes) { WasAttributedTo res = of.createWasAttributedTo(); res.setId(id); res.setEntity(entity); res.setAgent(agent); setAttributes(res, attributes); return res; }
public Other newOther(QualifiedName elementName, Object value, QualifiedName type) { if (value==null) return null; Other res = of.createOther(); res.setType(type); res.setValueFromObject(value); res.setElementName(elementName); return res; }
static public Namespace gatherNamespaces(Bundle bundle) { NamespaceGatherer gatherer=new NamespaceGatherer(); u.forAllStatement(bundle.getStatement(), gatherer); gatherer.register(bundle.getId()); Namespace ns=gatherer.getNamespace(); return ns; }
public WasGeneratedBy newWasGeneratedBy(QualifiedName id, QualifiedName aid, String role, QualifiedName pid) { WasGeneratedBy res = of.createWasGeneratedBy(); res.setId(id); res.setActivity(pid); res.setEntity(aid); if (role!=null) addRole(res, newRole(role,getName().XSD_STRING)); return res; }
public TreeTraversal(ModelConstructor c, ProvFactory pFactory) { this.c=c; this.pFactory=pFactory; this.name=pFactory.getName(); this.namespace=pFactory.newNamespace(); this.namespace.addKnownNamespaces(); this.vconv=new ValueConverter(pFactory); }
@Override public void doAction(Bundle bu, ProvUtilities u) { register(bu.getId()); for (Statement s2: bu.getStatement()) { u.doAction(s2, this); } }
static public Namespace gatherNamespaces(Bundle bundle, ProvFactory pFactory) { NamespaceGatherer gatherer=new NamespaceGatherer(); u.forAllStatement(bundle.getStatement(), gatherer); gatherer.register(bundle.getId()); Namespace ns=gatherer.getNamespace(); Namespace ns2=pFactory.newNamespace(ns); return ns2; }