Skip to content

Commit

Permalink
#326 Diagrams of Documentation redrawn in plantUML
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Ruhroth committed Feb 1, 2025
1 parent b1e59ba commit d2615a0
Show file tree
Hide file tree
Showing 30 changed files with 269 additions and 30 deletions.
14 changes: 10 additions & 4 deletions src/docs/arc42/chapters/chap-05-BuildingBlocks.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,12 @@ Files::
=== Building Blocks - Level 2

==== _HSC Core_ (Whitebox)


image::ea/htmlSanityCheck/hsc-core.png["Whitebox", title="HSC Core (Whitebox)"]
[[img-hsc-core]]
.HSC Core (Whitebox)
[plantuml,hsc-core,svg]
....
include::../../plantuml/hsc-core.puml["Whitebox", title="HSC Core (Whitebox)"]
....

Rationale::
This structures follows a strictly functional decomposition:
Expand Down Expand Up @@ -147,7 +150,10 @@ It is based upon the extensible {xrefConceptCheckingAlgorithms}.
[[ResultsCollector]]
==== ResultsCollector (Whitebox)

image::ea/htmlSanityCheck/ResultsCollector.png["Whitebox", title="Results Collector (Whitebox)"]
[plantuml,ResultsCollector,svg]
....
include::../../plantuml/ResultsCollector.puml["Whitebox", title="Results Collector (Whitebox)"]
....

Rationale::
This structures follows the hierarchy of checks - namely managing results for:
Expand Down
7 changes: 6 additions & 1 deletion src/docs/arc42/chapters/chap-07-Deployment.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ include::_config.adoc[]

[[img-deployment]]
.Deploymentfootnote:[This diagram is outdated and needs replacement, e.g., with a PlantUML diagram.]
image::ea/htmlSanityCheck/hsc-deployment.png["Deployment"]

[plantuml,hsc-deployment,svg]
....
include::../../plantuml/hsc-deployment.puml["Deployment", title="Deployment"]
....


[options="header", cols="1,4"]
.Deployment
Expand Down
8 changes: 7 additions & 1 deletion src/docs/arc42/chapters/chap-08-checking-algorithms.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ include::{core-source-path}/htmlsanitycheck/check/Checker.java[tags=performCheck

ifndef::imagesdir[:imagesdir: ../../images]

image::ea/htmlSanityCheck/template-method.png["Template Method", title="Template-Method Overview"]
[[img-template-method]]
.Template-Method Overview
[plantuml,template-method,svg]
....
include::../../plantuml/template-method.puml["Template Method", title="Template-Method Overview"]
....


[options="header", cols="1,4"]
.Template Method
Expand Down
7 changes: 6 additions & 1 deletion src/docs/arc42/chapters/chap-08-checking-domain.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ include::_config.adoc[]
:filename: arc42/chapters/chap-08-checking-domain.adoc
include::../_feedback.adoc[]

image::ea/htmlSanityCheck/HTML_Checking_Domain.png["HTML Checking Domain Model",title="HTML Checking Domain Model"]
[[img-HTML_Checking_Domain]]
.HTML Checking Domain Model
[plantuml,HTML_Checking_Domain,svg]
....
include::../../plantuml/HTML_Checking_Domain.puml["HTML Checking Domain Model", title="HTML Checking Domain Model"]
....

[options="header",cols="1,4"]
.Domain Model
Expand Down
11 changes: 0 additions & 11 deletions src/docs/ea/readme.ad

This file was deleted.

Binary file removed src/docs/images/Building-Block-Hierarchy.png
Binary file not shown.
Binary file removed src/docs/images/Reporter Whitebox.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed src/docs/images/ea/htmlSanityCheck/Overview.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed src/docs/images/ea/htmlSanityCheck/hsc-core.png
Binary file not shown.
Binary file not shown.
Binary file removed src/docs/images/ea/htmlSanityCheck/hsc-whitebox.png
Binary file not shown.
Binary file removed src/docs/images/ea/htmlSanityCheck/local_images.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 0 additions & 12 deletions src/docs/images/ea/readme.ad

This file was deleted.

76 changes: 76 additions & 0 deletions src/docs/plantuml/HTML_Checking_Domain.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
@startuml
skinparam linetype ortho
allowmixing

frame "cmp HTML_Checking_Domain" {

class "(external) Hyperlink" as hyperlink #yellow
class "(internal) Cross Reference" as crossreference #yellow
class "Link" as link #yellow
class "link Target" as linktarget #yellow
class "URI" as uri #yellow
class "Resource" as resource #yellow
class "File" as file #yellow
class "Stylesheet" as stylesheet #yellow
class "Image File" as imagefile #yellow

class "HTML page" as htmlpage #lightblue
class "Checker" as checker #lightblue
class "HTMLElment" as htmlelement #lightblue
class "Finding" as finding #lightblue {
-item : String
-suggestion : String
}
class "Single Check Result" as singecheckresult #lightblue {
-whatIsChecked:String
-sourceItem: String
-targetItem:String
-nrOfItemsChecked:int
}

class "Single Page Result" as singlepasgeresult #lightblue {
-pageTitle:String
-pageName:String
}
class "RunResult" as runresult #lightblue {
-imageDirs:FileCollection
}

link <|-down- hyperlink
link <|-down- crossreference
linktarget <|-- resource
resource <|-- file
resource <|-- stylesheet
resource <|-- imagefile

uri -right[dashed]-> resource : describes
checker -left[dashed]-> linktarget : check target
checker -down[dashed]-> link : check link
checker -down[dashed]-> htmlpage : check
checker -down[dashed]-> finding : <<instantiate>> detects
checker -right[dashed]-> singecheckresult : <<instantiate>>

finding -[dashed]-> htmlelement : responsible
singecheckresult -[dashed]-> htmlpage : refers to

link "0..*" <-down-> "1" linktarget : refences

htmlpage "0..*" o-- "0..*" link :contains

singecheckresult "1" o-- "0..*" finding
singecheckresult --o singlepasgeresult
runresult o-- singlepasgeresult

rectangle "legende" {
rectangle "Implementation Class" #lightblue
rectangle "Domain Class" #yellow
}
}






@enduml

45 changes: 45 additions & 0 deletions src/docs/plantuml/ResultsCollector.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
@startuml
'skinparam linetype ortho
allowmixing

frame "cmp ResultsCollector" {

component ResultsCollector {

portin "Findings" as findingsport
portout "Results" as resultsport

class "per-run results" as perrunResults
class "Single Page Results" as singlepageresults {
pageName:String
pageTitle:String
metaInfo:PageMetaInfo
}
class "Single Check Results" as singlecheckresults {
whatIsChecked:String
sourceItem:String
targetItem:String
nrOfItemsChecked:int
}
class Finding {
item:String
suggestion:String
}

findingsport -[dashed]-> singlecheckresults
perrunResults -[dashed]-> resultsport
perrunResults o-- "1..*" singlepageresults
perrunResults o-- "1" singlecheckresults : unused images
singlepageresults o-- singlecheckresults
singlecheckresults "1" o-right- "0..*" Finding
}

component Reporter

Reporter -[dashed]-> resultsport

}



@enduml
45 changes: 45 additions & 0 deletions src/docs/plantuml/hsc-core.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
@startuml
skinparam linetype ortho

frame "cmp hsc-core" {

component "hsc core" as hsc {
portout "local file system" as filesystem
portout "external resource" as extresource #pink
portin AllChecksRunner
portin Result
() Findings

component "All Checks Runner" as allChecksRunnerCmp
component "Reporter" as reporter
component "Html Parser" as htmlparser <<libary>>
component "Checker" as checker
component "Suggester" as suggester
component "Results Collector" as collector

AllChecksRunner -[dashed]-> allChecksRunnerCmp
allChecksRunnerCmp -[dashed]-> htmlparser : parse
allChecksRunnerCmp -[dashed]-> checker : create / execute
allChecksRunnerCmp -[dashed]-> reporter : report findings
htmlparser -[dashed]-> filesystem
checker -[dashed]-> filesystem
checker -[dashed]-> extresource
checker -right[dashed]-> suggester
checker -[dashed]-> Findings : add findings
reporter -[dashed]-> filesystem
reporter -[dashed]-> collector
Result -[dashed]-> collector
Findings - collector




}

rectangle legend {
rectangle planned #pink
rectangle implemented #lightgrey
}

}
@enduml
47 changes: 47 additions & 0 deletions src/docs/plantuml/hsc-deployment.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
@startuml
'skinparam linetype ortho
allowmixing

frame "cmp hsc-deployment" {

node "hsc development" {
artifact "hsc depoyment spec" as spec <<deployment spec>> #lightgreen
component "Hml Sanity Check" as hsccheck #lightgreen
artifact jsoup #lightblue
artifact Groovy #lightblue
artifact JDK #lightblue
artifact Gradle #lightblue


JDK -- Groovy
JDK -- Gradle
hsccheck -[dashed]-> jsoup
}

node "global artifact repository (maven central)" {
artifact "hsc-plugin (fat-jar)" as jar <<binary>> #lightgreen
}

node "hsc usres computer" {
artifact "build-configuration (gradle, pom)" as build #lightblue
artifact "some documentation" as doc #lightblue
artifact "java runtime" #lightblue

build -[dashed]-> doc : build and check

}

build -up[dashed]-> jar : <<referenced-binary-version>>\n internet/https
spec -[dashed]-> jar : <<describe>>
jar -[dashed]-> hsccheck : <<compiled-from>>

rectangle legende {
rectangle "our stuff" #lightgreen
rectangle "other stuff" #lightblue
}



}

@enduml
27 changes: 27 additions & 0 deletions src/docs/plantuml/template-method.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@startuml
'skinparam linetype ortho

frame "cmp template-method" {
class Checker <<abstract>> {
+check():SingleCheckResults
+perfromCheck():void
}
class ImageFileExistsChecker {
-baseDirectory:String
+check():SingleCheckResults
}
class InternalLinksChecker{
+check():SingleCheckResults
}
class DuplicateIdChecker {
+check():SingleCheckResults
}

note right of Checker : performCheck is the template method\n 1. initialize CheckingResults\n 2. check() deferred to the concrete subclass

Checker <|-- ImageFileExistsChecker
Checker <|-- InternalLinksChecker
Checker <|-- DuplicateIdChecker
}

@enduml

0 comments on commit d2615a0

Please sign in to comment.