diff --git a/com.io7m.laurel.documentation/pom.xml b/com.io7m.laurel.documentation/pom.xml new file mode 100644 index 0000000..c506887 --- /dev/null +++ b/com.io7m.laurel.documentation/pom.xml @@ -0,0 +1,272 @@ + + + + + 4.0.0 + + com.io7m.laurel + com.io7m.laurel + 1.0.0-SNAPSHOT + + com.io7m.laurel.documentation + + jar + com.io7m.laurel.documentation + Image caption management (Documentation) + https://www.io7m.com/software/laurel/ + + + true + + + + + ${project.groupId} + com.io7m.laurel.filemodel + ${project.version} + + + + com.io7m.primogenitor + com.io7m.primogenitor.support + + + + org.osgi + org.osgi.annotation.bundle + provided + + + org.osgi + org.osgi.annotation.versioning + provided + + + + + + + src/main/resources + true + + + + + + + org.apache.maven.plugins + maven-resources-plugin + + + copy-documentation-resources + + copy-resources + + generate-resources + + ${project.build.directory}/documentation/ + + + src/main/resources/com/io7m/laurel/documentation/ + true + + + + + + + copy-documentation-resources-epub + + copy-resources + + generate-resources + + ${project.build.directory}/epub/ + + + src/main/resources/com/io7m/laurel/documentation/ + true + + + + + + + copy-generated-epub + site + + copy-resources + + + ${project.parent.build.directory}/minisite/documentation/ + + + ${project.build.directory}/epub/ + + documentation.epub + + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + + unpack-sources + package + + unpack-dependencies + + + module-info.java + ${project.groupId} + sources + false + ${project.build.directory}/javadoc-sources + + + + + make-classpath + package + + build-classpath + + + ${project.build.directory}/javadoc-classpath + + + + + + + org.codehaus.mojo + exec-maven-plugin + + + + javadoc + + java + + package + + com.io7m.primogenitor.support.TrivialJavadoc + + ${project.build.directory}/javadoc-sources + ${project.build.directory}/javadoc-classpath + ${project.build.directory}/documentation/apidocs + ${project.build.directory}/javadoc-log.txt + ${project.build.directory}/javadoc-options + + + + + + + + + com.io7m.xstructural + com.io7m.xstructural.maven_plugin + ${com.io7m.xstructural.version} + + + xhtml-single + package + + xhtml-single + + + ${project.build.directory}/documentation/brand.xml + ${project.build.directory}/documentation/main.xml + ${project.build.directory}/documentation + + + + xhtml-multi + package + + xhtml-multi + + + ${project.build.directory}/documentation/brand.xml + ${project.build.directory}/documentation/main.xml + ${project.build.directory}/documentation + + + + epub + package + + epub + + + ${project.build.directory}/documentation/brand.xml + ${project.build.directory}/documentation/main.xml + ${project.build.directory}/epub + documentation.epub + + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + src/main/assembly/documentation.xml + + + + + make-assembly + package + + single + + + false + + + + + + + + + org.codehaus.mojo + truezip-maven-plugin + false + + + copy-site-documentation + + copy + + site + + true + + + ${project.build.directory}/${project.name}-${project.version}.zip/${project.name}-${project.version}/ + + ${project.parent.build.directory}/minisite/documentation/ + + + + + + + + + diff --git a/com.io7m.laurel.documentation/src/main/assembly/documentation.xml b/com.io7m.laurel.documentation/src/main/assembly/documentation.xml new file mode 100644 index 0000000..0250d96 --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/assembly/documentation.xml @@ -0,0 +1,16 @@ + + documentation + ${project.name}-${project.version} + + zip + + + + ${project.build.directory}/documentation + / + + + diff --git a/com.io7m.laurel.documentation/src/main/java/com/io7m/laurel/documentation/Documentation.java b/com.io7m.laurel.documentation/src/main/java/com/io7m/laurel/documentation/Documentation.java new file mode 100644 index 0000000..20b1d7d --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/java/com/io7m/laurel/documentation/Documentation.java @@ -0,0 +1,29 @@ +/* + * Copyright © 2024 Mark Raynsford https://www.io7m.com + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR + * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +package com.io7m.laurel.documentation; + +/** + * Documentation marker class. + */ + +public final class Documentation +{ + private Documentation() + { + + } +} diff --git a/com.io7m.laurel.documentation/src/main/java/com/io7m/laurel/documentation/package-info.java b/com.io7m.laurel.documentation/src/main/java/com/io7m/laurel/documentation/package-info.java new file mode 100644 index 0000000..8f79e0e --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/java/com/io7m/laurel/documentation/package-info.java @@ -0,0 +1,26 @@ +/* + * Copyright © 2024 Mark Raynsford https://www.io7m.com + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR + * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/** + * Image caption management (Documentation) + */ + +@Export +@Version("1.0.0") +package com.io7m.laurel.documentation; + +import org.osgi.annotation.bundle.Export; +import org.osgi.annotation.versioning.Version; diff --git a/com.io7m.laurel.documentation/src/main/java/module-info.java b/com.io7m.laurel.documentation/src/main/java/module-info.java new file mode 100644 index 0000000..f4f2bed --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/java/module-info.java @@ -0,0 +1,27 @@ +/* + * Copyright © 2024 Mark Raynsford https://www.io7m.com + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR + * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/** + * Image caption management (Documentation) + */ + +module com.io7m.laurel.documentation +{ + requires static org.osgi.annotation.bundle; + requires static org.osgi.annotation.versioning; + + exports com.io7m.laurel.documentation; +} diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160045_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160045_1100x800_scrot.png new file mode 100644 index 0000000..c193e71 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160045_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160235_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160235_1100x800_scrot.png new file mode 100644 index 0000000..c662c2b Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160235_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160243_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160243_1100x800_scrot.png new file mode 100644 index 0000000..ce7bcd7 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160243_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160339_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160339_1100x800_scrot.png new file mode 100644 index 0000000..44fa28c Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160339_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160443_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160443_1100x800_scrot.png new file mode 100644 index 0000000..f56b509 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160443_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160507_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160507_1100x800_scrot.png new file mode 100644 index 0000000..0f4d802 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160507_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160527_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160527_1100x800_scrot.png new file mode 100644 index 0000000..ebc3b4b Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160527_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160544_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160544_1100x800_scrot.png new file mode 100644 index 0000000..9191802 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160544_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160558_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160558_1100x800_scrot.png new file mode 100644 index 0000000..6e24908 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160558_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160619_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160619_1100x800_scrot.png new file mode 100644 index 0000000..22109c7 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160619_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160628_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160628_1100x800_scrot.png new file mode 100644 index 0000000..9c210df Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160628_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160643_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160643_1100x800_scrot.png new file mode 100644 index 0000000..f3c3f91 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160643_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160655_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160655_1100x800_scrot.png new file mode 100644 index 0000000..9174f82 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160655_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160711_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160711_1100x800_scrot.png new file mode 100644 index 0000000..dde2c4e Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160711_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160722_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160722_1100x800_scrot.png new file mode 100644 index 0000000..3cc8dd1 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160722_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160735_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160735_1100x800_scrot.png new file mode 100644 index 0000000..e678447 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160735_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160753_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160753_1100x800_scrot.png new file mode 100644 index 0000000..543fb12 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160753_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160808_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160808_1100x800_scrot.png new file mode 100644 index 0000000..911f5e8 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160808_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160824_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160824_1100x800_scrot.png new file mode 100644 index 0000000..54b5587 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160824_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160835_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160835_1100x800_scrot.png new file mode 100644 index 0000000..3522e90 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160835_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160851_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160851_1100x800_scrot.png new file mode 100644 index 0000000..b8810f1 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160851_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160908_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160908_1100x800_scrot.png new file mode 100644 index 0000000..64259a8 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160908_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160917_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160917_1100x800_scrot.png new file mode 100644 index 0000000..63566b1 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160917_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160936_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160936_1100x800_scrot.png new file mode 100644 index 0000000..c3605bb Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160936_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160946_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160946_1100x800_scrot.png new file mode 100644 index 0000000..62266ef Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-160946_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161016_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161016_1100x800_scrot.png new file mode 100644 index 0000000..1867883 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161016_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161041_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161041_1100x800_scrot.png new file mode 100644 index 0000000..63790e0 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161041_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161054_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161054_1100x800_scrot.png new file mode 100644 index 0000000..9615040 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161054_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161116_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161116_1100x800_scrot.png new file mode 100644 index 0000000..f0ddbdb Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161116_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161219_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161219_1100x800_scrot.png new file mode 100644 index 0000000..1d7281e Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161219_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161257_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161257_1100x800_scrot.png new file mode 100644 index 0000000..7226640 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161257_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161405_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161405_1100x800_scrot.png new file mode 100644 index 0000000..2b03bb1 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161405_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161422_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161422_1100x800_scrot.png new file mode 100644 index 0000000..bf41e12 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161422_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161443_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161443_1100x800_scrot.png new file mode 100644 index 0000000..c5898b9 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-161443_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-170158_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-170158_1100x800_scrot.png new file mode 100644 index 0000000..de5f981 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-170158_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-185417_1100x800_scrot.png b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-185417_1100x800_scrot.png new file mode 100644 index 0000000..8d58478 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/2024-09-28-185417_1100x800_scrot.png differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/bookBanner.jpg b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/bookBanner.jpg new file mode 100644 index 0000000..cca4ef7 Binary files /dev/null and b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/bookBanner.jpg differ diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/brand.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/brand.xml new file mode 100644 index 0000000..5acc957 --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/brand.xml @@ -0,0 +1,12 @@ + + +
+
+ io7m | + single-page | + multi-page | + epub | + Laurel User Manual ${project.version} +
+
diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/colophon.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/colophon.xml new file mode 100644 index 0000000..b77ae02 --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/colophon.xml @@ -0,0 +1,25 @@ + + +
+ + + Copyright © 2024 Mark Raynsford <code@io7m.com> https://www.io7m.com. + + + + This book is placed into the public domain for free use by anyone for any purpose. It may be freely used, modified, + and distributed. + + + + In jurisdictions that do not recognise the public domain this book may be freely used, modified, and distributed + without restriction. + + + + This book comes with absolutely no warranty. + + +
diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/document.css b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/document.css new file mode 100644 index 0000000..e27f060 --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/document.css @@ -0,0 +1,79 @@ +/* + * Copyright © 2024 Mark Raynsford https://www.io7m.com + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR + * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +.brandingContainer +{ + margin: 1em; + margin-left: 0em; +} + +.branding +{ + font-family: monospace; + font-size: 80%; +} + +.button, +.command, +.constant, +.element, +.expression, +.file, +.menu, +.package, +.parameter, +.tab, +.window +{ + font-family: monospace; + font-size: 90%; +} + +.term +{ + font-style: italic; +} + +.genericTable +{ + border: 1px solid #dddddd; + width: 100%; + border-collapse: collapse; +} +.genericTable th +{ + border: 1px solid #dddddd; + text-align: left; + font-size: var(--stFontSize); + padding: 0.5em; +} +.genericTable td +{ + border: 1px solid #dddddd; + font-size: var(--stFontSize); + padding: 0.5em; +} +.genericTable td:nth-child(1) +{ + width: 12em; +} + +.screenImage +{ + max-width: 95%; + max-height: 95%; + height: auto; +} \ No newline at end of file diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-captions.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-captions.xml new file mode 100644 index 0000000..835da07 --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-captions.xml @@ -0,0 +1,9 @@ + + +
+ + Captions... + +
\ No newline at end of file diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-categories.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-categories.xml new file mode 100644 index 0000000..ad32359 --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-categories.xml @@ -0,0 +1,18 @@ + + +
+ + + Categories... + + + + + + Required... + + + +
diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-filemodel.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-filemodel.xml new file mode 100644 index 0000000..d90b37f --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-filemodel.xml @@ -0,0 +1,9 @@ + + +
+ + File model... + +
diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-history.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-history.xml new file mode 100644 index 0000000..7a882b1 --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-history.xml @@ -0,0 +1,9 @@ + + +
+ + History... + +
diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-images.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-images.xml new file mode 100644 index 0000000..5190b96 --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/i-images.xml @@ -0,0 +1,9 @@ + + +
+ + Images... + +
diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/implementation.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/implementation.xml new file mode 100644 index 0000000..9a5cafc --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/implementation.xml @@ -0,0 +1,12 @@ + + +
+ + + + + +
diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/install.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/install.xml new file mode 100644 index 0000000..82c9f53 --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/install.xml @@ -0,0 +1,12 @@ + + +
+ + + + Installation… + + + +
diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/license.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/license.xml new file mode 100644 index 0000000..cba87c4 --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/license.xml @@ -0,0 +1,25 @@ + + +
+ + + https://www.io7m.com + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +]]> + + +
diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/main.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/main.xml new file mode 100644 index 0000000..bedaf80 --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/main.xml @@ -0,0 +1,29 @@ + + + + + + Mark Raynsford + 2024-09-28T14:52:43+00:00 + User manual for the Laurel package. + 980294e7-2da9-4911-95d7-a830aa4a82bb + en + Public Domain + Laurel User Manual + + bookBanner.jpg + brand.xml + brand.xml + + + + + + + + + + diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/overview.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/overview.xml new file mode 100644 index 0000000..296982e --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/overview.xml @@ -0,0 +1,36 @@ + + +
+ + + + The laurel application attempts to provide tools to assist with + image captioning + within the context of + machine learning. + + + In particular, the application is geared towards the management of smaller datasets (in the range of thousands of + images) for use in techniques such as + + LORA + + training. + + + + + + The laurel application provides the following features: + + + + + The application is comprehensively documented; you are currently reading this documentation! + + + + + +
diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/u-categories.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/u-categories.xml new file mode 100644 index 0000000..46eebb9 --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/u-categories.xml @@ -0,0 +1,85 @@ + + +
+ + + + The Categories tab allows for grouping + captions + into + categories. + + + + + The categories tab. + + + + + + + Click the Add Category button to create a new category. + + + + The Add Category button. + + + + + The category creation field. + + + + + + + When a category is selected, the captions that are not assigned to that category will appear in the list of + unassigned captions. Conversely, the captions that are assigned to the category will + appear in the list of assigned captions. In a similar manner as for + image caption assignment, captions can be assigned and + unassigned to/from a category using the arrow buttons. + + + + The unassigned captions for the selected category. + + + + + The assigned captions for the selected category. + + + + + + + Categories can be marked as required using + the buttons above the category list. When a category is required, all images + must have at least one caption from that category assigned to pass + validation checks. + + + + Setting a category as required. + + + + + A required category. + + + + +
diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/u-fileview.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/u-fileview.xml new file mode 100644 index 0000000..e47bf8b --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/u-fileview.xml @@ -0,0 +1,37 @@ + + +
+ + + The application opens to an empty file view. + + + + + The empty file view. + + + + + Via the File menu, it's possible to create a new dataset, or open an existing one. + + + + + Creating a new dataset. + + + + + With a dataset loaded, the file view shows a series of tabs. + + + + + File view tabs. + + + +
diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/u-history.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/u-history.xml new file mode 100644 index 0000000..a91a349 --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/u-history.xml @@ -0,0 +1,36 @@ + + +
+ + + + The History tab displays the undo and + redo stack for the currently loaded dataset. + + + + + History tab. + + + + + + + The history can be deleted using the Delete History button. Note that this operation + cannot be undone, and requires confirmation. It is recommended that the history be deleted before datasets are + distributed. + + + + + History deletion. + + + + +
diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/u-images.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/u-images.xml new file mode 100644 index 0000000..a464cc7 --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/u-images.xml @@ -0,0 +1,156 @@ + + +
+ + + + The Images tab allows for loading + images + and assigning + captions + to images. + + + + + + Click the Add Image button to load an image from the filesystem. + + + + + The Add Image button. + + + + + + Selecting an image. + + + + + Once an image is loaded, it appears in the image list. + + + + + Selected image. + + + + + Clicking the image opens an image preview window that contains a larger copy of the + image. This window will constantly update to whatever is the currently selected image. The intended use case for + the image preview window is to be left open on a separate screen so that a large version + of the image is always visible when manually captioning images. + + + + + Selected image. + + + + + + + Click the Create Caption button to create a new caption. + + + + + The Create Caption button. + + + + + + The Create Caption dialog. + + + + + When a caption is first created, it is visible in the set of + unassigned + captions for the selected image. Naturally, the set of unassigned captions is different + for each image. The Assign Caption button can be used to assign one or more selected + captions to the currently selected image. + + + + + The unassigned captions. + + + + + + The assigned captions. + + + + + + + Typically, in fine-tuning methods such as + + LORAs, there will be one or more captions that should be globally applied to all images, and + should also, when the captions are exported, always appear at the beginning of the list of captions for each + image. + + + + Click the Configure Global Prefix Captions button to configure + global prefix captions. + + + + + The configure global prefix captions button. + + + + + The Configure Global Prefix Captions window allows for creating, deleting, modifying, + and reordering captions. + + + + + The configure global prefix captions window. + + + + + + The configure global prefix captions window (with captions listed). + + + + +
diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/u-metadata.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/u-metadata.xml new file mode 100644 index 0000000..613c3f6 --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/u-metadata.xml @@ -0,0 +1,40 @@ + + +
+ + + The Metadata tab allows for embedding textual metadata into the dataset. This can be + used to hold author information, license information, and etc. + + + + + Metadata section. + + + + + Metadata values can be added using the Add Metadata button. Existing metadata values can + be modified with the Modify Metadata button, and removed with the + Remove Metadata + button. + + + + + Metadata creation. + + + + + + Metadata listing. + + + +
diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/u-overview.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/u-overview.xml new file mode 100644 index 0000000..70b384d --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/u-overview.xml @@ -0,0 +1,40 @@ + + +
+ + + + This section of the documentation describes how to use the application without spending + any time explaining the underlying model the application works with, and without describing how exactly the + application works. The + theory of operation + section of the manual describes the inner workings of the application in a more formal manner. + + + + + + The vast majority of operations in the application can be undone. When an operation is + performed, it can typically be reverted by selecting + Undo + from the Edit menu. Any operation that has been undone can be performed again by + selecting + Redo + from the Edit menu. + + + The application is slightly atypical in that there is no "save" functionality. Instead, every operation performed + in the application that changes the state of the dataset is persisted into the dataset itself. This, effectively, + provides an unbounded undo stack that survives application restarts. + + + The current state of the undo/redo stack can be viewed in the + History + tab. Details of the undo implementation are described in the + theory of operation. + + + +
diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/u-validation.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/u-validation.xml new file mode 100644 index 0000000..3b291c4 --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/u-validation.xml @@ -0,0 +1,41 @@ + + +
+ + + The Validation tab allows for running validation checks on the dataset. Validation + is executed using the Validate button. + + + + + Validation section. + + + + + If validation suceeds, a success message is displayed. + + + + + Validation succeeded. + + + + + If validation fails, the reasons for the failures are displayed. + + + + + Validation failed. + + + +
diff --git a/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/usage.xml b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/usage.xml new file mode 100644 index 0000000..58acd57 --- /dev/null +++ b/com.io7m.laurel.documentation/src/main/resources/com/io7m/laurel/documentation/usage.xml @@ -0,0 +1,13 @@ + + +
+ + + + + + + +
diff --git a/com.io7m.laurel.gui/src/main/java/com/io7m/laurel/gui/internal/LValidationCell.java b/com.io7m.laurel.gui/src/main/java/com/io7m/laurel/gui/internal/LValidationCell.java index e0399a1..91d9116 100644 --- a/com.io7m.laurel.gui/src/main/java/com/io7m/laurel/gui/internal/LValidationCell.java +++ b/com.io7m.laurel.gui/src/main/java/com/io7m/laurel/gui/internal/LValidationCell.java @@ -20,6 +20,7 @@ import com.io7m.laurel.filemodel.LValidationProblemType; import com.io7m.repetoir.core.RPServiceDirectoryType; import javafx.fxml.FXMLLoader; +import javafx.geometry.Insets; import javafx.scene.Parent; import javafx.scene.control.ContentDisplay; import javafx.scene.control.ListCell; @@ -61,6 +62,8 @@ public LValidationCell( }); this.root = loader.load(); this.controller = loader.getController(); + + this.setPadding(Insets.EMPTY); } catch (final IOException e) { throw new IllegalStateException(e); } diff --git a/com.io7m.laurel.gui/src/main/java/com/io7m/laurel/gui/internal/LValidationCellController.java b/com.io7m.laurel.gui/src/main/java/com/io7m/laurel/gui/internal/LValidationCellController.java index 196535f..f061ef7 100644 --- a/com.io7m.laurel.gui/src/main/java/com/io7m/laurel/gui/internal/LValidationCellController.java +++ b/com.io7m.laurel.gui/src/main/java/com/io7m/laurel/gui/internal/LValidationCellController.java @@ -18,6 +18,7 @@ package com.io7m.laurel.gui.internal; import com.io7m.laurel.filemodel.LValidationProblemType; +import com.io7m.laurel.filemodel.LValidationProblemType.ImageMissingRequiredCaption; import javafx.fxml.FXML; import javafx.scene.control.Button; import javafx.scene.control.TextArea; @@ -31,7 +32,6 @@ public final class LValidationCellController implements LViewType { - @FXML private Button gotoButton; @FXML private TextArea errorText; /** @@ -49,7 +49,7 @@ public LValidationCellController() public void unsetItem() { - + this.errorText.setText(""); } /** @@ -61,7 +61,17 @@ public void unsetItem() public void setItem( final LValidationProblemType item) { + switch (item) { + case final ImageMissingRequiredCaption missing -> { + this.onMissingRequiredCaption(missing); + } + } + } + private void onMissingRequiredCaption( + final ImageMissingRequiredCaption missing) + { + this.errorText.setText(missing.message()); } @Override diff --git a/com.io7m.laurel.gui/src/main/resources/com/io7m/laurel/gui/internal/main.css b/com.io7m.laurel.gui/src/main/resources/com/io7m/laurel/gui/internal/main.css index 3dc04d0..a9bf943 100644 --- a/com.io7m.laurel.gui/src/main/resources/com/io7m/laurel/gui/internal/main.css +++ b/com.io7m.laurel.gui/src/main/resources/com/io7m/laurel/gui/internal/main.css @@ -247,3 +247,23 @@ -fx-pref-height: 32px; -fx-min-height: 32px; } + +.validationList +{ + -fx-background-color: #889c75ff; +} +.validationList .list-cell +{ + -fx-background-color: #889c75ff; +} + +.text-input, .text-input.content +{ + -fx-text-fill: black; + -fx-background-color: #889c75ff; +} + +.placeholder .label +{ + -fx-text-fill: black; +} diff --git a/com.io7m.laurel.gui/src/main/resources/com/io7m/laurel/gui/internal/validation.fxml b/com.io7m.laurel.gui/src/main/resources/com/io7m/laurel/gui/internal/validation.fxml index b1192d8..7791b53 100644 --- a/com.io7m.laurel.gui/src/main/resources/com/io7m/laurel/gui/internal/validation.fxml +++ b/com.io7m.laurel.gui/src/main/resources/com/io7m/laurel/gui/internal/validation.fxml @@ -24,9 +24,7 @@ - - - + @@ -54,7 +52,7 @@ - + diff --git a/com.io7m.laurel.gui/src/main/resources/com/io7m/laurel/gui/internal/validationCell.fxml b/com.io7m.laurel.gui/src/main/resources/com/io7m/laurel/gui/internal/validationCell.fxml index ba951e0..7440a3d 100644 --- a/com.io7m.laurel.gui/src/main/resources/com/io7m/laurel/gui/internal/validationCell.fxml +++ b/com.io7m.laurel.gui/src/main/resources/com/io7m/laurel/gui/internal/validationCell.fxml @@ -1,35 +1,16 @@ - + - - - - - - + - - - - - - - - + - - - + diff --git a/com.io7m.laurel.tests/src/main/java/com/io7m/laurel/tests/LCaptionNameTest.java b/com.io7m.laurel.tests/src/main/java/com/io7m/laurel/tests/LCaptionNameTest.java new file mode 100644 index 0000000..b5394eb --- /dev/null +++ b/com.io7m.laurel.tests/src/main/java/com/io7m/laurel/tests/LCaptionNameTest.java @@ -0,0 +1,68 @@ +/* + * Copyright © 2024 Mark Raynsford https://www.io7m.com + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR + * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + + +package com.io7m.laurel.tests; + +import com.io7m.laurel.model.LCaptionName; +import org.junit.jupiter.api.DynamicTest; +import org.junit.jupiter.api.TestFactory; + +import java.util.stream.Stream; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; + +public final class LCaptionNameTest +{ + @TestFactory + public Stream testNamesValid() + { + return Stream.of( + "a", + "a'b", + "a_b", + "a-b" + ).map(LCaptionNameTest::validTestOf); + } + + @TestFactory + public Stream testNamesInvalid() + { + return Stream.of( + "", + "'z" + ).map(LCaptionNameTest::invalidTestOf); + } + + private static DynamicTest validTestOf( + final String text) + { + return DynamicTest.dynamicTest("testValid_%s".formatted(text), () -> { + assertEquals(text, new LCaptionName(text).text()); + }); + } + + private static DynamicTest invalidTestOf( + final String text) + { + return DynamicTest.dynamicTest("testInvalid_%s".formatted(text), () -> { + assertThrows(IllegalArgumentException.class, () -> { + new LCaptionName(text); + }); + }); + } +} diff --git a/pom.xml b/pom.xml index 7dccc93..695de5f 100644 --- a/pom.xml +++ b/pom.xml @@ -21,6 +21,7 @@ https://www.io7m.com/software/laurel + com.io7m.laurel.documentation com.io7m.laurel.filemodel com.io7m.laurel.gui.main com.io7m.laurel.gui @@ -42,8 +43,9 @@ 4.0.0 2.1.0 1.1.0 + 8.2.0 1.1.0 - 1.8.0 + 1.9.0 1.0.0 @@ -351,7 +353,7 @@ com.io7m.primogenitor com.io7m.primogenitor.support - 8.2.0 + ${com.io7m.primogenitor.version} net.jqwik