@SuppressWarnings("unchecked") public List<Statement> getStatement(Bundle d) { List<?> res = d.getStatement(); return (List<Statement>) res; }
@SuppressWarnings("unchecked") public List<Statement> getStatement(Bundle d) { List<?> res = d.getStatement(); return (List<Statement>) res; }
public List<Relation> getRelations(Bundle d) { return getObject2(Relation.class, d.getStatement()); }
public List<Activity> getActivity(Bundle d) { return getObject2(Activity.class, d.getStatement()); }
public List<Activity> getActivity(Bundle d) { return getObject2(Activity.class, d.getStatement()); }
public Bundle newNamedBundle(QualifiedName id, Collection<Statement> lks) { Bundle res = of.createNamedBundle(); res.setId(id); if (lks != null) { res.getStatement().addAll(lks); } return res; } public Bundle newNamedBundle(QualifiedName id, Namespace namespace, Collection<Statement> statements) {
public Bundle newNamedBundle(QualifiedName id, Collection<Statement> lks) { Bundle res = of.createNamedBundle(); res.setId(id); if (lks != null) { res.getStatement().addAll(lks); } return res; } public Bundle newNamedBundle(QualifiedName id, Namespace namespace, Collection<Statement> statements) {
public JavaFile generateSpecification(Document doc, String name, String templateName, String packge, String resource) { Bundle bun=u.getBundle(doc).get(0); Set<QualifiedName> allVars=new HashSet<QualifiedName>(); Set<QualifiedName> allAtts=new HashSet<QualifiedName>(); for (Statement statement: bun.getStatement()) { Set<QualifiedName> vars=ExpandUtil.freeVariables(statement); allVars.addAll(vars); Set<QualifiedName> vars2=ExpandUtil.freeAttributeVariables(statement, pFactory); allAtts.addAll(vars2); } return generate(allVars,allAtts,name, templateName, packge, resource); }
public JavaFile generateSpecification(Document doc, String name, String templateName, String packge, String resource) { Bundle bun=u.getBundle(doc).get(0); Set<QualifiedName> allVars=new HashSet<QualifiedName>(); Set<QualifiedName> allAtts=new HashSet<QualifiedName>(); for (Statement statement: bun.getStatement()) { Set<QualifiedName> vars=ExpandUtil.freeVariables(statement); allVars.addAll(vars); Set<QualifiedName> vars2=ExpandUtil.freeAttributeVariables(statement, pFactory); allAtts.addAll(vars2); } return generate(allVars,allAtts,name, templateName, packge, resource); }
@Override public void doAction(Bundle bun, ProvUtilities provUtilities) { if (flatten) { provUtilities.forAllStatement(bun.getStatement(), this); } else { IndexedDocument iDoc=bundleMap.get(bun.getId()); if (iDoc==null) { iDoc=new IndexedDocument(pFactory, null,flatten); bundleMap.put(bun.getId(),iDoc); } u.forAllStatement(bun.getStatement(), iDoc); } }
@Override public void doAction(Bundle bun, ProvUtilities provUtilities) { if (flatten) { provUtilities.forAllStatement(bun.getStatement(), this); } else { IndexedDocument iDoc=bundleMap.get(bun.getId()); if (iDoc==null) { iDoc=new IndexedDocument(pFactory, null,flatten); bundleMap.put(bun.getId(),iDoc); } u.forAllStatement(bun.getStatement(), iDoc); } }
public Bundle newNamedBundle(QualifiedName id, Namespace namespace, Collection<Statement> statements) { Bundle res = of.createNamedBundle(); res.setId(id); res.setNamespace(namespace); if (statements != null) { res.getStatement().addAll(statements); } return res; }
public Bundle newNamedBundle(QualifiedName id, Namespace namespace, Collection<Statement> statements) { Bundle res = of.createNamedBundle(); res.setId(id); res.setNamespace(namespace); if (statements != null) { res.getStatement().addAll(statements); } return res; }
@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); } }
@Override public void doAction(Bundle bun, ProvUtilities provUtilities) { bun.setId(uniquify(bun.getId())); provUtilities.forAllStatement(bun.getStatement(), this); }
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; }
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; }
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; }
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; }