Skip to content

Commit

Permalink
Added validation class diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
benfortuna committed Jul 4, 2024
1 parent 75c8394 commit fcafd3e
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DIAGRAMS=docker run -v "${PWD}:/work" figurate/diagrams python

MERMAIDJS=docker run -v "${PWD}:/data" minlag/mermaid-cli
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
SHELL:=/bin/bash
include .env

.PHONY: all diagram images

all: images

diagram:
$(DIAGRAMS) user-notify.py

images:
$(MERMAIDJS) -i docs/images/validation.mmd
23 changes: 17 additions & 6 deletions docs/images/validation.mmd
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
---
title: iCal4j Validation
---
classDiagram
Validator~T~: ValidationResult validate(T target)
direction RL

class Validator~T~
<<Interface>> Validator~T~
Validator~T~: validate(T target) ValidationResult

class AbstractValidator~T~
<<Abstract>> AbstractValidator~T~
AbstractValidator~T~: List~AbstractValidationRuleSet~? super T~~ ruleSets

PropertyValidator~T extends Property~: .
class PropertyValidator~T extends Property~

ComponentValidator~T extends Component~: .
class ComponentValidator~T extends Component~

ValidationResult: Set~ValidationEntry~ entries

Expand All @@ -17,11 +26,13 @@ classDiagram
ValidationRule~T~: String message
ValidationRule~T~: Predicate~T~ predicate

class AbstractValidationRuleSet~T~
<<Abstract>> AbstractValidationRuleSet~T~
AbstractValidationRuleSet~T~: Set~ValidationRule~? super T~~ rules

PropertyRuleSet~T extends Property~: .
PropertyContainerRuleSet~T extends PropertyContainer~: .
ComponentContainerRuleSet~ComponentContainer~: .
class PropertyRuleSet~T extends Property~
class PropertyContainerRuleSet~T extends PropertyContainer~
class ComponentContainerRuleSet~ComponentContainer~

Validator~T~ <|-- AbstractValidator~T~: Implements

Expand Down
Loading

0 comments on commit fcafd3e

Please sign in to comment.