Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
API
Commits
20e2dc83
Commit
20e2dc83
authored
Aug 04, 2017
by
Tobias Meuser
Browse files
Made the serializable classes xml-serializable
parent
e5a2181d
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/de/tudarmstadt/maki/simonstrator/api/component/vehicular/roadnetwork/SerializableRoadNetwork.java
View file @
20e2dc83
...
...
@@ -26,13 +26,22 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
javax.xml.bind.annotation.XmlElement
;
import
javax.xml.bind.annotation.XmlRootElement
;
@XmlRootElement
public
class
SerializableRoadNetwork
implements
Serializable
{
/**
*
*/
private
static
final
long
serialVersionUID
=
-
8523360385937842443L
;
@XmlElement
(
name
=
"roadNetwork"
)
private
Map
<
String
,
SerializableRoadNetworkEdge
>
_roadNetwork
;
private
SerializableRoadNetwork
()
{
}
public
SerializableRoadNetwork
(
RoadNetwork
pRoadNetwork
)
{
_roadNetwork
=
new
HashMap
<>();
for
(
RoadNetworkEdge
edge
:
pRoadNetwork
.
getAvailableEdges
())
{
...
...
src/de/tudarmstadt/maki/simonstrator/api/component/vehicular/roadnetwork/SerializableRoadNetworkEdge.java
View file @
20e2dc83
...
...
@@ -25,20 +25,30 @@ import java.util.ArrayList;
import
java.util.Collections
;
import
java.util.List
;
import
javax.xml.bind.annotation.XmlElement
;
public
class
SerializableRoadNetworkEdge
implements
Serializable
{
/**
*
*/
private
static
final
long
serialVersionUID
=
-
311466941428215723L
;
@XmlElement
(
name
=
"edgeID"
)
private
String
_edgeID
;
@XmlElement
(
name
=
"angle"
)
private
double
_angle
;
@XmlElement
(
name
=
"lanes"
)
private
List
<
SerializableRoadNetworkLane
>
_lanes
=
new
ArrayList
<>();
@XmlElement
(
name
=
"maxSpeed"
)
private
double
_maxSpeed
=
0
;
private
List
<
String
>
_accessibleEdgeIDs
=
new
ArrayList
<>();
private
SerializableRoadNetworkEdge
()
{
}
public
SerializableRoadNetworkEdge
(
RoadNetworkEdge
pEdge
)
{
_edgeID
=
pEdge
.
getEdgeID
();
_angle
=
pEdge
.
getAngle
();
...
...
src/de/tudarmstadt/maki/simonstrator/api/component/vehicular/roadnetwork/SerializableRoadNetworkLane.java
View file @
20e2dc83
...
...
@@ -22,13 +22,20 @@ package de.tudarmstadt.maki.simonstrator.api.component.vehicular.roadnetwork;
import
java.io.Serializable
;
import
javax.xml.bind.annotation.XmlElement
;
public
class
SerializableRoadNetworkLane
implements
Serializable
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1504425570955552005L
;
@XmlElement
(
name
=
"laneID"
)
private
String
_laneID
;
private
SerializableRoadNetworkLane
()
{
}
public
SerializableRoadNetworkLane
(
RoadNetworkLane
pLane
)
{
_laneID
=
pLane
.
getLaneID
();
}
...
...
src/de/tudarmstadt/maki/simonstrator/api/component/vehicular/roadnetwork/routing/BreathFirstSearchRoutingAlgorithm.java
→
src/de/tudarmstadt/maki/simonstrator/api/component/vehicular/roadnetwork/routing/Brea
d
thFirstSearchRoutingAlgorithm.java
View file @
20e2dc83
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment