diff --git a/data-collectors/radelt/src/main/java/com/opendatahub/bdp/radelt/dto/aktionen/RadeltChallengeDto.java b/data-collectors/radelt/src/main/java/com/opendatahub/bdp/radelt/dto/aktionen/RadeltChallengeDto.java index d2117375..c713a05f 100644 --- a/data-collectors/radelt/src/main/java/com/opendatahub/bdp/radelt/dto/aktionen/RadeltChallengeDto.java +++ b/data-collectors/radelt/src/main/java/com/opendatahub/bdp/radelt/dto/aktionen/RadeltChallengeDto.java @@ -15,12 +15,12 @@ public class RadeltChallengeDto { private String name; private String shortName; private String headerImage; - private long start; - private long end; - private long registrationStart; - private long entryStart; - private long registrationEnd; - private long entryEnd; + private String start; + private String end; + private String registrationStart; + private String entryStart; + private String registrationEnd; + private String entryEnd; private String type; @JsonProperty("isExternal") private boolean isExternal; @@ -62,100 +62,52 @@ public void setHeaderImage(String headerImage) { this.headerImage = headerImage; } - public long getStart() { + public String getStart() { return start; } public void setStart(String start) { - try { - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'"); - sdf.setTimeZone(TimeZone.getTimeZone("UTC")); - // Parse the date string to a Date object - Date date = sdf.parse(start); - this.start = date.getTime(); - } catch (ParseException e) { - e.printStackTrace(); - } - } - - public long getEntryStart() { + this.start = start; + } + + public String getEntryStart() { return entryStart; } public void setEntryStart(String entryStart) { - try{ - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'"); - sdf.setTimeZone(TimeZone.getTimeZone("UTC")); - // Parse the date string to a Date object - Date date = sdf.parse(entryStart); - this.entryStart = date.getTime(); - } catch (ParseException e) { - e.printStackTrace(); - } + this.entryStart = entryStart; } - public long getEnd() { + public String getEnd() { return end; } public void setEnd(String end) { - try { - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'"); - sdf.setTimeZone(TimeZone.getTimeZone("UTC")); - // Parse the date string to a Date object - Date date = sdf.parse(end); - this.end = date.getTime(); - } catch (ParseException e) { - e.printStackTrace(); - } - } - - public long getEntryEnd() { + this.end = end; + } + + public String getEntryEnd() { return entryEnd; } public void setEntryEnd(String entryEnd) { - try { - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'"); - sdf.setTimeZone(TimeZone.getTimeZone("UTC")); - // Parse the date string to a Date object - Date date = sdf.parse(entryEnd); - this.registrationStart = date.getTime(); - } catch (ParseException e) { - e.printStackTrace(); - } + this.registrationStart = registrationStart; } - public long getRegistrationStart() { + public String getRegistrationStart() { return registrationStart; } public void setRegistrationStart(String registrationStart) { - try { - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'"); - sdf.setTimeZone(TimeZone.getTimeZone("UTC")); - // Parse the date string to a Date object - Date date = sdf.parse(registrationStart); - this.registrationStart = date.getTime(); - } catch (ParseException e) { - e.printStackTrace(); - } - } - - public long getRegistrationEnd() { + this.registrationStart = registrationStart; + } + + public String getRegistrationEnd() { return registrationEnd; } public void setRegistrationEnd(String registrationEnd) { - try { - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'"); - sdf.setTimeZone(TimeZone.getTimeZone("UTC")); - // Parse the date string to a Date object - Date date = sdf.parse(registrationEnd); - this.registrationEnd = date.getTime(); - } catch (ParseException e) { - e.printStackTrace(); - } + this.registrationEnd = registrationEnd; } public String getType() { diff --git a/data-collectors/radelt/src/main/java/com/opendatahub/bdp/radelt/utils/MappingUtilsOrganisationen.java b/data-collectors/radelt/src/main/java/com/opendatahub/bdp/radelt/utils/MappingUtilsOrganisationen.java index 8ecb4261..2cd1c9f8 100644 --- a/data-collectors/radelt/src/main/java/com/opendatahub/bdp/radelt/utils/MappingUtilsOrganisationen.java +++ b/data-collectors/radelt/src/main/java/com/opendatahub/bdp/radelt/utils/MappingUtilsOrganisationen.java @@ -81,7 +81,7 @@ private StationDto mapToStationDto(RadeltOrganisationenDto organisation, if (challengeStatistics.getChallenge_id() != null) { stationDto.setId(String.valueOf(challengeStatistics.getId()) + "-" + String.valueOf(challengeStatistics.getChallenge_id())); - stationDto.setName(challengeStatistics.getName() + '-' + challengeStatistics.getChallenge_name()); + stationDto.setName(organisation.getName() + '-' + challengeStatistics.getChallenge_name()); stationDto.setStationType(DATA_TYPE); // METADATA