Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Karakas
SWP_SS24_Wetterdaten_sammeln
Commits
5d5d7815
Commit
5d5d7815
authored
Jun 04, 2024
by
Weiser
Browse files
progress
parent
888289d4
Changes
30
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/SWP/SS24/Wetterdaten_sammeln/configuration/LocalDateTimeConverter.java
0 → 100644
View file @
5d5d7815
package
com.SWP.SS24.Wetterdaten_sammeln.configuration
;
import
org.springframework.core.convert.converter.Converter
;
import
org.threeten.bp.LocalDateTime
;
import
org.threeten.bp.format.DateTimeFormatter
;
public
class
LocalDateTimeConverter
implements
Converter
<
String
,
LocalDateTime
>
{
private
final
DateTimeFormatter
formatter
;
public
LocalDateTimeConverter
(
String
dateFormat
)
{
this
.
formatter
=
DateTimeFormatter
.
ofPattern
(
dateFormat
);
}
@Override
public
LocalDateTime
convert
(
String
source
)
{
if
(
source
==
null
||
source
.
isEmpty
())
{
return
null
;
}
return
LocalDateTime
.
parse
(
source
,
this
.
formatter
);
}
}
src/main/java/com/SWP/SS24/Wetterdaten_sammeln/configuration/SwaggerDocumentationConfig.java
0 → 100644
View file @
5d5d7815
package
com.SWP.SS24.Wetterdaten_sammeln.configuration
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
io.swagger.v3.oas.models.OpenAPI
;
import
io.swagger.v3.oas.models.info.Info
;
@javax
.
annotation
.
Generated
(
value
=
"io.swagger.codegen.v3.generators.java.SpringCodegen"
,
date
=
"2024-06-04T09:41:03.559554872Z[GMT]"
)
@Configuration
public
class
SwaggerDocumentationConfig
{
@Bean
public
OpenAPI
openApi
()
{
return
new
OpenAPI
()
.
info
(
new
Info
()
.
title
(
"OpenWeatherMap API"
)
.
description
(
"Sample OpenWeather API."
)
.
termsOfService
(
""
)
.
version
(
"1.0"
));
}
}
src/main/java/com/SWP/SS24/Wetterdaten_sammeln/configuration/SwaggerUiConfiguration.java
0 → 100644
View file @
5d5d7815
package
com.SWP.SS24.Wetterdaten_sammeln.configuration
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.servlet.config.annotation.ViewControllerRegistry
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurer
;
@javax
.
annotation
.
Generated
(
value
=
"io.swagger.codegen.v3.generators.java.SpringCodegen"
,
date
=
"2024-06-04T09:41:03.559554872Z[GMT]"
)
@Configuration
public
class
SwaggerUiConfiguration
implements
WebMvcConfigurer
{
@Override
public
void
addViewControllers
(
ViewControllerRegistry
registry
)
{
registry
.
addViewController
(
"/swagger-ui/"
).
setViewName
(
"forward:/swagger-ui/index.html"
);
}
}
src/main/java/com/SWP/SS24/Wetterdaten_sammeln/entity/historicData.java
deleted
100644 → 0
View file @
888289d4
package
com.SWP.SS24.Wetterdaten_sammeln.entity
;
import
jakarta.persistence.Entity
;
import
jakarta.persistence.GeneratedValue
;
import
jakarta.persistence.GenerationType
;
import
jakarta.persistence.Id
;
@Entity
public
class
historicData
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
long
id
;
}
src/main/java/com/SWP/SS24/Wetterdaten_sammeln/model/Location.java
0 → 100644
View file @
5d5d7815
package
com.SWP.SS24.Wetterdaten_sammeln.model
;
import
java.util.Objects
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
java.math.BigDecimal
;
import
org.springframework.validation.annotation.Validated
;
import
javax.validation.Valid
;
import
javax.validation.constraints.*
;
/**
* Location
*/
@Validated
@javax
.
annotation
.
Generated
(
value
=
"io.swagger.codegen.v3.generators.java.SpringCodegen"
,
date
=
"2024-06-04T09:41:03.559554872Z[GMT]"
)
public
class
Location
{
@JsonProperty
(
"name"
)
private
String
name
=
null
;
@JsonProperty
(
"region"
)
private
String
region
=
null
;
@JsonProperty
(
"country"
)
private
String
country
=
null
;
@JsonProperty
(
"lon"
)
private
BigDecimal
lon
=
null
;
@JsonProperty
(
"lat"
)
private
BigDecimal
lat
=
null
;
@JsonProperty
(
"tz_id"
)
private
String
tzId
=
null
;
@JsonProperty
(
"localtime_epoch"
)
private
Integer
localtimeEpoch
=
null
;
@JsonProperty
(
"localtime"
)
private
String
localtime
=
null
;
public
Location
name
(
String
name
)
{
this
.
name
=
name
;
return
this
;
}
/**
* city name
*
* @return name
**/
@Schema
(
example
=
"stuttgart"
,
description
=
"city name"
)
@NotNull
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
Location
region
(
String
region
)
{
this
.
region
=
region
;
return
this
;
}
/**
* region
*
* @return region
**/
@Schema
(
example
=
"baden wuerttemberg"
,
description
=
"region"
)
@NotNull
public
String
getRegion
()
{
return
region
;
}
public
void
setRegion
(
String
region
)
{
this
.
region
=
region
;
}
public
Location
country
(
String
country
)
{
this
.
country
=
country
;
return
this
;
}
/**
* country
*
* @return country
**/
@Schema
(
example
=
"Germany"
,
description
=
"country"
)
@NotNull
public
String
getCountry
()
{
return
country
;
}
public
void
setCountry
(
String
country
)
{
this
.
country
=
country
;
}
public
Location
lon
(
BigDecimal
lon
)
{
this
.
lon
=
lon
;
return
this
;
}
/**
* City geo location, longitude
*
* @return lon
**/
@Schema
(
example
=
"48.78"
,
description
=
"City geo location, longitude"
)
@NotNull
@Valid
public
BigDecimal
getLon
()
{
return
lon
;
}
public
void
setLon
(
BigDecimal
lon
)
{
this
.
lon
=
lon
;
}
public
Location
lat
(
BigDecimal
lat
)
{
this
.
lat
=
lat
;
return
this
;
}
/**
* City geo location, latitude
*
* @return lat
**/
@Schema
(
example
=
"9.17"
,
description
=
"City geo location, latitude"
)
@NotNull
@Valid
public
BigDecimal
getLat
()
{
return
lat
;
}
public
void
setLat
(
BigDecimal
lat
)
{
this
.
lat
=
lat
;
}
public
Location
tzId
(
String
tzId
)
{
this
.
tzId
=
tzId
;
return
this
;
}
/**
* timezone id
*
* @return tzId
**/
@Schema
(
example
=
"europa/berlin"
,
description
=
"timezone id"
)
@NotNull
public
String
getTzId
()
{
return
tzId
;
}
public
void
setTzId
(
String
tzId
)
{
this
.
tzId
=
tzId
;
}
public
Location
localtimeEpoch
(
Integer
localtimeEpoch
)
{
this
.
localtimeEpoch
=
localtimeEpoch
;
return
this
;
}
/**
* unix time
*
* @return localtimeEpoch
**/
@Schema
(
example
=
"1717491434"
,
description
=
"unix time"
)
@NotNull
public
Integer
getLocaltimeEpoch
()
{
return
localtimeEpoch
;
}
public
void
setLocaltimeEpoch
(
Integer
localtimeEpoch
)
{
this
.
localtimeEpoch
=
localtimeEpoch
;
}
public
Location
localtime
(
String
localtime
)
{
this
.
localtime
=
localtime
;
return
this
;
}
/**
* current time
*
* @return localtime
**/
@Schema
(
example
=
"2001-10-09 10:07"
,
description
=
"current time"
)
@NotNull
public
String
getLocaltime
()
{
return
localtime
;
}
public
void
setLocaltime
(
String
localtime
)
{
this
.
localtime
=
localtime
;
}
@Override
public
boolean
equals
(
java
.
lang
.
Object
o
)
{
if
(
this
==
o
)
{
return
true
;
}
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
{
return
false
;
}
Location
location
=
(
Location
)
o
;
return
Objects
.
equals
(
this
.
name
,
location
.
name
)
&&
Objects
.
equals
(
this
.
region
,
location
.
region
)
&&
Objects
.
equals
(
this
.
country
,
location
.
country
)
&&
Objects
.
equals
(
this
.
lon
,
location
.
lon
)
&&
Objects
.
equals
(
this
.
lat
,
location
.
lat
)
&&
Objects
.
equals
(
this
.
tzId
,
location
.
tzId
)
&&
Objects
.
equals
(
this
.
localtimeEpoch
,
location
.
localtimeEpoch
)
&&
Objects
.
equals
(
this
.
localtime
,
location
.
localtime
);
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
name
,
region
,
country
,
lon
,
lat
,
tzId
,
localtimeEpoch
,
localtime
);
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
"class Location {\n"
);
sb
.
append
(
" name: "
).
append
(
toIndentedString
(
name
)).
append
(
"\n"
);
sb
.
append
(
" region: "
).
append
(
toIndentedString
(
region
)).
append
(
"\n"
);
sb
.
append
(
" country: "
).
append
(
toIndentedString
(
country
)).
append
(
"\n"
);
sb
.
append
(
" lon: "
).
append
(
toIndentedString
(
lon
)).
append
(
"\n"
);
sb
.
append
(
" lat: "
).
append
(
toIndentedString
(
lat
)).
append
(
"\n"
);
sb
.
append
(
" tzId: "
).
append
(
toIndentedString
(
tzId
)).
append
(
"\n"
);
sb
.
append
(
" localtimeEpoch: "
).
append
(
toIndentedString
(
localtimeEpoch
)).
append
(
"\n"
);
sb
.
append
(
" localtime: "
).
append
(
toIndentedString
(
localtime
)).
append
(
"\n"
);
sb
.
append
(
"}"
);
return
sb
.
toString
();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private
String
toIndentedString
(
java
.
lang
.
Object
o
)
{
if
(
o
==
null
)
{
return
"null"
;
}
return
o
.
toString
().
replace
(
"\n"
,
"\n "
);
}
}
src/main/java/com/SWP/SS24/Wetterdaten_sammeln/model/Model200.java
0 → 100644
View file @
5d5d7815
package
com.SWP.SS24.Wetterdaten_sammeln.model
;
import
java.util.Objects
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
org.springframework.validation.annotation.Validated
;
import
javax.validation.Valid
;
import
javax.validation.constraints.*
;
/**
* Model200
*/
@Validated
@javax
.
annotation
.
Generated
(
value
=
"io.swagger.codegen.v3.generators.java.SpringCodegen"
,
date
=
"2024-06-04T09:41:03.559554872Z[GMT]"
)
public
class
Model200
{
@JsonProperty
(
"location"
)
private
Location
location
=
null
;
@JsonProperty
(
"weather"
)
private
Weather
weather
=
null
;
public
Model200
location
(
Location
location
)
{
this
.
location
=
location
;
return
this
;
}
/**
* Get location
*
* @return location
**/
@Schema
(
description
=
""
)
@NotNull
@Valid
public
Location
getLocation
()
{
return
location
;
}
public
void
setLocation
(
Location
location
)
{
this
.
location
=
location
;
}
public
Model200
weather
(
Weather
weather
)
{
this
.
weather
=
weather
;
return
this
;
}
/**
* Get weather
*
* @return weather
**/
@Schema
(
description
=
""
)
@NotNull
@Valid
public
Weather
getWeather
()
{
return
weather
;
}
public
void
setWeather
(
Weather
weather
)
{
this
.
weather
=
weather
;
}
@Override
public
boolean
equals
(
java
.
lang
.
Object
o
)
{
if
(
this
==
o
)
{
return
true
;
}
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
{
return
false
;
}
Model200
_200
=
(
Model200
)
o
;
return
Objects
.
equals
(
this
.
location
,
_200
.
location
)
&&
Objects
.
equals
(
this
.
weather
,
_200
.
weather
);
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
location
,
weather
);
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
"class Model200 {\n"
);
sb
.
append
(
" location: "
).
append
(
toIndentedString
(
location
)).
append
(
"\n"
);
sb
.
append
(
" weather: "
).
append
(
toIndentedString
(
weather
)).
append
(
"\n"
);
sb
.
append
(
"}"
);
return
sb
.
toString
();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private
String
toIndentedString
(
java
.
lang
.
Object
o
)
{
if
(
o
==
null
)
{
return
"null"
;
}
return
o
.
toString
().
replace
(
"\n"
,
"\n "
);
}
}
src/main/java/com/SWP/SS24/Wetterdaten_sammeln/model/Weather.java
0 → 100644
View file @
5d5d7815
package
com.SWP.SS24.Wetterdaten_sammeln.model
;
import
java.util.Objects
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
java.math.BigDecimal
;
import
org.springframework.validation.annotation.Validated
;
import
javax.validation.Valid
;
import
javax.validation.constraints.*
;
/**
* Weather
*/
@Validated
@javax
.
annotation
.
Generated
(
value
=
"io.swagger.codegen.v3.generators.java.SpringCodegen"
,
date
=
"2024-06-04T09:41:03.559554872Z[GMT]"
)
public
class
Weather
{
@JsonProperty
(
"last_updated_epoch"
)
private
Integer
lastUpdatedEpoch
=
null
;
@JsonProperty
(
"last_updated"
)
private
String
lastUpdated
=
null
;
@JsonProperty
(
"temp_c"
)
private
BigDecimal
tempC
=
null
;
@JsonProperty
(
"temp_f"
)
private
BigDecimal
tempF
=
null
;
@JsonProperty
(
"id_day"
)
private
BigDecimal
idDay
=
null
;
@JsonProperty
(
"condition"
)
private
WeatherCondition
condition
=
null
;
@JsonProperty
(
"wind_mph"
)
private
BigDecimal
windMph
=
null
;
@JsonProperty
(
"wind_kph"
)
private
BigDecimal
windKph
=
null
;
@JsonProperty
(
"wind_degree"
)
private
Integer
windDegree
=
null
;
@JsonProperty
(
"wind_dir"
)
private
String
windDir
=
null
;
@JsonProperty
(
"pressure_mb"
)
private
BigDecimal
pressureMb
=
null
;
@JsonProperty
(
"pressure_in"
)
private
BigDecimal
pressureIn
=
null
;
@JsonProperty
(
"precip_mm"
)
private
BigDecimal
precipMm
=
null
;
@JsonProperty
(
"precip_in"
)
private
BigDecimal
precipIn
=
null
;
@JsonProperty
(
"humidity"
)
private
Integer
humidity
=
null
;
@JsonProperty
(
"cloud"
)
private
Integer
cloud
=
null
;
@JsonProperty
(
"feelslike_c"
)
private
BigDecimal
feelslikeC
=
null
;
@JsonProperty
(
"feelslike_f"
)
private
BigDecimal
feelslikeF
=
null
;
@JsonProperty
(
"windchill_c"
)
private
BigDecimal
windchillC
=
null
;
@JsonProperty
(
"windchill_f"
)
private
BigDecimal
windchillF
=
null
;
@JsonProperty
(
"heatindex_c"
)
private
Integer
heatindexC
=
null
;
@JsonProperty
(
"heatindex_f"
)
private
BigDecimal
heatindexF
=
null
;
@JsonProperty
(
"dewpoint_c"
)
private
BigDecimal
dewpointC
=
null
;
@JsonProperty
(
"dewpoint_f"
)
private
BigDecimal
dewpointF
=
null
;
@JsonProperty
(
"vis_km"
)
private
BigDecimal
visKm
=
null
;
@JsonProperty
(
"vis_miles"
)
private
BigDecimal
visMiles
=
null
;
@JsonProperty
(
"uv"
)
private
BigDecimal
uv
=
null
;
@JsonProperty
(
"gust_mph"
)
private
BigDecimal
gustMph
=
null
;
@JsonProperty
(
"gust_kph"
)
private
BigDecimal
gustKph
=
null
;
@JsonProperty
(
"air_quality"
)
private
WeatherAirQuality
airQuality
=
null
;
public
Weather
lastUpdatedEpoch
(
Integer
lastUpdatedEpoch
)
{
this
.
lastUpdatedEpoch
=
lastUpdatedEpoch
;
return
this
;
}
/**
* uptated epoch
*
* @return lastUpdatedEpoch
**/
@Schema
(
example
=
"1238213521"
,
description
=
"uptated epoch"
)
@NotNull
public
Integer
getLastUpdatedEpoch
()
{
return
lastUpdatedEpoch
;
}
public
void
setLastUpdatedEpoch
(
Integer
lastUpdatedEpoch
)
{
this
.
lastUpdatedEpoch
=
lastUpdatedEpoch
;
}
public
Weather
lastUpdated
(
String
lastUpdated
)
{
this
.
lastUpdated
=
lastUpdated
;
return
this
;
}
/**
* last updated
*
* @return lastUpdated
**/
@Schema
(
example
=
"2001-10-09 10:07"
,
description
=
"last updated"
)
@NotNull
public
String
getLastUpdated
()
{
return
lastUpdated
;
}
public
void
setLastUpdated
(
String
lastUpdated
)
{
this
.
lastUpdated
=
lastUpdated
;
}
public
Weather
tempC
(
BigDecimal
tempC
)
{
this
.
tempC
=
tempC
;
return
this
;
}
/**
* temperature celcius
*
* @return tempC
**/
@Schema
(
example
=
"8.3"
,
description
=
"temperature celcius"
)
@NotNull
@Valid
public
BigDecimal
getTempC
()
{
return
tempC
;
}
public
void
setTempC
(
BigDecimal
tempC
)
{
this
.
tempC
=
tempC
;
}
public
Weather
tempF
(
BigDecimal
tempF
)
{
this
.
tempF
=
tempF
;
return
this
;
}
/**
* temperature fahrenheit
*
* @return tempF
**/
@Schema
(
example
=
"8.8"
,
description
=
"temperature fahrenheit"
)
@NotNull
@Valid
public
BigDecimal
getTempF
()
{
return
tempF
;
}
public
void
setTempF
(
BigDecimal
tempF
)
{
this
.
tempF
=
tempF
;
}
public
Weather
idDay
(
BigDecimal
idDay
)
{
this
.
idDay
=
idDay
;
return
this
;
}
/**
* day id
*
* @return idDay
**/
@Schema
(
example
=
"803.29"
,
description
=
"day id"
)
@NotNull
@Valid
public
BigDecimal
getIdDay
()
{
return
idDay
;
}
public
void
setIdDay
(
BigDecimal
idDay
)
{
this
.
idDay
=
idDay
;
}
public
Weather
condition
(
WeatherCondition
condition
)
{
this
.
condition
=
condition
;
return
this
;
}
/**
* Get condition
*
* @return condition
**/
@Schema
(
description
=
""
)
@NotNull
@Valid
public
WeatherCondition
getCondition
()
{
return
condition
;
}
public
void
setCondition
(
WeatherCondition
condition
)
{
this
.
condition
=
condition
;
}
public
Weather
windMph
(
BigDecimal
windMph
)
{
this
.
windMph
=
windMph
;
return
this
;
}
/**
* Get windMph
*
* @return windMph
**/
@Schema
(
example
=
"80.39"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getWindMph
()
{
return
windMph
;
}
public
void
setWindMph
(
BigDecimal
windMph
)
{
this
.
windMph
=
windMph
;
}
public
Weather
windKph
(
BigDecimal
windKph
)
{
this
.
windKph
=
windKph
;
return
this
;
}
/**
* Get windKph
*
* @return windKph
**/
@Schema
(
example
=
"803.29"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getWindKph
()
{
return
windKph
;
}
public
void
setWindKph
(
BigDecimal
windKph
)
{
this
.
windKph
=
windKph
;
}
public
Weather
windDegree
(
Integer
windDegree
)
{
this
.
windDegree
=
windDegree
;
return
this
;
}
/**
* Get windDegree
*
* @return windDegree
**/
@Schema
(
example
=
"803234"
,
description
=
""
)
@NotNull
public
Integer
getWindDegree
()
{
return
windDegree
;
}
public
void
setWindDegree
(
Integer
windDegree
)
{
this
.
windDegree
=
windDegree
;
}
public
Weather
windDir
(
String
windDir
)
{
this
.
windDir
=
windDir
;
return
this
;
}
/**
* Get windDir
*
* @return windDir
**/
@Schema
(
example
=
"SSE"
,
description
=
""
)
@NotNull
public
String
getWindDir
()
{
return
windDir
;
}
public
void
setWindDir
(
String
windDir
)
{
this
.
windDir
=
windDir
;
}
public
Weather
pressureMb
(
BigDecimal
pressureMb
)
{
this
.
pressureMb
=
pressureMb
;
return
this
;
}
/**
* Get pressureMb
*
* @return pressureMb
**/
@Schema
(
example
=
"86.5"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getPressureMb
()
{
return
pressureMb
;
}
public
void
setPressureMb
(
BigDecimal
pressureMb
)
{
this
.
pressureMb
=
pressureMb
;
}
public
Weather
pressureIn
(
BigDecimal
pressureIn
)
{
this
.
pressureIn
=
pressureIn
;
return
this
;
}
/**
* Get pressureIn
*
* @return pressureIn
**/
@Schema
(
example
=
"803.3841"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getPressureIn
()
{
return
pressureIn
;
}
public
void
setPressureIn
(
BigDecimal
pressureIn
)
{
this
.
pressureIn
=
pressureIn
;
}
public
Weather
precipMm
(
BigDecimal
precipMm
)
{
this
.
precipMm
=
precipMm
;
return
this
;
}
/**
* Get precipMm
*
* @return precipMm
**/
@Schema
(
example
=
"803.438"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getPrecipMm
()
{
return
precipMm
;
}
public
void
setPrecipMm
(
BigDecimal
precipMm
)
{
this
.
precipMm
=
precipMm
;
}
public
Weather
precipIn
(
BigDecimal
precipIn
)
{
this
.
precipIn
=
precipIn
;
return
this
;
}
/**
* Get precipIn
*
* @return precipIn
**/
@Schema
(
example
=
"803.473"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getPrecipIn
()
{
return
precipIn
;
}
public
void
setPrecipIn
(
BigDecimal
precipIn
)
{
this
.
precipIn
=
precipIn
;
}
public
Weather
humidity
(
Integer
humidity
)
{
this
.
humidity
=
humidity
;
return
this
;
}
/**
* Get humidity
*
* @return humidity
**/
@Schema
(
example
=
"8039"
,
description
=
""
)
@NotNull
public
Integer
getHumidity
()
{
return
humidity
;
}
public
void
setHumidity
(
Integer
humidity
)
{
this
.
humidity
=
humidity
;
}
public
Weather
cloud
(
Integer
cloud
)
{
this
.
cloud
=
cloud
;
return
this
;
}
/**
* Get cloud
*
* @return cloud
**/
@Schema
(
example
=
"80338"
,
description
=
""
)
@NotNull
public
Integer
getCloud
()
{
return
cloud
;
}
public
void
setCloud
(
Integer
cloud
)
{
this
.
cloud
=
cloud
;
}
public
Weather
feelslikeC
(
BigDecimal
feelslikeC
)
{
this
.
feelslikeC
=
feelslikeC
;
return
this
;
}
/**
* Get feelslikeC
*
* @return feelslikeC
**/
@Schema
(
example
=
"803.463"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getFeelslikeC
()
{
return
feelslikeC
;
}
public
void
setFeelslikeC
(
BigDecimal
feelslikeC
)
{
this
.
feelslikeC
=
feelslikeC
;
}
public
Weather
feelslikeF
(
BigDecimal
feelslikeF
)
{
this
.
feelslikeF
=
feelslikeF
;
return
this
;
}
/**
* Get feelslikeF
*
* @return feelslikeF
**/
@Schema
(
example
=
"803.463"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getFeelslikeF
()
{
return
feelslikeF
;
}
public
void
setFeelslikeF
(
BigDecimal
feelslikeF
)
{
this
.
feelslikeF
=
feelslikeF
;
}
public
Weather
windchillC
(
BigDecimal
windchillC
)
{
this
.
windchillC
=
windchillC
;
return
this
;
}
/**
* Get windchillC
*
* @return windchillC
**/
@Schema
(
example
=
"803.367"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getWindchillC
()
{
return
windchillC
;
}
public
void
setWindchillC
(
BigDecimal
windchillC
)
{
this
.
windchillC
=
windchillC
;
}
public
Weather
windchillF
(
BigDecimal
windchillF
)
{
this
.
windchillF
=
windchillF
;
return
this
;
}
/**
* Get windchillF
*
* @return windchillF
**/
@Schema
(
example
=
"803.478"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getWindchillF
()
{
return
windchillF
;
}
public
void
setWindchillF
(
BigDecimal
windchillF
)
{
this
.
windchillF
=
windchillF
;
}
public
Weather
heatindexC
(
Integer
heatindexC
)
{
this
.
heatindexC
=
heatindexC
;
return
this
;
}
/**
* Get heatindexC
*
* @return heatindexC
**/
@Schema
(
example
=
"803287"
,
description
=
""
)
@NotNull
public
Integer
getHeatindexC
()
{
return
heatindexC
;
}
public
void
setHeatindexC
(
Integer
heatindexC
)
{
this
.
heatindexC
=
heatindexC
;
}
public
Weather
heatindexF
(
BigDecimal
heatindexF
)
{
this
.
heatindexF
=
heatindexF
;
return
this
;
}
/**
* Get heatindexF
*
* @return heatindexF
**/
@Schema
(
example
=
"803.736"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getHeatindexF
()
{
return
heatindexF
;
}
public
void
setHeatindexF
(
BigDecimal
heatindexF
)
{
this
.
heatindexF
=
heatindexF
;
}
public
Weather
dewpointC
(
BigDecimal
dewpointC
)
{
this
.
dewpointC
=
dewpointC
;
return
this
;
}
/**
* Get dewpointC
*
* @return dewpointC
**/
@Schema
(
example
=
"803.83"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getDewpointC
()
{
return
dewpointC
;
}
public
void
setDewpointC
(
BigDecimal
dewpointC
)
{
this
.
dewpointC
=
dewpointC
;
}
public
Weather
dewpointF
(
BigDecimal
dewpointF
)
{
this
.
dewpointF
=
dewpointF
;
return
this
;
}
/**
* Get dewpointF
*
* @return dewpointF
**/
@Schema
(
example
=
"803.38"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getDewpointF
()
{
return
dewpointF
;
}
public
void
setDewpointF
(
BigDecimal
dewpointF
)
{
this
.
dewpointF
=
dewpointF
;
}
public
Weather
visKm
(
BigDecimal
visKm
)
{
this
.
visKm
=
visKm
;
return
this
;
}
/**
* Get visKm
*
* @return visKm
**/
@Schema
(
example
=
"803.37"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getVisKm
()
{
return
visKm
;
}
public
void
setVisKm
(
BigDecimal
visKm
)
{
this
.
visKm
=
visKm
;
}
public
Weather
visMiles
(
BigDecimal
visMiles
)
{
this
.
visMiles
=
visMiles
;
return
this
;
}
/**
* Get visMiles
*
* @return visMiles
**/
@Schema
(
example
=
"803.48"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getVisMiles
()
{
return
visMiles
;
}
public
void
setVisMiles
(
BigDecimal
visMiles
)
{
this
.
visMiles
=
visMiles
;
}
public
Weather
uv
(
BigDecimal
uv
)
{
this
.
uv
=
uv
;
return
this
;
}
/**
* Get uv
*
* @return uv
**/
@Schema
(
example
=
"803.473"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getUv
()
{
return
uv
;
}
public
void
setUv
(
BigDecimal
uv
)
{
this
.
uv
=
uv
;
}
public
Weather
gustMph
(
BigDecimal
gustMph
)
{
this
.
gustMph
=
gustMph
;
return
this
;
}
/**
* Get gustMph
*
* @return gustMph
**/
@Schema
(
example
=
"803.37"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getGustMph
()
{
return
gustMph
;
}
public
void
setGustMph
(
BigDecimal
gustMph
)
{
this
.
gustMph
=
gustMph
;
}
public
Weather
gustKph
(
BigDecimal
gustKph
)
{
this
.
gustKph
=
gustKph
;
return
this
;
}
/**
* Get gustKph
*
* @return gustKph
**/
@Schema
(
example
=
"803.3662"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getGustKph
()
{
return
gustKph
;
}
public
void
setGustKph
(
BigDecimal
gustKph
)
{
this
.
gustKph
=
gustKph
;
}
public
Weather
airQuality
(
WeatherAirQuality
airQuality
)
{
this
.
airQuality
=
airQuality
;
return
this
;
}
/**
* Get airQuality
*
* @return airQuality
**/
@Schema
(
description
=
""
)
@NotNull
@Valid
public
WeatherAirQuality
getAirQuality
()
{
return
airQuality
;
}
public
void
setAirQuality
(
WeatherAirQuality
airQuality
)
{
this
.
airQuality
=
airQuality
;
}
@Override
public
boolean
equals
(
java
.
lang
.
Object
o
)
{
if
(
this
==
o
)
{
return
true
;
}
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
{
return
false
;
}
Weather
weather
=
(
Weather
)
o
;
return
Objects
.
equals
(
this
.
lastUpdatedEpoch
,
weather
.
lastUpdatedEpoch
)
&&
Objects
.
equals
(
this
.
lastUpdated
,
weather
.
lastUpdated
)
&&
Objects
.
equals
(
this
.
tempC
,
weather
.
tempC
)
&&
Objects
.
equals
(
this
.
tempF
,
weather
.
tempF
)
&&
Objects
.
equals
(
this
.
idDay
,
weather
.
idDay
)
&&
Objects
.
equals
(
this
.
condition
,
weather
.
condition
)
&&
Objects
.
equals
(
this
.
windMph
,
weather
.
windMph
)
&&
Objects
.
equals
(
this
.
windKph
,
weather
.
windKph
)
&&
Objects
.
equals
(
this
.
windDegree
,
weather
.
windDegree
)
&&
Objects
.
equals
(
this
.
windDir
,
weather
.
windDir
)
&&
Objects
.
equals
(
this
.
pressureMb
,
weather
.
pressureMb
)
&&
Objects
.
equals
(
this
.
pressureIn
,
weather
.
pressureIn
)
&&
Objects
.
equals
(
this
.
precipMm
,
weather
.
precipMm
)
&&
Objects
.
equals
(
this
.
precipIn
,
weather
.
precipIn
)
&&
Objects
.
equals
(
this
.
humidity
,
weather
.
humidity
)
&&
Objects
.
equals
(
this
.
cloud
,
weather
.
cloud
)
&&
Objects
.
equals
(
this
.
feelslikeC
,
weather
.
feelslikeC
)
&&
Objects
.
equals
(
this
.
feelslikeF
,
weather
.
feelslikeF
)
&&
Objects
.
equals
(
this
.
windchillC
,
weather
.
windchillC
)
&&
Objects
.
equals
(
this
.
windchillF
,
weather
.
windchillF
)
&&
Objects
.
equals
(
this
.
heatindexC
,
weather
.
heatindexC
)
&&
Objects
.
equals
(
this
.
heatindexF
,
weather
.
heatindexF
)
&&
Objects
.
equals
(
this
.
dewpointC
,
weather
.
dewpointC
)
&&
Objects
.
equals
(
this
.
dewpointF
,
weather
.
dewpointF
)
&&
Objects
.
equals
(
this
.
visKm
,
weather
.
visKm
)
&&
Objects
.
equals
(
this
.
visMiles
,
weather
.
visMiles
)
&&
Objects
.
equals
(
this
.
uv
,
weather
.
uv
)
&&
Objects
.
equals
(
this
.
gustMph
,
weather
.
gustMph
)
&&
Objects
.
equals
(
this
.
gustKph
,
weather
.
gustKph
)
&&
Objects
.
equals
(
this
.
airQuality
,
weather
.
airQuality
);
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
lastUpdatedEpoch
,
lastUpdated
,
tempC
,
tempF
,
idDay
,
condition
,
windMph
,
windKph
,
windDegree
,
windDir
,
pressureMb
,
pressureIn
,
precipMm
,
precipIn
,
humidity
,
cloud
,
feelslikeC
,
feelslikeF
,
windchillC
,
windchillF
,
heatindexC
,
heatindexF
,
dewpointC
,
dewpointF
,
visKm
,
visMiles
,
uv
,
gustMph
,
gustKph
,
airQuality
);
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
"class Weather {\n"
);
sb
.
append
(
" lastUpdatedEpoch: "
).
append
(
toIndentedString
(
lastUpdatedEpoch
)).
append
(
"\n"
);
sb
.
append
(
" lastUpdated: "
).
append
(
toIndentedString
(
lastUpdated
)).
append
(
"\n"
);
sb
.
append
(
" tempC: "
).
append
(
toIndentedString
(
tempC
)).
append
(
"\n"
);
sb
.
append
(
" tempF: "
).
append
(
toIndentedString
(
tempF
)).
append
(
"\n"
);
sb
.
append
(
" idDay: "
).
append
(
toIndentedString
(
idDay
)).
append
(
"\n"
);
sb
.
append
(
" condition: "
).
append
(
toIndentedString
(
condition
)).
append
(
"\n"
);
sb
.
append
(
" windMph: "
).
append
(
toIndentedString
(
windMph
)).
append
(
"\n"
);
sb
.
append
(
" windKph: "
).
append
(
toIndentedString
(
windKph
)).
append
(
"\n"
);
sb
.
append
(
" windDegree: "
).
append
(
toIndentedString
(
windDegree
)).
append
(
"\n"
);
sb
.
append
(
" windDir: "
).
append
(
toIndentedString
(
windDir
)).
append
(
"\n"
);
sb
.
append
(
" pressureMb: "
).
append
(
toIndentedString
(
pressureMb
)).
append
(
"\n"
);
sb
.
append
(
" pressureIn: "
).
append
(
toIndentedString
(
pressureIn
)).
append
(
"\n"
);
sb
.
append
(
" precipMm: "
).
append
(
toIndentedString
(
precipMm
)).
append
(
"\n"
);
sb
.
append
(
" precipIn: "
).
append
(
toIndentedString
(
precipIn
)).
append
(
"\n"
);
sb
.
append
(
" humidity: "
).
append
(
toIndentedString
(
humidity
)).
append
(
"\n"
);
sb
.
append
(
" cloud: "
).
append
(
toIndentedString
(
cloud
)).
append
(
"\n"
);
sb
.
append
(
" feelslikeC: "
).
append
(
toIndentedString
(
feelslikeC
)).
append
(
"\n"
);
sb
.
append
(
" feelslikeF: "
).
append
(
toIndentedString
(
feelslikeF
)).
append
(
"\n"
);
sb
.
append
(
" windchillC: "
).
append
(
toIndentedString
(
windchillC
)).
append
(
"\n"
);
sb
.
append
(
" windchillF: "
).
append
(
toIndentedString
(
windchillF
)).
append
(
"\n"
);
sb
.
append
(
" heatindexC: "
).
append
(
toIndentedString
(
heatindexC
)).
append
(
"\n"
);
sb
.
append
(
" heatindexF: "
).
append
(
toIndentedString
(
heatindexF
)).
append
(
"\n"
);
sb
.
append
(
" dewpointC: "
).
append
(
toIndentedString
(
dewpointC
)).
append
(
"\n"
);
sb
.
append
(
" dewpointF: "
).
append
(
toIndentedString
(
dewpointF
)).
append
(
"\n"
);
sb
.
append
(
" visKm: "
).
append
(
toIndentedString
(
visKm
)).
append
(
"\n"
);
sb
.
append
(
" visMiles: "
).
append
(
toIndentedString
(
visMiles
)).
append
(
"\n"
);
sb
.
append
(
" uv: "
).
append
(
toIndentedString
(
uv
)).
append
(
"\n"
);
sb
.
append
(
" gustMph: "
).
append
(
toIndentedString
(
gustMph
)).
append
(
"\n"
);
sb
.
append
(
" gustKph: "
).
append
(
toIndentedString
(
gustKph
)).
append
(
"\n"
);
sb
.
append
(
" airQuality: "
).
append
(
toIndentedString
(
airQuality
)).
append
(
"\n"
);
sb
.
append
(
"}"
);
return
sb
.
toString
();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private
String
toIndentedString
(
java
.
lang
.
Object
o
)
{
if
(
o
==
null
)
{
return
"null"
;
}
return
o
.
toString
().
replace
(
"\n"
,
"\n "
);
}
}
src/main/java/com/SWP/SS24/Wetterdaten_sammeln/model/WeatherAirQuality.java
0 → 100644
View file @
5d5d7815
package
com.SWP.SS24.Wetterdaten_sammeln.model
;
import
java.util.Objects
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
java.math.BigDecimal
;
import
org.springframework.validation.annotation.Validated
;
import
javax.validation.Valid
;
import
javax.validation.constraints.*
;
/**
* WeatherAirQuality
*/
@Validated
@javax
.
annotation
.
Generated
(
value
=
"io.swagger.codegen.v3.generators.java.SpringCodegen"
,
date
=
"2024-06-04T09:41:03.559554872Z[GMT]"
)
public
class
WeatherAirQuality
{
@JsonProperty
(
"co"
)
private
BigDecimal
co
=
null
;
@JsonProperty
(
"no2"
)
private
BigDecimal
no2
=
null
;
@JsonProperty
(
"o3"
)
private
BigDecimal
o3
=
null
;
@JsonProperty
(
"so2"
)
private
BigDecimal
so2
=
null
;
@JsonProperty
(
"pm2_5"
)
private
BigDecimal
pm25
=
null
;
@JsonProperty
(
"pm10"
)
private
BigDecimal
pm10
=
null
;
@JsonProperty
(
"us-epa-index"
)
private
Integer
usEpaIndex
=
null
;
@JsonProperty
(
"gb-defra-index"
)
private
Integer
gbDefraIndex
=
null
;
public
WeatherAirQuality
co
(
BigDecimal
co
)
{
this
.
co
=
co
;
return
this
;
}
/**
* Get co
*
* @return co
**/
@Schema
(
example
=
"234.32"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getCo
()
{
return
co
;
}
public
void
setCo
(
BigDecimal
co
)
{
this
.
co
=
co
;
}
public
WeatherAirQuality
no2
(
BigDecimal
no2
)
{
this
.
no2
=
no2
;
return
this
;
}
/**
* Get no2
*
* @return no2
**/
@Schema
(
example
=
"3.4"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getNo2
()
{
return
no2
;
}
public
void
setNo2
(
BigDecimal
no2
)
{
this
.
no2
=
no2
;
}
public
WeatherAirQuality
o3
(
BigDecimal
o3
)
{
this
.
o3
=
o3
;
return
this
;
}
/**
* Get o3
*
* @return o3
**/
@Schema
(
example
=
"234.3"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getO3
()
{
return
o3
;
}
public
void
setO3
(
BigDecimal
o3
)
{
this
.
o3
=
o3
;
}
public
WeatherAirQuality
so2
(
BigDecimal
so2
)
{
this
.
so2
=
so2
;
return
this
;
}
/**
* Get so2
*
* @return so2
**/
@Schema
(
example
=
"490.34"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getSo2
()
{
return
so2
;
}
public
void
setSo2
(
BigDecimal
so2
)
{
this
.
so2
=
so2
;
}
public
WeatherAirQuality
pm25
(
BigDecimal
pm25
)
{
this
.
pm25
=
pm25
;
return
this
;
}
/**
* Get pm25
*
* @return pm25
**/
@Schema
(
example
=
"96.34"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getPm25
()
{
return
pm25
;
}
public
void
setPm25
(
BigDecimal
pm25
)
{
this
.
pm25
=
pm25
;
}
public
WeatherAirQuality
pm10
(
BigDecimal
pm10
)
{
this
.
pm10
=
pm10
;
return
this
;
}
/**
* Get pm10
*
* @return pm10
**/
@Schema
(
example
=
"22.3"
,
description
=
""
)
@NotNull
@Valid
public
BigDecimal
getPm10
()
{
return
pm10
;
}
public
void
setPm10
(
BigDecimal
pm10
)
{
this
.
pm10
=
pm10
;
}
public
WeatherAirQuality
usEpaIndex
(
Integer
usEpaIndex
)
{
this
.
usEpaIndex
=
usEpaIndex
;
return
this
;
}
/**
* Get usEpaIndex
*
* @return usEpaIndex
**/
@Schema
(
example
=
"32"
,
description
=
""
)
@NotNull
public
Integer
getUsEpaIndex
()
{
return
usEpaIndex
;
}
public
void
setUsEpaIndex
(
Integer
usEpaIndex
)
{
this
.
usEpaIndex
=
usEpaIndex
;
}
public
WeatherAirQuality
gbDefraIndex
(
Integer
gbDefraIndex
)
{
this
.
gbDefraIndex
=
gbDefraIndex
;
return
this
;
}
/**
* Get gbDefraIndex
*
* @return gbDefraIndex
**/
@Schema
(
example
=
"9999"
,
description
=
""
)
@NotNull
public
Integer
getGbDefraIndex
()
{
return
gbDefraIndex
;
}
public
void
setGbDefraIndex
(
Integer
gbDefraIndex
)
{
this
.
gbDefraIndex
=
gbDefraIndex
;
}
@Override
public
boolean
equals
(
java
.
lang
.
Object
o
)
{
if
(
this
==
o
)
{
return
true
;
}
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
{
return
false
;
}
WeatherAirQuality
weatherAirQuality
=
(
WeatherAirQuality
)
o
;
return
Objects
.
equals
(
this
.
co
,
weatherAirQuality
.
co
)
&&
Objects
.
equals
(
this
.
no2
,
weatherAirQuality
.
no2
)
&&
Objects
.
equals
(
this
.
o3
,
weatherAirQuality
.
o3
)
&&
Objects
.
equals
(
this
.
so2
,
weatherAirQuality
.
so2
)
&&
Objects
.
equals
(
this
.
pm25
,
weatherAirQuality
.
pm25
)
&&
Objects
.
equals
(
this
.
pm10
,
weatherAirQuality
.
pm10
)
&&
Objects
.
equals
(
this
.
usEpaIndex
,
weatherAirQuality
.
usEpaIndex
)
&&
Objects
.
equals
(
this
.
gbDefraIndex
,
weatherAirQuality
.
gbDefraIndex
);
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
co
,
no2
,
o3
,
so2
,
pm25
,
pm10
,
usEpaIndex
,
gbDefraIndex
);
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
"class WeatherAirQuality {\n"
);
sb
.
append
(
" co: "
).
append
(
toIndentedString
(
co
)).
append
(
"\n"
);
sb
.
append
(
" no2: "
).
append
(
toIndentedString
(
no2
)).
append
(
"\n"
);
sb
.
append
(
" o3: "
).
append
(
toIndentedString
(
o3
)).
append
(
"\n"
);
sb
.
append
(
" so2: "
).
append
(
toIndentedString
(
so2
)).
append
(
"\n"
);
sb
.
append
(
" pm25: "
).
append
(
toIndentedString
(
pm25
)).
append
(
"\n"
);
sb
.
append
(
" pm10: "
).
append
(
toIndentedString
(
pm10
)).
append
(
"\n"
);
sb
.
append
(
" usEpaIndex: "
).
append
(
toIndentedString
(
usEpaIndex
)).
append
(
"\n"
);
sb
.
append
(
" gbDefraIndex: "
).
append
(
toIndentedString
(
gbDefraIndex
)).
append
(
"\n"
);
sb
.
append
(
"}"
);
return
sb
.
toString
();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private
String
toIndentedString
(
java
.
lang
.
Object
o
)
{
if
(
o
==
null
)
{
return
"null"
;
}
return
o
.
toString
().
replace
(
"\n"
,
"\n "
);
}
}
src/main/java/com/SWP/SS24/Wetterdaten_sammeln/model/WeatherCondition.java
0 → 100644
View file @
5d5d7815
package
com.SWP.SS24.Wetterdaten_sammeln.model
;
import
java.util.Objects
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
org.springframework.validation.annotation.Validated
;
import
javax.validation.constraints.*
;
/**
* WeatherCondition
*/
@Validated
@javax
.
annotation
.
Generated
(
value
=
"io.swagger.codegen.v3.generators.java.SpringCodegen"
,
date
=
"2024-06-04T09:41:03.559554872Z[GMT]"
)
public
class
WeatherCondition
{
@JsonProperty
(
"text"
)
private
String
text
=
null
;
@JsonProperty
(
"icon"
)
private
String
icon
=
null
;
@JsonProperty
(
"code"
)
private
Integer
code
=
null
;
public
WeatherCondition
text
(
String
text
)
{
this
.
text
=
text
;
return
this
;
}
/**
* weather text
*
* @return text
**/
@Schema
(
example
=
"overcast"
,
description
=
"weather text"
)
@NotNull
public
String
getText
()
{
return
text
;
}
public
void
setText
(
String
text
)
{
this
.
text
=
text
;
}
public
WeatherCondition
icon
(
String
icon
)
{
this
.
icon
=
icon
;
return
this
;
}
/**
* current time
*
* @return icon
**/
@Schema
(
example
=
"//cdn.weatherapi.com/weather/64x64/day/116.png"
,
description
=
"current time"
)
@NotNull
public
String
getIcon
()
{
return
icon
;
}
public
void
setIcon
(
String
icon
)
{
this
.
icon
=
icon
;
}
public
WeatherCondition
code
(
Integer
code
)
{
this
.
code
=
code
;
return
this
;
}
/**
* updated epoch
*
* @return code
**/
@Schema
(
example
=
"1003"
,
description
=
"updated epoch"
)
@NotNull
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
@Override
public
boolean
equals
(
java
.
lang
.
Object
o
)
{
if
(
this
==
o
)
{
return
true
;
}
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
{
return
false
;
}
WeatherCondition
weatherCondition
=
(
WeatherCondition
)
o
;
return
Objects
.
equals
(
this
.
text
,
weatherCondition
.
text
)
&&
Objects
.
equals
(
this
.
icon
,
weatherCondition
.
icon
)
&&
Objects
.
equals
(
this
.
code
,
weatherCondition
.
code
);
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
text
,
icon
,
code
);
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
"class WeatherCondition {\n"
);
sb
.
append
(
" text: "
).
append
(
toIndentedString
(
text
)).
append
(
"\n"
);
sb
.
append
(
" icon: "
).
append
(
toIndentedString
(
icon
)).
append
(
"\n"
);
sb
.
append
(
" code: "
).
append
(
toIndentedString
(
code
)).
append
(
"\n"
);
sb
.
append
(
"}"
);
return
sb
.
toString
();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private
String
toIndentedString
(
java
.
lang
.
Object
o
)
{
if
(
o
==
null
)
{
return
"null"
;
}
return
o
.
toString
().
replace
(
"\n"
,
"\n "
);
}
}
src/main/resources/application.properties
View file @
5d5d7815
spring.datasource.url
=
jdbc:mysql://db.fkc.hft-stuttgart.de/dp4s_22kaen1bdi
spring.datasource.username
=
dp4s_22kaen1bdi
spring.datasource.password
=
jAiCHaeNDEREeS
spring.jpa.hibernate.ddl-auto
=
create-drop
\ No newline at end of file
spring.jpa.hibernate.ddl-auto
=
create-drop
springdoc.api-docs.path
=
/api-docs
server.servlet.contextPath
=
/
server.port
=
8080
\ No newline at end of file
Prev
1
2
Next
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