public Document makeDocument() {
   Document graph = pFactory.newDocument();
   List<StatementOrBundle> ll = graph.getStatementOrBundle();
   Collection<Collection<StatementOrBundle>> acc = new LinkedList<Collection<StatementOrBundle>>();
   overallWorkflow(acc);
   for (Collection<StatementOrBundle> col : acc) ll.addAll(col);
   graph.setNamespace(Namespace.gatherNamespaces(graph));
   return graph;
 }
Ejemplo n.º 2
0
 public void serialiseDocument(OutputStream out, Document graph, boolean format)
     throws JAXBException {
   Marshaller m = jc.createMarshaller();
   m.setProperty("jaxb.formatted.output", format);
   configurePrefixes(m, graph.getNss());
   m.marshal(of.createDocument(graph), out);
 }
Ejemplo n.º 3
0
 public String serialiseDocument(StringWriter sw, Document graph, boolean format)
     throws JAXBException {
   Marshaller m = jc.createMarshaller();
   m.setProperty("jaxb.formatted.output", format);
   configurePrefixes(m, graph.getNss());
   m.marshal(of.createDocument(graph), sw);
   return sw.toString();
 }