Skip to content
Snippets Groups Projects
Commit 942249fe authored by Sören Henning's avatar Sören Henning
Browse files

test jaxb marshaling

parent fc4eb759
No related branches found
No related tags found
1 merge request!17Get impletemented stages and Java 8
package kieker.analysis.graph; package kieker.analysis.graph;
import kieker.analysis.graph.export.BlueprintsExporter;
import kieker.analysis.graph.export.DotExporter;
import kieker.analysis.graph.impl.GraphImpl; import kieker.analysis.graph.impl.GraphImpl;
public class GraphTester { public class GraphTester {
...@@ -75,15 +73,29 @@ public class GraphTester { ...@@ -75,15 +73,29 @@ public class GraphTester {
System.out.println(edge.getId()); System.out.println(edge.getId());
} }
// node2.addEdgeTo(node11); // GraphmlType graphmlType = new GraphmlType();
// graphmlType.getKey().add(new KeyType());
// Export to Blueprints // graphmlType.getGraphOrData().add(new GraphType());
BlueprintsExporter blueprintsExporter = new BlueprintsExporter(graph);
System.out.println(blueprintsExporter.export()); // ERROR als Element ist nicht möglich, weil eine @XmlRootElement-Annotation fehlt
DotExporter dotExporter = new DotExporter(graph); /*
System.out.println(dotExporter.export()); * try {
* JAXBContext context = JAXBContext.newInstance(GraphmlType.class);
* Marshaller m = context.createMarshaller();
* m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
* m.marshal(graphmlType, System.out);
* } catch (JAXBException e) {
* // TODO Auto-generated catch block
* e.printStackTrace();
* }
*/
// Use object factory
// http://blog.bdoughan.com/2012/07/jaxb-and-root-elements.html
// http://stackoverflow.com/questions/24519449/unable-to-marshal-type-as-an-element-because-it-is-missing-an-xmlrootelement-an
// http://stackoverflow.com/questions/819720/no-xmlrootelement-generated-by-jaxb
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment