@@ -36,7 +36,6 @@ public class CouchbaseWeatherSource implements WeatherSource {
3636 private static final Logger logger = LogManager .getLogger (CouchbaseWeatherSource .class );
3737
3838 private static final NamingConvention DEFAULT_NAMING_CONVENTION = NamingConvention .FLAT ;
39- private static final String DEFAULT_TIMESTAMP_PATTERN = "yyyy-MM-dd'T'HH:mm:ssxxx" ;
4039 /** The start of the document key, comparable to a table name in relational databases */
4140 private static final String DEFAULT_KEY_PREFIX = "weather" ;
4241
@@ -58,20 +57,13 @@ public class CouchbaseWeatherSource implements WeatherSource {
5857 * @param coordinateSource Source to obtain actual coordinates from
5958 * @param weatherFactory Factory to transfer field to value mapping into actual java object
6059 * instances
61- * @param timeStampPattern Pattern of time stamps to parse
6260 */
6361 public CouchbaseWeatherSource (
6462 CouchbaseConnector connector ,
6563 IdCoordinateSource coordinateSource ,
66- TimeBasedWeatherValueFactory weatherFactory ,
67- String timeStampPattern ) {
64+ TimeBasedWeatherValueFactory weatherFactory ) {
6865 this (
69- connector ,
70- coordinateSource ,
71- DEFAULT_KEY_PREFIX ,
72- DEFAULT_TIMESTAMP_PATTERN ,
73- DEFAULT_NAMING_CONVENTION ,
74- weatherFactory );
66+ connector , coordinateSource , DEFAULT_KEY_PREFIX , DEFAULT_NAMING_CONVENTION , weatherFactory );
7567 }
7668
7769 /**
@@ -84,22 +76,15 @@ public CouchbaseWeatherSource(
8476 * @param weatherFactory Factory to transfer field to value mapping into actual java object
8577 * instances
8678 * @deprecated Use {@link CouchbaseWeatherSource#CouchbaseWeatherSource(CouchbaseConnector,
87- * IdCoordinateSource, String, String, NamingConvention, TimeBasedWeatherValueFactory)}
88- * instead
79+ * IdCoordinateSource, String, NamingConvention, TimeBasedWeatherValueFactory)} instead
8980 */
9081 @ Deprecated
9182 public CouchbaseWeatherSource (
9283 CouchbaseConnector connector ,
9384 IdCoordinateSource coordinateSource ,
9485 String keyPrefix ,
9586 TimeBasedWeatherValueFactory weatherFactory ) {
96- this (
97- connector ,
98- coordinateSource ,
99- keyPrefix ,
100- DEFAULT_TIMESTAMP_PATTERN ,
101- DEFAULT_NAMING_CONVENTION ,
102- weatherFactory );
87+ this (connector , coordinateSource , keyPrefix , DEFAULT_NAMING_CONVENTION , weatherFactory );
10388 }
10489
10590 /**
@@ -109,7 +94,6 @@ public CouchbaseWeatherSource(
10994 * @param connector Connector, that establishes the connection to the couchbase instance
11095 * @param coordinateSource Source to obtain actual coordinates from
11196 * @param keyPrefix Prefix of entries, that belong to weather
112- * @param timeStampPattern Pattern of time stamps to parse
11397 * @param namingConvention the (case) convention, how columns are named
11498 * @param weatherFactory Factory to transfer field to value mapping into actual java object
11599 * instances
@@ -118,14 +102,13 @@ public CouchbaseWeatherSource(
118102 CouchbaseConnector connector ,
119103 IdCoordinateSource coordinateSource ,
120104 String keyPrefix ,
121- String timeStampPattern ,
122105 NamingConvention namingConvention ,
123106 TimeBasedWeatherValueFactory weatherFactory ) {
124107 this .connector = connector ;
125108 this .coordinateSource = coordinateSource ;
126109 this .keyPrefix = keyPrefix ;
127110 this .weatherFactory = weatherFactory ;
128- this .timeStampPattern = timeStampPattern ;
111+ this .timeStampPattern = weatherFactory . getTimeStampPattern () ;
129112 this .coordinateIdColumnName = weatherFactory .getCoordinateIdFieldString (namingConvention );
130113 }
131114
0 commit comments