src/main/java/se/kth/iv1351/weatherstat/integration/WeatherDAO.java
/**
     * Stores all specified observations in the weather database.
     * 
     * @param observations The observations to store.
     */
Stores all specified observations in the weather database.

@param observations The observations to store.
Stores all specified observations in the weather database . @param observations The observations to store .
public void storeObservations(List<String> observations) {
        MongoDatabase weatherDb = connection.getDatabase(DB_NAME);
        MongoCollection<Document> weatherColl = weatherDb.getCollection(COLLECTION_NAME);
        for (String observation : observations) {
            weatherColl.insertOne(Document.parse(observation));
        }
    }
public void storeObservations ( List < String > observations ) { MongoDatabase weatherDb = connection . getDatabase ( DB_NAME ) ; MongoCollection < Document > weatherColl = weatherDb . getCollection ( COLLECTION_NAME ) ; for ( String observation : observations ) { weatherColl . insertOne ( Document . parse ( observation ) ) ; } }
Stores all specified observations in the weather database.
Stores all specified observations in the weather database .