Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa87a23f7d | ||
|
|
eccb519bfb | ||
|
|
cae6f950ad | ||
|
|
233ce6b088 | ||
|
|
4072308ae6 | ||
|
|
65b15b6a4c | ||
|
|
9424c8713f | ||
|
|
07569b83e1 | ||
|
|
d2b8fe4ba2 | ||
|
|
670938ef85 |
@@ -1,12 +1,7 @@
|
|||||||
package ch.zhaw.gartenverwaltung.bootstrap;
|
package ch.zhaw.gartenverwaltung.bootstrap;
|
||||||
|
|
||||||
import ch.zhaw.gartenverwaltung.HelloApplication;
|
import ch.zhaw.gartenverwaltung.HelloApplication;
|
||||||
import ch.zhaw.gartenverwaltung.io.CropList;
|
import ch.zhaw.gartenverwaltung.io.*;
|
||||||
import ch.zhaw.gartenverwaltung.io.JsonCropList;
|
|
||||||
import ch.zhaw.gartenverwaltung.io.JsonPlantList;
|
|
||||||
import ch.zhaw.gartenverwaltung.io.JsonTaskList;
|
|
||||||
import ch.zhaw.gartenverwaltung.io.PlantList;
|
|
||||||
import ch.zhaw.gartenverwaltung.io.TaskList;
|
|
||||||
import ch.zhaw.gartenverwaltung.models.Garden;
|
import ch.zhaw.gartenverwaltung.models.Garden;
|
||||||
import ch.zhaw.gartenverwaltung.models.GardenSchedule;
|
import ch.zhaw.gartenverwaltung.models.GardenSchedule;
|
||||||
import ch.zhaw.gartenverwaltung.models.PlantListModel;
|
import ch.zhaw.gartenverwaltung.models.PlantListModel;
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package ch.zhaw.gartenverwaltung.io;
|
||||||
|
|
||||||
|
public enum SevereWeather {
|
||||||
|
FROST,SNOW,HAIL,NO_SEVERE_WEATHER,RAIN
|
||||||
|
}
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
package ch.zhaw.gartenverwaltung.io;
|
||||||
|
|
||||||
|
import ch.zhaw.gartenverwaltung.models.PlantNotFoundException;
|
||||||
|
import ch.zhaw.gartenverwaltung.types.*;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class WeatherGradenTaskPlanner {
|
||||||
|
private final TaskList taskList;
|
||||||
|
private final PlantList plantList;
|
||||||
|
private final CropList cropList;
|
||||||
|
WeatherService weatherService;
|
||||||
|
private final LocalDate dateSevereWeather = LocalDate.of(22,12,15);
|
||||||
|
|
||||||
|
public WeatherGradenTaskPlanner(TaskList taskList, PlantList plantList, CropList cropList) {
|
||||||
|
this.taskList = taskList;
|
||||||
|
this.plantList = plantList;
|
||||||
|
this.cropList = cropList;
|
||||||
|
weatherService = new WeatherService();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void refreshTasks() throws IOException, HardinessZoneNotSetException, PlantNotFoundException {
|
||||||
|
getSevereWeatherEvents();
|
||||||
|
getRainAmount();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void getSevereWeatherEvents() throws IOException {
|
||||||
|
SevereWeather actualWeather = weatherService.causeSevereWeather(0);
|
||||||
|
if (SevereWeather.HAIL.equals(actualWeather)) {
|
||||||
|
createPreHail();
|
||||||
|
} else if (SevereWeather.FROST.equals(actualWeather)) {
|
||||||
|
createPreFrost();
|
||||||
|
} else if (SevereWeather.SNOW.equals(actualWeather)) {
|
||||||
|
createPreSnow();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void getRainAmount() throws IOException, HardinessZoneNotSetException, PlantNotFoundException {
|
||||||
|
int rainAmount = weatherService.causeRainAmount(3);
|
||||||
|
adjustWateringTask(rainAmount);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void createPreHail() throws IOException {
|
||||||
|
|
||||||
|
Task preHailTask = new Task("Hail",
|
||||||
|
"During a summer Thunderstorm it could hail heavily. THe Hail could damage the crops. To prevent damage cover the plants with a strong tarpaulin",
|
||||||
|
dateSevereWeather.minusDays(1L));
|
||||||
|
preHailTask.withId(Long.MAX_VALUE);
|
||||||
|
taskList.saveTask(preHailTask);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void createPreFrost() throws IOException {
|
||||||
|
Task preFrostTask = new Task("Frost",
|
||||||
|
"The temperatur falls below zero degrees, cover especially the root with wool",
|
||||||
|
dateSevereWeather.minusDays(1L));
|
||||||
|
preFrostTask.withId(Long.MAX_VALUE);
|
||||||
|
taskList.saveTask(preFrostTask);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void createPreSnow() throws IOException {
|
||||||
|
Task preSnowTask = new Task("Snow",
|
||||||
|
"The weather brings little snowfall. Cover your crops",
|
||||||
|
dateSevereWeather.minusDays(1L));
|
||||||
|
preSnowTask.withId(Long.MAX_VALUE);
|
||||||
|
taskList.saveTask(preSnowTask);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void adjustWateringTask(int rainAmount) throws HardinessZoneNotSetException, IOException, PlantNotFoundException {
|
||||||
|
|
||||||
|
for (Crop crop : cropList.getCrops()) {
|
||||||
|
Plant plant = plantList.getPlantById(HardinessZone.ZONE_8A,crop.getPlantId()).orElseThrow(PlantNotFoundException::new);
|
||||||
|
|
||||||
|
// nur für aktuelle growthphase
|
||||||
|
if(plant.wateringCycle().litersPerSqM() < rainAmount){
|
||||||
|
adjustNextExecutionOfWateringTask(taskList.getTaskList(LocalDate.now(), LocalDate.now().plusDays(7)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
// vom startdatum abhängig,
|
||||||
|
private void adjustNextExecutionOfWateringTask(List<Task> cropTaskList){
|
||||||
|
for(Task task : cropTaskList){
|
||||||
|
if(task.getName().equals("watering task")){
|
||||||
|
task.setNextExecution(task.getNextExecution().plusDays(task.getInterval().orElse(1)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package ch.zhaw.gartenverwaltung.io;
|
||||||
|
|
||||||
|
public class WeatherService {
|
||||||
|
private static final int NO_RAIN = 0;
|
||||||
|
private static final int LITTLE_RAIN = 15;
|
||||||
|
private static final int RAIN = 25;
|
||||||
|
private static final int HEAVY_RAIN = 50;
|
||||||
|
|
||||||
|
public SevereWeather causeSevereWeather(int randomWeather) {
|
||||||
|
return switch (randomWeather) {
|
||||||
|
case 1 -> SevereWeather.HAIL;
|
||||||
|
case 2 -> SevereWeather.SNOW;
|
||||||
|
case 3 -> SevereWeather.FROST;
|
||||||
|
default -> null;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public int causeRainAmount(int randomRainAmount) {
|
||||||
|
return switch (randomRainAmount) {
|
||||||
|
case 1 -> NO_RAIN;
|
||||||
|
case 2 -> LITTLE_RAIN;
|
||||||
|
case 3 -> RAIN;
|
||||||
|
case 4 -> HEAVY_RAIN;
|
||||||
|
default -> -1;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -49,6 +49,10 @@ public class GardenSchedule {
|
|||||||
public void planTasksForCrop(Crop crop) throws PlantNotFoundException, HardinessZoneNotSetException, IOException {
|
public void planTasksForCrop(Crop crop) throws PlantNotFoundException, HardinessZoneNotSetException, IOException {
|
||||||
Plant plant = plantList.getPlantById(Settings.getInstance().getCurrentHardinessZone(), crop.getPlantId()).orElseThrow(PlantNotFoundException::new);
|
Plant plant = plantList.getPlantById(Settings.getInstance().getCurrentHardinessZone(), crop.getPlantId()).orElseThrow(PlantNotFoundException::new);
|
||||||
int growPhaseGroup = plant.getGrowphaseGroupForDate(crop.getStartDate());
|
int growPhaseGroup = plant.getGrowphaseGroupForDate(crop.getStartDate());
|
||||||
|
addTask(new Task("watering Task", "pour water over the plant circa : "+ plant.wateringCycle().litersPerSqM() +" per square meter",
|
||||||
|
crop.getStartDate(), crop.getStartDate().plusDays(plant.timeToHarvest(0)),
|
||||||
|
plant.wateringCycle().interval(), crop.getCropId().orElse(0L)));
|
||||||
|
|
||||||
for (GrowthPhase growthPhase : plant.lifecycleForGroup(growPhaseGroup)) {
|
for (GrowthPhase growthPhase : plant.lifecycleForGroup(growPhaseGroup)) {
|
||||||
for (TaskTemplate taskTemplate : growthPhase.taskTemplates()) {
|
for (TaskTemplate taskTemplate : growthPhase.taskTemplates()) {
|
||||||
addTask(taskTemplate.generateTask(crop.getStartDate(), crop.getCropId().orElse(0L)));
|
addTask(taskTemplate.generateTask(crop.getStartDate(), crop.getCropId().orElse(0L)));
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package ch.zhaw.gartenverwaltung.types;
|
package ch.zhaw.gartenverwaltung.types;
|
||||||
|
|
||||||
|
import ch.zhaw.gartenverwaltung.io.JsonPlantList;
|
||||||
|
import ch.zhaw.gartenverwaltung.io.PlantList;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ public record GrowthPhase(
|
|||||||
MonthDay startDate,
|
MonthDay startDate,
|
||||||
MonthDay endDate,
|
MonthDay endDate,
|
||||||
int group,
|
int group,
|
||||||
WateringCycle wateringCycle,
|
|
||||||
@JsonDeserialize(using = GrowthPhaseTypeDeserializer.class) GrowthPhaseType type,
|
@JsonDeserialize(using = GrowthPhaseTypeDeserializer.class) GrowthPhaseType type,
|
||||||
@JsonDeserialize(using = HardinessZoneDeserializer.class) HardinessZone zone,
|
@JsonDeserialize(using = HardinessZoneDeserializer.class) HardinessZone zone,
|
||||||
List<TaskTemplate> taskTemplates) {
|
List<TaskTemplate> taskTemplates) {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public record Plant(
|
|||||||
int light,
|
int light,
|
||||||
String soil,
|
String soil,
|
||||||
List<Pest> pests,
|
List<Pest> pests,
|
||||||
|
WateringCycle wateringCycle,
|
||||||
List<GrowthPhase> lifecycle) {
|
List<GrowthPhase> lifecycle) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -41,6 +41,15 @@ public class Task {
|
|||||||
this.cropId = cropId;
|
this.cropId = cropId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor for weather events
|
||||||
|
*/
|
||||||
|
public Task(String name, String description, LocalDate startDate) {
|
||||||
|
this.name = name;
|
||||||
|
this.description = description;
|
||||||
|
this.startDate = startDate;
|
||||||
|
}
|
||||||
|
|
||||||
public Task(String name, String description, LocalDate startDate, LocalDate endDate, int interval, long cropId) {
|
public Task(String name, String description, LocalDate startDate, LocalDate endDate, int interval, long cropId) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.description = description;
|
this.description = description;
|
||||||
|
|||||||
@@ -14,6 +14,11 @@
|
|||||||
"measures": "Less water."
|
"measures": "Less water."
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"wateringCycle": {
|
||||||
|
"litersPerSqM": 25,
|
||||||
|
"interval": null,
|
||||||
|
"notes": []
|
||||||
|
},
|
||||||
"lifecycle": [
|
"lifecycle": [
|
||||||
{
|
{
|
||||||
"startDate": "03-10",
|
"startDate": "03-10",
|
||||||
@@ -21,11 +26,6 @@
|
|||||||
"type": "SOW",
|
"type": "SOW",
|
||||||
"zone": "ZONE_8A",
|
"zone": "ZONE_8A",
|
||||||
"group": 0,
|
"group": 0,
|
||||||
"wateringCycle": {
|
|
||||||
"litersPerSqM": 0,
|
|
||||||
"interval": null,
|
|
||||||
"notes": []
|
|
||||||
},
|
|
||||||
"taskTemplates": [
|
"taskTemplates": [
|
||||||
{
|
{
|
||||||
"name": "Germinate",
|
"name": "Germinate",
|
||||||
@@ -42,11 +42,6 @@
|
|||||||
"type": "PLANT",
|
"type": "PLANT",
|
||||||
"zone": "ZONE_8A",
|
"zone": "ZONE_8A",
|
||||||
"group": 0,
|
"group": 0,
|
||||||
"wateringCycle": {
|
|
||||||
"litersPerSqM": 25,
|
|
||||||
"interval": 7,
|
|
||||||
"notes": []
|
|
||||||
},
|
|
||||||
"taskTemplates": [
|
"taskTemplates": [
|
||||||
{
|
{
|
||||||
"name": "hilling",
|
"name": "hilling",
|
||||||
@@ -63,11 +58,6 @@
|
|||||||
"type": "HARVEST",
|
"type": "HARVEST",
|
||||||
"zone": "ZONE_8A",
|
"zone": "ZONE_8A",
|
||||||
"group": 0,
|
"group": 0,
|
||||||
"wateringCycle": {
|
|
||||||
"litersPerSqM": 0,
|
|
||||||
"interval": null,
|
|
||||||
"notes": []
|
|
||||||
},
|
|
||||||
"taskTemplates": [
|
"taskTemplates": [
|
||||||
{
|
{
|
||||||
"name": "Harvest",
|
"name": "Harvest",
|
||||||
@@ -85,6 +75,11 @@
|
|||||||
"name": "Early Carrot",
|
"name": "Early Carrot",
|
||||||
"description": "Carrot, (Daucus carota), herbaceous, generally biennial plant of the Apiaceae family that produces an edible taproot. Among common varieties root shapes range from globular to long, with lower ends blunt to pointed. Besides the orange-coloured roots, white-, yellow-, and purple-fleshed varieties are known.",
|
"description": "Carrot, (Daucus carota), herbaceous, generally biennial plant of the Apiaceae family that produces an edible taproot. Among common varieties root shapes range from globular to long, with lower ends blunt to pointed. Besides the orange-coloured roots, white-, yellow-, and purple-fleshed varieties are known.",
|
||||||
"image": "carrot.jpg",
|
"image": "carrot.jpg",
|
||||||
|
"wateringCycle": {
|
||||||
|
"litersPerSqM": 15,
|
||||||
|
"interval": 3,
|
||||||
|
"notes": []
|
||||||
|
},
|
||||||
"lifecycle": [
|
"lifecycle": [
|
||||||
{
|
{
|
||||||
"startDate": "02-20",
|
"startDate": "02-20",
|
||||||
@@ -92,11 +87,7 @@
|
|||||||
"zone": "ZONE_8A",
|
"zone": "ZONE_8A",
|
||||||
"type": "SOW",
|
"type": "SOW",
|
||||||
"group": 0,
|
"group": 0,
|
||||||
"wateringCycle": {
|
|
||||||
"litersPerSqM": 15,
|
|
||||||
"interval": 3,
|
|
||||||
"notes": []
|
|
||||||
},
|
|
||||||
"taskTemplates": [
|
"taskTemplates": [
|
||||||
{
|
{
|
||||||
"name": "hilling",
|
"name": "hilling",
|
||||||
@@ -113,13 +104,6 @@
|
|||||||
"zone": "ZONE_8A",
|
"zone": "ZONE_8A",
|
||||||
"type": "PLANT",
|
"type": "PLANT",
|
||||||
"group": 0,
|
"group": 0,
|
||||||
"wateringCycle": {
|
|
||||||
"litersPerSqM": 25,
|
|
||||||
"interval": 3,
|
|
||||||
"notes": [
|
|
||||||
"Be careful not to pour water over the leaves, as this will lead to sunburn."
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"taskTemplates": [
|
"taskTemplates": [
|
||||||
{
|
{
|
||||||
"name": "hilling",
|
"name": "hilling",
|
||||||
@@ -136,11 +120,6 @@
|
|||||||
"zone": "ZONE_8A",
|
"zone": "ZONE_8A",
|
||||||
"type": "HARVEST",
|
"type": "HARVEST",
|
||||||
"group": 0,
|
"group": 0,
|
||||||
"wateringCycle": {
|
|
||||||
"litersPerSqM": 0,
|
|
||||||
"interval": null,
|
|
||||||
"notes": []
|
|
||||||
},
|
|
||||||
"taskTemplates": [
|
"taskTemplates": [
|
||||||
{
|
{
|
||||||
"name": "Harvesting",
|
"name": "Harvesting",
|
||||||
@@ -167,6 +146,12 @@
|
|||||||
"name": "Summertime Onion",
|
"name": "Summertime Onion",
|
||||||
"description": "Onion, (Allium cepa), herbaceous biennial plant in the amaryllis family (Amaryllidaceae) grown for its edible bulb. The onion is likely native to southwestern Asia but is now grown throughout the world, chiefly in the temperate zones. Onions are low in nutrients but are valued for their flavour and are used widely in cooking. They add flavour to such dishes as stews, roasts, soups, and salads and are also served as a cooked vegetable.",
|
"description": "Onion, (Allium cepa), herbaceous biennial plant in the amaryllis family (Amaryllidaceae) grown for its edible bulb. The onion is likely native to southwestern Asia but is now grown throughout the world, chiefly in the temperate zones. Onions are low in nutrients but are valued for their flavour and are used widely in cooking. They add flavour to such dishes as stews, roasts, soups, and salads and are also served as a cooked vegetable.",
|
||||||
"image": "onion.jpg",
|
"image": "onion.jpg",
|
||||||
|
"wateringCycle": {
|
||||||
|
"litersPerSqM": 15,
|
||||||
|
"interval": 4,
|
||||||
|
"notes": [
|
||||||
|
]
|
||||||
|
},
|
||||||
"lifecycle": [
|
"lifecycle": [
|
||||||
{
|
{
|
||||||
"startDate": "03-15",
|
"startDate": "03-15",
|
||||||
@@ -174,12 +159,6 @@
|
|||||||
"type": "SOW",
|
"type": "SOW",
|
||||||
"zone": "ZONE_8A",
|
"zone": "ZONE_8A",
|
||||||
"group": 0,
|
"group": 0,
|
||||||
"wateringCycle": {
|
|
||||||
"litersPerSqM": 15,
|
|
||||||
"interval": 4,
|
|
||||||
"notes": [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"taskTemplates": [
|
"taskTemplates": [
|
||||||
{
|
{
|
||||||
"name": "Plant Sets",
|
"name": "Plant Sets",
|
||||||
@@ -196,13 +175,6 @@
|
|||||||
"type": "PLANT",
|
"type": "PLANT",
|
||||||
"zone": "ZONE_8A",
|
"zone": "ZONE_8A",
|
||||||
"group": 0,
|
"group": 0,
|
||||||
"wateringCycle": {
|
|
||||||
"litersPerSqM": 25,
|
|
||||||
"interval": 3,
|
|
||||||
"notes": [
|
|
||||||
""
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"taskTemplates": [
|
"taskTemplates": [
|
||||||
{
|
{
|
||||||
"name": "hilling",
|
"name": "hilling",
|
||||||
@@ -219,12 +191,6 @@
|
|||||||
"type": "HARVEST",
|
"type": "HARVEST",
|
||||||
"zone": "ZONE_8A",
|
"zone": "ZONE_8A",
|
||||||
"group": 0,
|
"group": 0,
|
||||||
"wateringCycle": {
|
|
||||||
"litersPerSqM": 0,
|
|
||||||
"interval": null,
|
|
||||||
"notes": [
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"taskTemplates": [
|
"taskTemplates": [
|
||||||
{
|
{
|
||||||
"name": "Harvesting",
|
"name": "Harvesting",
|
||||||
|
|||||||
@@ -49,11 +49,12 @@ public class GardenPlanModelTest {
|
|||||||
0,
|
0,
|
||||||
"sandy to loamy, loose soil, free of stones",
|
"sandy to loamy, loose soil, free of stones",
|
||||||
new ArrayList<>(),
|
new ArrayList<>(),
|
||||||
List.of(new GrowthPhase(MonthDay.of(6, 4), MonthDay.of(12, 4), 0, new WateringCycle(0, 0, null), GrowthPhaseType.HARVEST, HardinessZone.ZONE_8A, new ArrayList<>()),
|
new WateringCycle(15, 0, null),
|
||||||
new GrowthPhase(MonthDay.of(4, 3), MonthDay.of(12, 4), 0, new WateringCycle(0, 0, null), GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, new ArrayList<>()),
|
List.of(new GrowthPhase(MonthDay.of(6, 4), MonthDay.of(12, 4), 0, GrowthPhaseType.HARVEST, HardinessZone.ZONE_8A, new ArrayList<>()),
|
||||||
new GrowthPhase(MonthDay.of(8, 5), MonthDay.of(12, 4), 0, new WateringCycle(0, 0, null), GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, new ArrayList<>()),
|
new GrowthPhase(MonthDay.of(4, 3), MonthDay.of(12, 4), 0, GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, new ArrayList<>()),
|
||||||
new GrowthPhase(MonthDay.of(2, 8), MonthDay.of(12, 4), 0, new WateringCycle(0, 0, null), GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, new ArrayList<>()),
|
new GrowthPhase(MonthDay.of(8, 5), MonthDay.of(12, 4), 0, GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, new ArrayList<>()),
|
||||||
new GrowthPhase(MonthDay.of(10, 2), MonthDay.of(12, 4), 0, new WateringCycle(0, 0, null), GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, new ArrayList<>())));
|
new GrowthPhase(MonthDay.of(2, 8), MonthDay.of(12, 4), 0, GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, new ArrayList<>()),
|
||||||
|
new GrowthPhase(MonthDay.of(10, 2), MonthDay.of(12, 4), 0, GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, new ArrayList<>())));
|
||||||
|
|
||||||
exampleCropOnion = new Crop(examplePlantOnion.id(), LocalDate.of(2023, 3, 1))
|
exampleCropOnion = new Crop(examplePlantOnion.id(), LocalDate.of(2023, 3, 1))
|
||||||
.withId(3);
|
.withId(3);
|
||||||
@@ -66,7 +67,8 @@ public class GardenPlanModelTest {
|
|||||||
0,
|
0,
|
||||||
"sandy to loamy, loose soil, free of stones",
|
"sandy to loamy, loose soil, free of stones",
|
||||||
new ArrayList<>(),
|
new ArrayList<>(),
|
||||||
List.of(new GrowthPhase(MonthDay.of(4, 4), MonthDay.of(12, 4), 0, new WateringCycle(0, 0, null), GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, new ArrayList<>())));
|
new WateringCycle(25, 0, null),
|
||||||
|
List.of(new GrowthPhase(MonthDay.of(4, 4), MonthDay.of(12, 4), 0, GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, new ArrayList<>())));
|
||||||
exampleCropCarrot = new Crop(examplePlantCarrot.id(), LocalDate.now())
|
exampleCropCarrot = new Crop(examplePlantCarrot.id(), LocalDate.now())
|
||||||
.withId(5);
|
.withId(5);
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,14 @@ import org.junit.jupiter.api.BeforeEach;
|
|||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
import java.nio.file.StandardCopyOption;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.MonthDay;
|
import java.time.MonthDay;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
@@ -88,12 +94,13 @@ class GardenScheduleTest {
|
|||||||
0,
|
0,
|
||||||
"sandy to loamy, loose soil, free of stones",
|
"sandy to loamy, loose soil, free of stones",
|
||||||
new ArrayList<>(),
|
new ArrayList<>(),
|
||||||
|
new WateringCycle(15, 0, null),
|
||||||
List.of(
|
List.of(
|
||||||
new GrowthPhase(MonthDay.of(6, 4), MonthDay.of(12, 4), 0, new WateringCycle(0, 0, null), GrowthPhaseType.HARVEST, HardinessZone.ZONE_8A, List.of(
|
new GrowthPhase(MonthDay.of(6, 4), MonthDay.of(12, 4), 0, GrowthPhaseType.HARVEST, HardinessZone.ZONE_8A, List.of(
|
||||||
exampleTaskTemplateList.get(0),
|
exampleTaskTemplateList.get(0),
|
||||||
exampleTaskTemplateList.get(1)
|
exampleTaskTemplateList.get(1)
|
||||||
)),
|
)),
|
||||||
new GrowthPhase(MonthDay.of(4, 3), MonthDay.of(12, 4), 0, new WateringCycle(0, 0, null), GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, List.of(
|
new GrowthPhase(MonthDay.of(4, 3), MonthDay.of(12, 4), 0, GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, List.of(
|
||||||
exampleTaskTemplateList.get(2),
|
exampleTaskTemplateList.get(2),
|
||||||
exampleTaskTemplateList.get(3)
|
exampleTaskTemplateList.get(3)
|
||||||
))
|
))
|
||||||
@@ -187,8 +194,7 @@ class GardenScheduleTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void planTasksForCrop() throws HardinessZoneNotSetException, PlantNotFoundException, IOException {
|
void planTasksForCrop() throws HardinessZoneNotSetException, PlantNotFoundException, IOException, URISyntaxException {
|
||||||
assertThrows(PlantNotFoundException.class,()-> model.planTasksForCrop(new Crop()));
|
|
||||||
model.planTasksForCrop(new Crop(20, exampleStartDate).withId(30));
|
model.planTasksForCrop(new Crop(20, exampleStartDate).withId(30));
|
||||||
verify(exampleTaskTemplateList.get(0), times(1)).generateTask(exampleStartDate, 30);
|
verify(exampleTaskTemplateList.get(0), times(1)).generateTask(exampleStartDate, 30);
|
||||||
verify(exampleTaskTemplateList.get(1), times(1)).generateTask(exampleStartDate, 30);
|
verify(exampleTaskTemplateList.get(1), times(1)).generateTask(exampleStartDate, 30);
|
||||||
@@ -198,5 +204,18 @@ class GardenScheduleTest {
|
|||||||
verify(taskList, times(1)).saveTask(exampleTaskList.get(1));
|
verify(taskList, times(1)).saveTask(exampleTaskList.get(1));
|
||||||
verify(taskList, times(1)).saveTask(exampleTaskList.get(2));
|
verify(taskList, times(1)).saveTask(exampleTaskList.get(2));
|
||||||
verify(taskList, times(1)).saveTask(exampleTaskList.get(3));
|
verify(taskList, times(1)).saveTask(exampleTaskList.get(3));
|
||||||
|
|
||||||
|
final URL dbDataSource = this.getClass().getResource("test-taskdb.json");
|
||||||
|
final URL testFile = this.getClass().getResource("template-taskdb.json");
|
||||||
|
|
||||||
|
Files.copy(Path.of(testFile.toURI()), Path.of(dbDataSource.toURI()), StandardCopyOption.REPLACE_EXISTING);
|
||||||
|
JsonTaskList testTaskList = new JsonTaskList(dbDataSource);
|
||||||
|
|
||||||
|
model = spy(new GardenSchedule(testTaskList,plantList));
|
||||||
|
model.planTasksForCrop(new Crop(20, exampleStartDate).withId(30));
|
||||||
|
assertEquals(5,testTaskList.getTaskList(LocalDate.MIN,LocalDate.MAX).size());
|
||||||
|
testTaskList.getTaskList(LocalDate.MIN,LocalDate.MAX).get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -49,11 +49,12 @@ class PlantListModelTest {
|
|||||||
0,
|
0,
|
||||||
"sandy to loamy, loose soil, free of stones",
|
"sandy to loamy, loose soil, free of stones",
|
||||||
new ArrayList<>(),
|
new ArrayList<>(),
|
||||||
List.of(new GrowthPhase(MonthDay.of(6, 4), MonthDay.of(12, 4), 0, new WateringCycle(0, 0, null), GrowthPhaseType.HARVEST, HardinessZone.ZONE_8A, new ArrayList<>()),
|
new WateringCycle(25, 0, null),
|
||||||
new GrowthPhase(MonthDay.of(4, 3), MonthDay.of(12, 4), 0, new WateringCycle(0, 0, null), GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, new ArrayList<>()),
|
List.of(new GrowthPhase(MonthDay.of(6, 4), MonthDay.of(12, 4), 0, GrowthPhaseType.HARVEST, HardinessZone.ZONE_8A, new ArrayList<>()),
|
||||||
new GrowthPhase(MonthDay.of(8, 5), MonthDay.of(12, 4), 0, new WateringCycle(0, 0, null), GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, new ArrayList<>()),
|
new GrowthPhase(MonthDay.of(4, 3), MonthDay.of(12, 4), 0, GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, new ArrayList<>()),
|
||||||
new GrowthPhase(MonthDay.of(2, 8), MonthDay.of(12, 4), 0, new WateringCycle(0, 0, null), GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, new ArrayList<>()),
|
new GrowthPhase(MonthDay.of(8, 5), MonthDay.of(12, 4), 0, GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, new ArrayList<>()),
|
||||||
new GrowthPhase(MonthDay.of(10, 2), MonthDay.of(12, 4), 0, new WateringCycle(0, 0, null), GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, new ArrayList<>())))
|
new GrowthPhase(MonthDay.of(2, 8), MonthDay.of(12, 4), 0, GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, new ArrayList<>()),
|
||||||
|
new GrowthPhase(MonthDay.of(10, 2), MonthDay.of(12, 4), 0, GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, new ArrayList<>())))
|
||||||
);
|
);
|
||||||
examplePlantList.add(new Plant(
|
examplePlantList.add(new Plant(
|
||||||
0,
|
0,
|
||||||
@@ -64,8 +65,9 @@ class PlantListModelTest {
|
|||||||
6,
|
6,
|
||||||
"sandy",
|
"sandy",
|
||||||
new ArrayList<>(),
|
new ArrayList<>(),
|
||||||
List.of(new GrowthPhase(MonthDay.of(6, 4), MonthDay.of(12, 4), 0, new WateringCycle(0, 0, null), GrowthPhaseType.HARVEST, HardinessZone.ZONE_8A, new ArrayList<>()),
|
new WateringCycle(0, 0, null),
|
||||||
new GrowthPhase(MonthDay.of(6, 4), MonthDay.of(12, 4), 0, new WateringCycle(0, 0, null), GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, new ArrayList<>())))
|
List.of(new GrowthPhase(MonthDay.of(6, 4), MonthDay.of(12, 4), 0, GrowthPhaseType.HARVEST, HardinessZone.ZONE_8A, new ArrayList<>()),
|
||||||
|
new GrowthPhase(MonthDay.of(6, 4), MonthDay.of(12, 4), 0, GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, new ArrayList<>())))
|
||||||
);
|
);
|
||||||
examplePlantList.add(new Plant(
|
examplePlantList.add(new Plant(
|
||||||
1,
|
1,
|
||||||
@@ -76,7 +78,8 @@ class PlantListModelTest {
|
|||||||
0,
|
0,
|
||||||
"sandy to loamy, loose soil, free of stones",
|
"sandy to loamy, loose soil, free of stones",
|
||||||
new ArrayList<>(),
|
new ArrayList<>(),
|
||||||
List.of(new GrowthPhase(MonthDay.of(4, 4), MonthDay.of(12, 4), 0, new WateringCycle(0, 0, null), GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, new ArrayList<>())))
|
new WateringCycle(25, 0, null),
|
||||||
|
List.of(new GrowthPhase(MonthDay.of(4, 4), MonthDay.of(12, 4), 0, GrowthPhaseType.PLANT, HardinessZone.ZONE_8A, new ArrayList<>())))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,215 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 0,
|
||||||
|
"name": "Potato",
|
||||||
|
"description": "The potato is a tuber, round or oval, with small white roots called 'eyes', that are growth buds. The size varies depending on the variety; the colour of the skin can be white, yellow or even purple.",
|
||||||
|
"light": 6,
|
||||||
|
"spacing": "35",
|
||||||
|
"soil": "sandy",
|
||||||
|
"image": "potato.jpg",
|
||||||
|
"pests": [
|
||||||
|
{
|
||||||
|
"name": "Rot",
|
||||||
|
"description": "Rot, any of several plant diseases, caused by any of hundreds of species of soil-borne bacteria, fungi, and funguslike organisms (Oomycota). Rot diseases are characterized by plant decomposition and putrefaction. The decay may be hard, dry, spongy, watery, mushy, or slimy and may affect any plant part.",
|
||||||
|
"measures": "Less water."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"wateringCycle": {
|
||||||
|
"litersPerSqM": 25,
|
||||||
|
"interval": null,
|
||||||
|
"notes": []
|
||||||
|
},
|
||||||
|
"lifecycle": [
|
||||||
|
{
|
||||||
|
"startDate": "03-10",
|
||||||
|
"endDate": "04-10",
|
||||||
|
"type": "SOW",
|
||||||
|
"zone": "ZONE_8A",
|
||||||
|
"group": 0,
|
||||||
|
"taskTemplates": [
|
||||||
|
{
|
||||||
|
"name": "Germinate",
|
||||||
|
"relativeStartDate": -14,
|
||||||
|
"relativeEndDate": null,
|
||||||
|
"description": "Take an egg carton and fill it with soil. Put the seedling deep enough so its half covered with soil. Keep it in 10-15 * Celsius with lots of light.",
|
||||||
|
"interval": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"startDate": "04-10",
|
||||||
|
"endDate": "07-10",
|
||||||
|
"type": "PLANT",
|
||||||
|
"zone": "ZONE_8A",
|
||||||
|
"group": 0,
|
||||||
|
"taskTemplates": [
|
||||||
|
{
|
||||||
|
"name": "hilling",
|
||||||
|
"relativeStartDate": 0,
|
||||||
|
"relativeEndDate": null,
|
||||||
|
"description": "When the plants are 20 cm tall, begin hilling the potatoes by gently mounding the soil from the center of your rows around the stems of the plant. Mound up the soil around the plant until just the top few leaves show above the soil. Two weeks later, hill up the soil again when the plants grow another 20 cm.",
|
||||||
|
"interval": 21
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"startDate": "06-10",
|
||||||
|
"endDate": "08-10",
|
||||||
|
"type": "HARVEST",
|
||||||
|
"zone": "ZONE_8A",
|
||||||
|
"group": 0,
|
||||||
|
"taskTemplates": [
|
||||||
|
{
|
||||||
|
"name": "Harvest",
|
||||||
|
"relativeStartDate": 0,
|
||||||
|
"relativeEndDate": null,
|
||||||
|
"description": "Once the foliage has wilted and dried completely, harvest on a dry day. Store in a dark and cool location.",
|
||||||
|
"interval": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1,
|
||||||
|
"name": "Early Carrot",
|
||||||
|
"description": "Carrot, (Daucus carota), herbaceous, generally biennial plant of the Apiaceae family that produces an edible taproot. Among common varieties root shapes range from globular to long, with lower ends blunt to pointed. Besides the orange-coloured roots, white-, yellow-, and purple-fleshed varieties are known.",
|
||||||
|
"image": "carrot.jpg",
|
||||||
|
"wateringCycle": {
|
||||||
|
"litersPerSqM": 15,
|
||||||
|
"interval": 3,
|
||||||
|
"notes": []
|
||||||
|
},
|
||||||
|
"lifecycle": [
|
||||||
|
{
|
||||||
|
"startDate": "02-20",
|
||||||
|
"endDate": "03-10",
|
||||||
|
"zone": "ZONE_8A",
|
||||||
|
"type": "SOW",
|
||||||
|
"group": 0,
|
||||||
|
|
||||||
|
"taskTemplates": [
|
||||||
|
{
|
||||||
|
"name": "hilling",
|
||||||
|
"relativeStartDate": 0,
|
||||||
|
"relativeEndDate": 0,
|
||||||
|
"description": "Mound up the soil around the plant until just the top few leaves show above the soil. ",
|
||||||
|
"interval": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"startDate": "03-10",
|
||||||
|
"endDate": "05-10",
|
||||||
|
"zone": "ZONE_8A",
|
||||||
|
"type": "PLANT",
|
||||||
|
"group": 0,
|
||||||
|
"taskTemplates": [
|
||||||
|
{
|
||||||
|
"name": "hilling",
|
||||||
|
"relativeStartDate": 0,
|
||||||
|
"relativeEndDate": null,
|
||||||
|
"description": "Mound up the soil around the plant until just the top few leaves show above the soil. ",
|
||||||
|
"interval": 15
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"startDate": "05-10",
|
||||||
|
"endDate": "05-20",
|
||||||
|
"zone": "ZONE_8A",
|
||||||
|
"type": "HARVEST",
|
||||||
|
"group": 0,
|
||||||
|
"taskTemplates": [
|
||||||
|
{
|
||||||
|
"name": "Harvesting",
|
||||||
|
"relativeStartDate": 0,
|
||||||
|
"relativeEndDate": 14,
|
||||||
|
"description": "When the leaves turn to a yellowish brown. Do not harvest earlier. The plant will show when it's ready.",
|
||||||
|
"interval": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"soil": "sandy to loamy, loose soil, free of stones",
|
||||||
|
"spacing": "5,35,2.5",
|
||||||
|
"pests": [
|
||||||
|
{
|
||||||
|
"name": "Rot",
|
||||||
|
"description": "rot, any of several plant diseases, caused by any of hundreds of species of soil-borne bacteria, fungi, and funguslike organisms (Oomycota). Rot diseases are characterized by plant decomposition and putrefaction. The decay may be hard, dry, spongy, watery, mushy, or slimy and may affect any plant part.",
|
||||||
|
"measures": "less water"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"name": "Summertime Onion",
|
||||||
|
"description": "Onion, (Allium cepa), herbaceous biennial plant in the amaryllis family (Amaryllidaceae) grown for its edible bulb. The onion is likely native to southwestern Asia but is now grown throughout the world, chiefly in the temperate zones. Onions are low in nutrients but are valued for their flavour and are used widely in cooking. They add flavour to such dishes as stews, roasts, soups, and salads and are also served as a cooked vegetable.",
|
||||||
|
"image": "onion.jpg",
|
||||||
|
"wateringCycle": {
|
||||||
|
"litersPerSqM": 15,
|
||||||
|
"interval": 4,
|
||||||
|
"notes": [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"lifecycle": [
|
||||||
|
{
|
||||||
|
"startDate": "03-15",
|
||||||
|
"endDate": "04-10",
|
||||||
|
"type": "SOW",
|
||||||
|
"zone": "ZONE_8A",
|
||||||
|
"group": 0,
|
||||||
|
"taskTemplates": [
|
||||||
|
{
|
||||||
|
"name": "Plant Sets",
|
||||||
|
"relativeStartDate": 0,
|
||||||
|
"relativeEndDate": 0,
|
||||||
|
"description": "Plant the sets about 5cm deep into the soil.",
|
||||||
|
"interval": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"startDate": "04-10",
|
||||||
|
"endDate": "07-10",
|
||||||
|
"type": "PLANT",
|
||||||
|
"zone": "ZONE_8A",
|
||||||
|
"group": 0,
|
||||||
|
"taskTemplates": [
|
||||||
|
{
|
||||||
|
"name": "hilling",
|
||||||
|
"relativeStartDate": 0,
|
||||||
|
"relativeEndDate": null,
|
||||||
|
"description": "Mound up the soil around the plant until just the top few leaves show above the soil. ",
|
||||||
|
"interval": 15
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"startDate": "07-10",
|
||||||
|
"endDate": "09-20",
|
||||||
|
"type": "HARVEST",
|
||||||
|
"zone": "ZONE_8A",
|
||||||
|
"group": 0,
|
||||||
|
"taskTemplates": [
|
||||||
|
{
|
||||||
|
"name": "Harvesting",
|
||||||
|
"relativeStartDate": 0,
|
||||||
|
"relativeEndDate": 14,
|
||||||
|
"description": "When ready for harvest, the leaves on your onion plants will start to flop over. This happens at the \"neck\" of the onion and it signals that the plant has stopped growing and is ready for storage. Onions should be harvested soon thereafter",
|
||||||
|
"interval": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"soil": "sandy to loamy, loose soil, free of stones",
|
||||||
|
"spacing": "15,30,2",
|
||||||
|
"pests": [
|
||||||
|
{
|
||||||
|
"name": "Rot",
|
||||||
|
"description": "rot, any of several plant diseases, caused by any of hundreds of species of soil-borne bacteria, fungi, and funguslike organisms (Oomycota). Rot diseases are characterized by plant decomposition and putrefaction. The decay may be hard, dry, spongy, watery, mushy, or slimy and may affect any plant part.",
|
||||||
|
"measures": "less water"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -14,6 +14,11 @@
|
|||||||
"measures": "Less water."
|
"measures": "Less water."
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"wateringCycle": {
|
||||||
|
"litersPerSqM": 25,
|
||||||
|
"interval": null,
|
||||||
|
"notes": []
|
||||||
|
},
|
||||||
"lifecycle": [
|
"lifecycle": [
|
||||||
{
|
{
|
||||||
"startDate": "03-10",
|
"startDate": "03-10",
|
||||||
@@ -21,11 +26,6 @@
|
|||||||
"type": "SOW",
|
"type": "SOW",
|
||||||
"zone": "ZONE_8A",
|
"zone": "ZONE_8A",
|
||||||
"group": 0,
|
"group": 0,
|
||||||
"wateringCycle": {
|
|
||||||
"litersPerSqM": 0,
|
|
||||||
"interval": null,
|
|
||||||
"notes": []
|
|
||||||
},
|
|
||||||
"taskTemplates": [
|
"taskTemplates": [
|
||||||
{
|
{
|
||||||
"name": "Germinate",
|
"name": "Germinate",
|
||||||
@@ -42,11 +42,6 @@
|
|||||||
"type": "PLANT",
|
"type": "PLANT",
|
||||||
"zone": "ZONE_8A",
|
"zone": "ZONE_8A",
|
||||||
"group": 0,
|
"group": 0,
|
||||||
"wateringCycle": {
|
|
||||||
"litersPerSqM": 25,
|
|
||||||
"interval": 7,
|
|
||||||
"notes": []
|
|
||||||
},
|
|
||||||
"taskTemplates": [
|
"taskTemplates": [
|
||||||
{
|
{
|
||||||
"name": "hilling",
|
"name": "hilling",
|
||||||
@@ -63,11 +58,6 @@
|
|||||||
"type": "HARVEST",
|
"type": "HARVEST",
|
||||||
"zone": "ZONE_8A",
|
"zone": "ZONE_8A",
|
||||||
"group": 0,
|
"group": 0,
|
||||||
"wateringCycle": {
|
|
||||||
"litersPerSqM": 0,
|
|
||||||
"interval": null,
|
|
||||||
"notes": []
|
|
||||||
},
|
|
||||||
"taskTemplates": [
|
"taskTemplates": [
|
||||||
{
|
{
|
||||||
"name": "Harvest",
|
"name": "Harvest",
|
||||||
@@ -85,6 +75,11 @@
|
|||||||
"name": "Early Carrot",
|
"name": "Early Carrot",
|
||||||
"description": "Carrot, (Daucus carota), herbaceous, generally biennial plant of the Apiaceae family that produces an edible taproot. Among common varieties root shapes range from globular to long, with lower ends blunt to pointed. Besides the orange-coloured roots, white-, yellow-, and purple-fleshed varieties are known.",
|
"description": "Carrot, (Daucus carota), herbaceous, generally biennial plant of the Apiaceae family that produces an edible taproot. Among common varieties root shapes range from globular to long, with lower ends blunt to pointed. Besides the orange-coloured roots, white-, yellow-, and purple-fleshed varieties are known.",
|
||||||
"image": "carrot.jpg",
|
"image": "carrot.jpg",
|
||||||
|
"wateringCycle": {
|
||||||
|
"litersPerSqM": 15,
|
||||||
|
"interval": 3,
|
||||||
|
"notes": []
|
||||||
|
},
|
||||||
"lifecycle": [
|
"lifecycle": [
|
||||||
{
|
{
|
||||||
"startDate": "02-20",
|
"startDate": "02-20",
|
||||||
@@ -92,11 +87,7 @@
|
|||||||
"zone": "ZONE_8A",
|
"zone": "ZONE_8A",
|
||||||
"type": "SOW",
|
"type": "SOW",
|
||||||
"group": 0,
|
"group": 0,
|
||||||
"wateringCycle": {
|
|
||||||
"litersPerSqM": 15,
|
|
||||||
"interval": 3,
|
|
||||||
"notes": []
|
|
||||||
},
|
|
||||||
"taskTemplates": [
|
"taskTemplates": [
|
||||||
{
|
{
|
||||||
"name": "hilling",
|
"name": "hilling",
|
||||||
@@ -113,13 +104,6 @@
|
|||||||
"zone": "ZONE_8A",
|
"zone": "ZONE_8A",
|
||||||
"type": "PLANT",
|
"type": "PLANT",
|
||||||
"group": 0,
|
"group": 0,
|
||||||
"wateringCycle": {
|
|
||||||
"litersPerSqM": 25,
|
|
||||||
"interval": 3,
|
|
||||||
"notes": [
|
|
||||||
"Be careful not to pour water over the leaves, as this will lead to sunburn."
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"taskTemplates": [
|
"taskTemplates": [
|
||||||
{
|
{
|
||||||
"name": "hilling",
|
"name": "hilling",
|
||||||
@@ -136,11 +120,6 @@
|
|||||||
"zone": "ZONE_8A",
|
"zone": "ZONE_8A",
|
||||||
"type": "HARVEST",
|
"type": "HARVEST",
|
||||||
"group": 0,
|
"group": 0,
|
||||||
"wateringCycle": {
|
|
||||||
"litersPerSqM": 0,
|
|
||||||
"interval": null,
|
|
||||||
"notes": []
|
|
||||||
},
|
|
||||||
"taskTemplates": [
|
"taskTemplates": [
|
||||||
{
|
{
|
||||||
"name": "Harvesting",
|
"name": "Harvesting",
|
||||||
@@ -167,6 +146,12 @@
|
|||||||
"name": "Summertime Onion",
|
"name": "Summertime Onion",
|
||||||
"description": "Onion, (Allium cepa), herbaceous biennial plant in the amaryllis family (Amaryllidaceae) grown for its edible bulb. The onion is likely native to southwestern Asia but is now grown throughout the world, chiefly in the temperate zones. Onions are low in nutrients but are valued for their flavour and are used widely in cooking. They add flavour to such dishes as stews, roasts, soups, and salads and are also served as a cooked vegetable.",
|
"description": "Onion, (Allium cepa), herbaceous biennial plant in the amaryllis family (Amaryllidaceae) grown for its edible bulb. The onion is likely native to southwestern Asia but is now grown throughout the world, chiefly in the temperate zones. Onions are low in nutrients but are valued for their flavour and are used widely in cooking. They add flavour to such dishes as stews, roasts, soups, and salads and are also served as a cooked vegetable.",
|
||||||
"image": "onion.jpg",
|
"image": "onion.jpg",
|
||||||
|
"wateringCycle": {
|
||||||
|
"litersPerSqM": 15,
|
||||||
|
"interval": 4,
|
||||||
|
"notes": [
|
||||||
|
]
|
||||||
|
},
|
||||||
"lifecycle": [
|
"lifecycle": [
|
||||||
{
|
{
|
||||||
"startDate": "03-15",
|
"startDate": "03-15",
|
||||||
@@ -174,19 +159,12 @@
|
|||||||
"type": "SOW",
|
"type": "SOW",
|
||||||
"zone": "ZONE_8A",
|
"zone": "ZONE_8A",
|
||||||
"group": 0,
|
"group": 0,
|
||||||
"wateringCycle": {
|
|
||||||
"litersPerSqM": 15,
|
|
||||||
"interval": 4,
|
|
||||||
"notes": [
|
|
||||||
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"taskTemplates": [
|
"taskTemplates": [
|
||||||
{
|
{
|
||||||
"name": "hilling",
|
"name": "Plant Sets",
|
||||||
"relativeStartDate": 0,
|
"relativeStartDate": 0,
|
||||||
"relativeEndDate": 0,
|
"relativeEndDate": 0,
|
||||||
"description": "Mound up the soil around the plant until just the top few leaves show above the soil. ",
|
"description": "Plant the sets about 5cm deep into the soil.",
|
||||||
"interval": null
|
"interval": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -197,13 +175,6 @@
|
|||||||
"type": "PLANT",
|
"type": "PLANT",
|
||||||
"zone": "ZONE_8A",
|
"zone": "ZONE_8A",
|
||||||
"group": 0,
|
"group": 0,
|
||||||
"wateringCycle": {
|
|
||||||
"litersPerSqM": 25,
|
|
||||||
"interval": 3,
|
|
||||||
"notes": [
|
|
||||||
""
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"taskTemplates": [
|
"taskTemplates": [
|
||||||
{
|
{
|
||||||
"name": "hilling",
|
"name": "hilling",
|
||||||
@@ -220,13 +191,6 @@
|
|||||||
"type": "HARVEST",
|
"type": "HARVEST",
|
||||||
"zone": "ZONE_8A",
|
"zone": "ZONE_8A",
|
||||||
"group": 0,
|
"group": 0,
|
||||||
"wateringCycle": {
|
|
||||||
"litersPerSqM": 0,
|
|
||||||
"interval": null,
|
|
||||||
"notes": [
|
|
||||||
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"taskTemplates": [
|
"taskTemplates": [
|
||||||
{
|
{
|
||||||
"name": "Harvesting",
|
"name": "Harvesting",
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
[
|
||||||
|
]
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
[
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user