Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kieker-TeeTime-Stages
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeeTime
Kieker-TeeTime-Stages
Commits
1f23824a
Commit
1f23824a
authored
9 years ago
by
Sören Henning
Browse files
Options
Downloads
Patches
Plain Diff
added simple JAXB marshaling test
parent
942249fe
No related branches found
No related tags found
1 merge request
!17
Get impletemented stages and Java 8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/kieker/analysis/graph/GraphTester.java
+33
-17
33 additions, 17 deletions
src/main/java/kieker/analysis/graph/GraphTester.java
with
33 additions
and
17 deletions
src/main/java/kieker/analysis/graph/GraphTester.java
+
33
−
17
View file @
1f23824a
package
kieker.analysis.graph
;
package
kieker.analysis.graph
;
import
javax.xml.bind.JAXBContext
;
import
javax.xml.bind.JAXBElement
;
import
javax.xml.bind.JAXBException
;
import
javax.xml.bind.Marshaller
;
import
org.graphdrawing.graphml.EdgeType
;
import
org.graphdrawing.graphml.GraphType
;
import
org.graphdrawing.graphml.GraphmlType
;
import
org.graphdrawing.graphml.KeyType
;
import
org.graphdrawing.graphml.NodeType
;
import
org.graphdrawing.graphml.ObjectFactory
;
import
kieker.analysis.graph.impl.GraphImpl
;
import
kieker.analysis.graph.impl.GraphImpl
;
public
class
GraphTester
{
public
class
GraphTester
{
...
@@ -73,23 +85,27 @@ public class GraphTester {
...
@@ -73,23 +85,27 @@ public class GraphTester {
System
.
out
.
println
(
edge
.
getId
());
System
.
out
.
println
(
edge
.
getId
());
}
}
// GraphmlType graphmlType = new GraphmlType();
GraphmlType
graphmlType
=
new
GraphmlType
();
// graphmlType.getKey().add(new KeyType());
graphmlType
.
getKey
().
add
(
new
KeyType
());
// graphmlType.getGraphOrData().add(new GraphType());
GraphType
graphType
=
new
GraphType
();
graphType
.
getDataOrNodeOrEdge
().
add
(
new
NodeType
());
// ERROR als Element ist nicht möglich, weil eine @XmlRootElement-Annotation fehlt
graphType
.
getDataOrNodeOrEdge
().
add
(
new
NodeType
());
graphType
.
getDataOrNodeOrEdge
().
add
(
new
EdgeType
());
/*
graphmlType
.
getGraphOrData
().
add
(
graphType
);
* try {
* JAXBContext context = JAXBContext.newInstance(GraphmlType.class);
try
{
* Marshaller m = context.createMarshaller();
JAXBContext
context
=
JAXBContext
.
newInstance
(
GraphmlType
.
class
);
* m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
Marshaller
m
=
context
.
createMarshaller
();
* m.marshal(graphmlType, System.out);
m
.
setProperty
(
Marshaller
.
JAXB_FORMATTED_OUTPUT
,
Boolean
.
TRUE
);
* } catch (JAXBException e) {
* // TODO Auto-generated catch block
ObjectFactory
objectFactory
=
new
ObjectFactory
();
* e.printStackTrace();
JAXBElement
<
GraphmlType
>
element
=
objectFactory
.
createGraphml
(
graphmlType
);
* }
*/
m
.
marshal
(
element
,
System
.
out
);
}
catch
(
JAXBException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
// Use object factory
// Use object factory
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment