From 96d5ba338b180d0d62aaa8cd79189dcb608d1805 Mon Sep 17 00:00:00 2001 From: DavidRavine Date: Wed, 12 Oct 2022 15:51:26 +0200 Subject: [PATCH] doc: fleshed out class diagram --- doc/ClassDiagramDraft.uxf | 88 ++++++++++++++++++++++++++------------- 1 file changed, 59 insertions(+), 29 deletions(-) diff --git a/doc/ClassDiagramDraft.uxf b/doc/ClassDiagramDraft.uxf index 5ddaf9a..1a1da0a 100644 --- a/doc/ClassDiagramDraft.uxf +++ b/doc/ClassDiagramDraft.uxf @@ -1,62 +1,92 @@ -10UMLClass57017510030MainUMLClass920365300140<<Interface>> +10UMLClass7203010030MainUMLClass1240250300140<<Interface>> PlantDatabase -- -+ getPlantList(zone: HardinessZone): List<Plant>UMLClass76064522050TaskListControllerUMLClass97085210130<<Record>> ++ getPlantList(zone: HardinessZone): List<Plant> ++ getPlant(id: long): Optional<Plant>UMLClass94058022040TaskListControllerUMLClass124010300180<<Record>> Plant -- + id: long + name: String + description: String -+ spacing: ? -+ lifecycle: Lifecycle -UMLClass102064516050TaskListModelUMLClass45062518070PlantListModelUMLClass23062518080PlantListControllerUMLClass1300825380230Task ++ spacing: int ++ lifecycle: List<GrowthPhase> +-- ++ calculateStartDate(harvestDate: Date): Date ++ generateTasks() +UMLClass1210580210120TaskListModel +-- +- tasks: ListProperty<Task> +- taskDb: TaskDatabase +-- ++ getTask(id: long): Optional<Task> ++ saveTask(task: Task) ++ removeTask(task: Task)UMLClass590560250110GardenPlanModel +-- +- tasks: ListProperty<Task> +- gardenPlan: GardenPlan +-- ++ savePlanting(planting: UserPlanting) ++ removePlanting(planting: UserPlanting)UMLClass34055018080GardenPlanControllerUMLClass1660720490240Task -- + id: long + name: String {readOnly} + description: String {readOnly} + startDate: Date {readOnly} ++ isReadOnly: boolean {readOnly} - interval: int - endDate: Date -- -+ Task(name: String, description: String, startDate: String): Task ++ Task(name: String, description: String, startDate: String, isReadOnly: boolean): Task + withInterval(interval: int): Task + withEndDate(endDate: Date): Task + withId(id: long): Task -- + getInterval(): Optional<int> -+ getEndDate(): Optional<Date>UMLClass960825280140<<Interface>> ++ getEndDate(): Optional<Date>UMLClass1170760280140<<Interface>> TaskDatabase -- + getTaskList(start: Date, end: Date): List<Task> -+ saveTask(Task task): void -+ removeTask(Task task): booleanUMLClass500265100100MainWindowUMLClass630285180130MainWindowControllerUMLClass54047521070NotificationServiceUMLClass1690565240140<<Interface>> -WeatherService ++ saveTask(Task task) throws ??Exception ++ removeTask(Task task) throws ??ExceptionUMLClass780310100100MainWindowUMLClass440180180130MainWindowControllerUMLClass1340107021070NotificationService -- -+ getWeatherForecast: WeatherForecastUMLClass1410445230100WeatherForecast +- taskDb: TaskDatabase -- -- updateTasksUMLClass138045260240Lifecycle ++ tick()UMLClass16401210240140<<Interface>> +WeatherProvider -- -- sowStart: Date {final} -- sowEnd: Date {final} -- plantStart: Date {final} -- plantEnd: Date {final} -- harvestStart: Date {final} -- harvestEnd: Date {final} ++ getWeatherForecast: WeatherForecastUMLClass16201040400100WeatherService -- -+ Lifecylcle(sowStart: Date, sowEnd: Date, plantStart: Date, plantEnd: Date, harvestStart: ) -+ getSowStart(): Optional<Date> -+ getSowEnd(): Optional<Date> -+ getPlantStart(): Optional<Date> -+ getPlantEnd(): Optional<Date> -+ getHarvestStart(): Optional<Date> -+ getHarvestEnd(): Optional<Date> -Relation117011523060lt=<->>>>>210;10;10;40Text2306519070Note: +- weatherPovider: WeatherProvider +- taskDb: TaskDatabase +-- ++ WeatherService(provider: WeatherProvider, taskDb: TaskDatabase) +- updateTasks()UMLClass162010260150<<Record>> +GrowthPhase +-- ++ startDate: Date ++ endDate: Date ++ type: GrowthPhaseType + +Relation15308011030lt=<->>>>>90;10;10;10Text420019070Note: -- {final, readOnly} omitted on public data fields in <<Record>> Entities for clarity -style=wordwrapRelation12308859030lt=<.70;10;10;10Relation109068530160lt=<.10;140;10;10UMLClass410785210120<<Record>> +style=wordwrapRelation144082024030lt=<.220;10;10;10Relation13006903090lt=<.10;70;10;10UMLClass600980210120<<Record>> UserPlanting -- + plantId: long -+ isSown: boolean ++ asSowing: boolean + startDate: Date -+ area: int \ No newline at end of file ++ area: intRelation13801803090lt=<.10;10;10;70UMLClass195010140120<<Enumeration>> +GrowthPhaseType +-- +SOW +PLANT +HARVESTRelation18707010030lt=<->>>>80;10;10;10Relation11505908030lt=<->>>>60;10;10;10Relation70089030110lt=<.10;90;10;10Relation51058010030lt=<->>>>80;10;10;10UMLClass570760280140<<Interface>> +GardenPlan +-- ++ getPlantings(): List<UserPlanting> ++ addPlanting(plantId: long, startDate) ++ savePlanting(planting: UserPlanting) +Relation69066030120lt=<.10;100;10;10UMLClass6039018080PlantingCell +{extends ListCell<>}UMLClass054029080PlantingCellFactory +{implements Callback<ListView<UserPlanting> >}Relation14046030100lt=<.10;10;10;80Relation1750113030100lt=<.10;80;10;10Relation1350890120200lt=<.10;10;100;180Relation1380890260220lt=<.10;10;240;200UMLClass1090106020050JsonTaskDatabaseRelation118089030190lt=<<-10;10;10;170UMLClass162031020050JsonPlantDatabaseRelation153032011030lt=<<-10;10;90;10UMLClass30080020050JsonGardenPlanRelation49081010030lt=<<-80;10;10;10Relation2805708030lt=<.10;10;60;10Relation850400220200lt=<.200;180;10;10Relation440400390170lt=<.10;150;370;10UMLClass85012016060PlantListControllerRelation7605090280lt=<.70;260;10;10Relation610230190140lt=<.10;10;170;120Relation87017080210lt=<.60;10;10;190UMLClass102029016060PlantListModelRelation1000150110160lt=<.90;140;10;10Relation11703109030lt=<.70;10;10;10 \ No newline at end of file