-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from ncryptedV1/dev
Dev to main
- Loading branch information
Showing
32 changed files
with
1,843 additions
and
9 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
@startuml | ||
|
||
left to right direction | ||
|
||
'class MealPlan { | ||
' - meals: List<Meal> | ||
' - start: LocalDate | ||
' - end: LocalDate | ||
' + getMeals(): List<Meal> | ||
' + getStart(): LocalDate | ||
' + getEnd(): LocalDate | ||
' + getDays(): int | ||
' + getGroceryList(): GroceryList | ||
'} | ||
|
||
class Meal { | ||
- recipe: Recipe | ||
- adjustedNumberOfPeople: int | ||
+ Meal(recipe: Recipe, adjustedNumberOfPeople: int) | ||
+ getRecipe(): Recipe | ||
+ setRecipe(recipe: Recipe): void | ||
+ getAdjustedNumberOfPeople(): int | ||
+ getGroceryList(): GroceryList | ||
} | ||
|
||
'class GroceryList { | ||
' - items: List<GroceryItem> | ||
' + addItem(GroceryItem entry): void | ||
' + getItems(): List<GroceryItem> | ||
'} | ||
' | ||
'MealPlan <- GroceryList | ||
'MealPlan <- Meal | ||
'Meal <- GroceryList | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@startuml | ||
class Recipe { | ||
- name: String | ||
- groceryList: GroceryList | ||
- recipeSteps: List<RecipeStep> | ||
+ Recipe(name: String, groceryList: GroceryList, recipeSteps: List<RecipeStep>) | ||
+ Recipe(name: String, groceryList: GroceryList, recipeSteps: RecipeStep...) | ||
+ getName(): String | ||
+ getRecipeSteps(): List<RecipeStep> | ||
+ getGroceryList(): GroceryList | ||
+ getId(): String | ||
+ toString(): String | ||
+ equals(Object o): boolean | ||
+ hashCode(): int | ||
} | ||
|
||
class GroceryList { | ||
// fields and methods | ||
} | ||
|
||
class RecipeStep { | ||
// fields and methods | ||
} | ||
|
||
Recipe "1" --> "1" GroceryList | ||
Recipe "0..*" --> "1" RecipeStep | ||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
@startuml | ||
|
||
left to right direction | ||
|
||
class ChefkochRecipeFetcher { | ||
+getRecipe(url: String): Recipe | ||
-extractRecipeName(content: String): String | ||
-extractIngredients(content: String): GroceryList | ||
-extractRecipeSteps(content: String): List<RecipeStep> | ||
} | ||
|
||
interface WebsiteFetcher { | ||
+getWebsiteBody(urlString: String): String | ||
} | ||
|
||
class BufferedWebsiteFetcher { | ||
+getWebsiteBody(urlString: String): String | ||
} | ||
|
||
class Recipe { | ||
// fields and methods | ||
} | ||
|
||
class GroceryList { | ||
// fields and methods | ||
} | ||
|
||
class RecipeStep { | ||
// fields and methods | ||
} | ||
|
||
WebsiteFetcher <-- ChefkochRecipeFetcher | ||
WebsiteFetcher <|.. BufferedWebsiteFetcher | ||
Recipe <-- ChefkochRecipeFetcher | ||
GroceryList <-- ChefkochRecipeFetcher | ||
RecipeStep <-- ChefkochRecipeFetcher | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
@startuml | ||
|
||
left to right direction | ||
|
||
class ChefkochRecipeFetcher { | ||
+getRecipe(url: String): Recipe | ||
-extractRecipeName(content: String): String | ||
-extractIngredients(content: String): GroceryList | ||
-extractRecipeSteps(content: String): List<RecipeStep> | ||
} | ||
|
||
class WebsiteFetcher { | ||
+getWebsiteBody(urlString: String): String | ||
} | ||
|
||
class Recipe { | ||
// fields and methods | ||
} | ||
|
||
class GroceryList { | ||
// fields and methods | ||
} | ||
|
||
class RecipeStep { | ||
// fields and methods | ||
} | ||
|
||
WebsiteFetcher <-- ChefkochRecipeFetcher | ||
Recipe <-- ChefkochRecipeFetcher | ||
GroceryList <-- ChefkochRecipeFetcher | ||
RecipeStep <-- ChefkochRecipeFetcher | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
@startuml | ||
|
||
interface InputReader { | ||
+readLine(): String | ||
} | ||
|
||
interface OutputService { | ||
+info(msg: String): void | ||
+warning(msg: String): void | ||
+severe(msg: String): void | ||
+rawOut(msg: Object): void | ||
+rawErr(msg: Object): void | ||
} | ||
|
||
interface InputParser { | ||
+getInteger(lowerBound: Integer, upperBound: Integer, question: String): Integer | ||
+getDate(after: LocalDate, before: LocalDate, question: String): LocalDate | ||
+getString(validator: Function<String, String>, question: String): String | ||
} | ||
|
||
class DialogInputParser { | ||
-inputReader: InputReader | ||
-outputService: OutputService | ||
+DialogInputParser(inputReader: InputReader, outputService: OutputService) | ||
+getInputWithType(transformFunction: Function<String, T>, question: String): T | ||
} | ||
|
||
InputParser <|.. DialogInputParser | ||
DialogInputParser --> InputReader | ||
DialogInputParser --> OutputService | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
@startuml | ||
|
||
class Recipe { | ||
// fields and methods | ||
} | ||
|
||
class RecipeFileRepository { | ||
-recipesFolder: File | ||
+RecipeFileRepository(recipesFolder: File) | ||
+saveRecipe(recipe: Recipe): void | ||
+deleteRecipe(recipe: Recipe): boolean | ||
+getRecipes(): List<Recipe> | ||
+getRecipe(id: String): Recipe | ||
} | ||
|
||
interface RecipeRepository { | ||
+saveRecipe(recipe: Recipe): void | ||
+deleteRecipe(recipe: Recipe): boolean | ||
+getRecipes(): List<Recipe> | ||
+getRecipe(id: String): Recipe | ||
} | ||
|
||
RecipeFileRepository ..|> RecipeRepository | ||
RecipeRepository -> Recipe | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@startuml | ||
|
||
left to right direction | ||
|
||
package "Infrastructure" { | ||
class WebsiteFetcher { | ||
+ getWebsiteBody(urlString: String) | ||
} | ||
|
||
package "Application" { | ||
class ChefkochRecipeFetcher { | ||
+ getRecipe(url: String) | ||
- extractRecipeName(content: String) | ||
- extractIngredients(content: String) | ||
- extractRecipeSteps(content: String) | ||
} | ||
|
||
package "Domain" { | ||
} | ||
} | ||
} | ||
|
||
ChefkochRecipeFetcher -> WebsiteFetcher | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@startuml | ||
|
||
left to right direction | ||
|
||
package "Infrastructure" { | ||
class RecipeFileRepository { | ||
- recipesFolder: File | ||
+ RecipeFileRepository(recipesFolder: File) | ||
+ saveRecipe(recipe: Recipe) | ||
+ deleteRecipe(recipe: Recipe): boolean | ||
+ getRecipes(): List<Recipe> | ||
+ getRecipe(id: String): Recipe | ||
} | ||
|
||
package "Application" { | ||
class DialogService { | ||
- recipeRepository: RecipeRepository | ||
+ DialogService(recipeRepository: RecipeRepository) | ||
} | ||
|
||
package "Domain" { | ||
interface RecipeRepository { | ||
+ saveRecipe(recipe: Recipe) | ||
+ deleteRecipe(recipe: Recipe): boolean | ||
+ getRecipes(): List<Recipe> | ||
+ getRecipe(id: String): Recipe | ||
} | ||
} | ||
} | ||
} | ||
|
||
DialogService -> RecipeRepository | ||
RecipeRepository <|.. RecipeFileRepository | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
@startuml | ||
|
||
left to right direction | ||
|
||
package "Infrastructure" { | ||
class WebsiteFetcher { | ||
+ getWebsiteBody(urlString: String) | ||
} | ||
|
||
package "Application" { | ||
class ChefkochRecipeFetcher { | ||
+ getRecipe(url: String) | ||
- extractRecipeName(content: String) | ||
- extractIngredients(content: String) | ||
- extractRecipeSteps(content: String) | ||
} | ||
|
||
class DialogService { | ||
- recipeRepository: RecipeRepository | ||
+ DialogService(recipeRepository: RecipeRepository) | ||
} | ||
|
||
package "Domain" { | ||
} | ||
} | ||
} | ||
|
||
DialogService -> ChefkochRecipeFetcher | ||
ChefkochRecipeFetcher -> WebsiteFetcher | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
@startuml | ||
|
||
left to right direction | ||
|
||
package "Infrastructure" { | ||
class AutoChef { | ||
+ main(args: String[]) | ||
} | ||
|
||
class RecipeFileRepository { | ||
- recipesFolder: File | ||
+ RecipeFileRepository(recipesFolder: File) | ||
+ saveRecipe(recipe: Recipe) | ||
+ deleteRecipe(recipe: Recipe): boolean | ||
+ getRecipes(): List<Recipe> | ||
+ getRecipe(id: String): Recipe | ||
} | ||
|
||
package "Application" { | ||
class DialogService { | ||
- recipeRepository: RecipeRepository | ||
+ DialogService(recipeRepository: RecipeRepository) | ||
} | ||
|
||
package "Domain" { | ||
interface RecipeRepository { | ||
+ saveRecipe(recipe: Recipe) | ||
+ deleteRecipe(recipe: Recipe): boolean | ||
+ getRecipes(): List<Recipe> | ||
+ getRecipe(id: String): Recipe | ||
} | ||
} | ||
} | ||
} | ||
|
||
AutoChef -> DialogService | ||
AutoChef -> RecipeFileRepository | ||
DialogService -> RecipeRepository | ||
RecipeRepository <|.. RecipeFileRepository | ||
|
||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@startuml | ||
|
||
class MealPlanBuilder { | ||
- mealMap: Map<LocalDate, Meal> | ||
- startDate: LocalDate | ||
- endDate: LocalDate | ||
+ setStartDate(startDate: LocalDate): MealPlanBuilder | ||
+ setEndDate(endDate: LocalDate): MealPlanBuilder | ||
+ addMeal(date: LocalDate, meal: Meal): MealPlanBuilder | ||
+ build(): MealPlan | ||
} | ||
|
||
class MealPlan { | ||
- meals: List<Meal> | ||
- start: LocalDate | ||
- end: LocalDate | ||
+ getMeals(): List<Meal> | ||
+ getStart(): LocalDate | ||
+ getEnd(): LocalDate | ||
+ getDays(): int | ||
+ getGroceryList(): GroceryList | ||
+ toString(): String | ||
} | ||
|
||
MealPlanBuilder --> MealPlan | ||
|
||
@enduml |
Oops, something went wrong.