}
private List<TcxRoute> process(TrainingCenterDatabaseT trainingCenterDatabaseT) {
List<TcxRoute> result = new ArrayList<TcxRoute>();
ActivityListT activityListT = trainingCenterDatabaseT.getActivities();
if (activityListT != null) {
// TrainingCenterDatabase -> ActivityList -> Activity -> ActivityLap -> Track -> TrackPoint -> Position
for (ActivityT activityT : activityListT.getActivity()) {
result.addAll(process(activityT));
}
// TrainingCenterDatabase -> ActivityList -> MultiSportSession -> FirstSport -> Activity -> ActivityLap -> Track -> TrackPoint -> Position
// TrainingCenterDatabase -> ActivityList -> MultiSportSession -> NextSport -> Activity -> ActivityLap -> Track -> TrackPoint -> Position
// TrainingCenterDatabase -> ActivityList -> MultiSportSession -> NextSport -> ActivityLap -> Track -> TrackPoint -> Position
for (MultiSportSessionT multiSportSessionT : activityListT.getMultiSportSession()) {
result.addAll(process(multiSportSessionT.getFirstSport().getActivity()));
for (NextSportT nextSportT : multiSportSessionT.getNextSport()) {
result.addAll(process(nextSportT.getActivity()));
result.add(process(nextSportT.getTransition()));
}