i am building a graph in a jave program and i wanted to see it visualy in my trial version of the CloverGUI i am using the following code to use the GraphXMLReaderWriter to out put the graph:
transformGraph.checkConfig(null);
transformGraph.setTrackingInterval(1000 * 1); //time in milliseconds
transformGraph.init();
TransformationGraphXMLReaderWriter xmlWriter = new TransformationGraphXMLReaderWriter(transformGraph);
try {
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.newDocument();
xmlWriter.write(doc);
OutputFormat format = new OutputFormat( doc ); //Serialize DOM
StringWriter stringOut = new StringWriter(); //Writer will be a String
XMLSerializer serial = new XMLSerializer( stringOut, format );
serial.asDOMSerializer(); // As a DOM Serializer
serial.serialize(doc.getDocumentElement());
System.out.println( "STRXML = " + stringOut.toString() ); //Spit out DOM as a String
} catch ( Exception ex ) {
ex.printStackTrace();
}
However when i try to open this in the CloverGUI i just get a error message saying: Graph loading error: null
(null)
what changes to the GraphXMLReaderWriter output do i need or can it be done.
this is the output of the graph that i get:
<?xml version="1.0" encoding="UTF-8"?>truetrue<Node id=“srbrecrAddSourceFields” joinKey=“prospect_pidm=SRBRECR_PIDM” joinType=“leftOuter” slaveDuplicates=“false” transform=“//#TL function transform() { $ProspectRawFields.prospect_pidm := $Prospect.prospect_pidm; $ProspectRawFields.SRBRECR_LEVL_CODE := $srbrecrSelectedFields.SRBRECR_LEVL_CODE : “UG”; $ProspectRawFields.SRBRECR_CAMP_CODE := $srbrecrSelectedFields.SRBRECR_CAMP_CODE : “U”; $ProspectRawFields.SRBRECR_COLL_CODE := $srbrecrSelectedFields.SRBRECR_COLL_CODE : “UP”; }” type=“MERGE_JOIN”/>