private String serializeGraph(commonj.sdo.DataGraph graph) throws IOException { DefaultOptions options = new DefaultOptions(graph.getRootObject().getType().getURI()); options.setRootNamespacePrefix("debug"); XMLDocument doc = PlasmaXMLHelper.INSTANCE.createDocument(graph.getRootObject(), graph .getRootObject().getType().getURI(), null); ByteArrayOutputStream os = new ByteArrayOutputStream(); PlasmaXMLHelper.INSTANCE.save(doc, os, options); os.flush(); os.close(); String xml = new String(os.toByteArray()); return xml; }
protected String serializeGraph(commonj.sdo.DataGraph graph) { DefaultOptions options = new DefaultOptions(graph.getRootObject().getType().getURI()); options.setRootNamespacePrefix("debug"); XMLDocument doc = PlasmaXMLHelper.INSTANCE.createDocument(graph.getRootObject(), graph .getRootObject().getType().getURI(), null); ByteArrayOutputStream os = new ByteArrayOutputStream(); try { PlasmaXMLHelper.INSTANCE.save(doc, os, options); os.flush(); os.close(); } catch (IOException e) { log.error(e.getMessage(), e); // only used for debugging } String xml = new String(os.toByteArray()); return xml; }
protected String serializeGraph(commonj.sdo.DataGraph graph) throws IOException { DefaultOptions options = new DefaultOptions(graph.getRootObject().getType().getURI()); options.setRootNamespacePrefix("debug"); XMLDocument doc = PlasmaXMLHelper.INSTANCE.createDocument(graph.getRootObject(), graph .getRootObject().getType().getURI(), null); ByteArrayOutputStream os = new ByteArrayOutputStream(); PlasmaXMLHelper.INSTANCE.save(doc, os, options); os.flush(); os.close(); String xml = new String(os.toByteArray()); return xml; } }