/** * RDFHandlerBase overrides */ @Override public void handleNamespace(String prefix, String namespace) { if (prefix.equals("")) { prefix = "def"; } this.document.getNamespace().register(prefix, namespace); //pFactory.setNamespaces(this.document.getNss()); //this.revnss.put(namespace, prefix); }
@Override public Document newDocument(Namespace namespace, Collection<Statement> statements, Collection<Bundle> bundles) { Document res = of.createDocument(); res.setNamespace(namespace); res.getStatementOrBundle() .addAll(statements); res.getStatementOrBundle() .addAll(bundles); return res; }
public Document newDocument(Document graph) { Document res = of.createDocument(); res.getStatementOrBundle() .addAll(graph.getStatementOrBundle()); if (graph.getNamespace()!=null) { res.setNamespace(new Namespace(graph.getNamespace())); } return res; }
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 newDocument(Collection<Activity> ps, Collection<Entity> as, Collection<Agent> ags, Collection<Statement> lks) { Document res = of.createDocument(); res.getStatementOrBundle().addAll(ps); res.getStatementOrBundle().addAll(as); res.getStatementOrBundle().addAll(ags); res.getStatementOrBundle().addAll(lks); return res; }
/** * @return the suite of tests being tested */ public void updateNamespaces(Document doc) { Namespace ns=Namespace.gatherNamespaces(doc); doc.setNamespace(ns); }
/** Initializes a Document's namespace. */ public void setNamespaces(Document doc) { if (doc.getNamespace() == null) doc.setNamespace(new Namespace()); }
public Document newDocument(Collection<Activity> ps, Collection<Entity> as, Collection<Agent> ags, Collection<Statement> lks) { Document res = of.createDocument(); res.getStatementOrBundle().addAll(ps); res.getStatementOrBundle().addAll(as); res.getStatementOrBundle().addAll(ags); res.getStatementOrBundle().addAll(lks); return res; }
public Document newDocument(Document graph) { Document res = of.createDocument(); res.getStatementOrBundle() .addAll(graph.getStatementOrBundle()); if (graph.getNamespace()!=null) { res.setNamespace(new Namespace(graph.getNamespace())); } return res; }
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); } }
/** * @return the suite of tests being tested */ public void updateNamespaces(Document doc) { Namespace ns = Namespace.gatherNamespaces(doc); doc.setNamespace(ns); }
@Override public Document newDocument(Namespace namespace, Collection<Statement> statements, Collection<Bundle> bundles) { Document res = of.createDocument(); res.setNamespace(namespace); res.getStatementOrBundle() .addAll(statements); res.getStatementOrBundle() .addAll(bundles); return res; }
public boolean check(Document d1, Document d2) { return statementListEqual(d1.getStatementOrBundle(), d2.getStatementOrBundle()); }
/** * RDFHandlerBase overrides */ @Override public void handleNamespace(String prefix, String namespace) { if (prefix.equals("")) { prefix = "def"; } this.document.getNamespace().register(prefix, namespace); //pFactory.setNamespaces(this.document.getNss()); //this.revnss.put(namespace, prefix); }
/** * @return the suite of tests being tested */ public void updateNamespaces(Document doc) { Namespace ns = Namespace.gatherNamespaces(doc); doc.setNamespace(ns); }
public Document expander(Document docIn, Bindings bindings1) { Bundle bun = (Bundle) docIn.getStatementOrBundle().get(0); Groupings grp1 = Groupings.fromDocument(docIn); logger.debug("expander: Found groupings " + grp1); Bundle bun1 = (Bundle) expand(bun, bindings1, grp1).get(0); Document doc1 = pf.newDocument(); doc1.getStatementOrBundle().add(bun1); bun1.setNamespace(Namespace.gatherNamespaces(bun1)); doc1.setNamespace(new Namespace()); return doc1; }
public boolean check(Document d1, Document d2) { return statementListEqual(d1.getStatementOrBundle(), d2.getStatementOrBundle()); }
public String serialiseDocument (StringWriter sw, Document graph, boolean format) throws JAXBException { Marshaller m=jc.createMarshaller(); m.setProperty("jaxb.formatted.output",format); configurePrefixes(m,graph.getNamespace()); m.marshal(of.createDocument(graph),sw); return sw.toString(); }
/** * @return the suite of tests being tested */ public void updateNamespaces(Document doc) { doc.setNamespace(Namespace.gatherNamespaces(doc)); }
public Document expander(Document docIn, Bindings bindings1) { Bundle bun = (Bundle) docIn.getStatementOrBundle().get(0); Groupings grp1 = Groupings.fromDocument(docIn); logger.debug("expander: Found groupings " + grp1); Bundle bun1 = (Bundle) expand(bun, bindings1, grp1).get(0); Document doc1 = pf.newDocument(); doc1.getStatementOrBundle().add(bun1); bun1.setNamespace(Namespace.gatherNamespaces(bun1)); doc1.setNamespace(new Namespace()); return doc1; }