diff --git a/.github/workflows/publish-docs.yaml b/.github/workflows/publish-docs.yaml
new file mode 100644
index 0000000..777a706
--- /dev/null
+++ b/.github/workflows/publish-docs.yaml
@@ -0,0 +1,52 @@
+on:
+ push:
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write
+ steps:
+ # Checkout
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ # Cache
+ - name: Cache Local Maven Repository
+ uses: actions/cache@v4
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ # Setup java
+ - name: Setup Java
+ uses: actions/setup-java@v4
+ with:
+ java-version: 11
+ distribution: 'adopt'
+ # Used for docs output
+ - name: Extract branch name
+ shell: bash
+ run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
+ id: extract_branch
+ # Make dirs
+ - name: Make dirs
+ run: mkdir -p docs/${{steps.extract_branch.outputs.branch}}/
+ # Run javadoc
+ - name: Generate javadoc
+ run: mvn -B javadoc:aggregate && mv target/site/apidocs "docs/${{steps.extract_branch.outputs.branch}}/javadoc/"
+ env:
+ MAVEN_OPTS: "-Dmaven.javadoc.failOnError=false"
+ # Install dependencies
+ - name: Install dependencies
+ run: sudo apt-get update && sudo apt-get install doxygen graphviz plantuml
+ # Generate doxygen docs
+ - name: Generate Doxygen docs
+ run: doxygen Doxyfile && mv "target/doxygen/html" "docs/${{steps.extract_branch.outputs.branch}}/doxygen/"
+ env:
+ OUTPUT_DIRECTORY: "target/doxygen"
+ # Deploy
+ - name: Deploy docs
+ uses: JamesIves/github-pages-deploy-action@v4
+ with:
+ folder: docs/${{steps.extract_branch.outputs.branch}}/
+ target-folder: docs/${{steps.extract_branch.outputs.branch}}/
+ token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/Doxyfile b/Doxyfile
new file mode 100644
index 0000000..9df55f0
--- /dev/null
+++ b/Doxyfile
@@ -0,0 +1,39 @@
+# INPUT FILES
+INPUT = src/
+FILE_PATTERNS = *.java
+RECURSIVE = YES
+
+# OUTPUT
+OUTPUT_DIRECTORY = $(OUTPUT_DIRECTORY)
+GENERATE_LATEX = NO
+GENERATE_HTML = YES
+
+# JAVA MODE
+OPTIMIZE_OUTPUT_JAVA = YES
+EXTRACT_ALL = YES
+EXTRACT_PRIVATE = YES
+EXTRACT_STATIC = YES
+JAVADOC_AUTOBRIEF = YES
+SOURCE_BROWSER = YES
+INLINE_SOURCES = YES
+
+# DIAGRAMS
+HAVE_DOT = YES
+DOT_NUM_THREADS = 2
+CLASS_DIAGRAMS = YES
+CALL_GRAPH = YES
+CALLER_GRAPH = YES
+DOT_IMAGE_FORMAT = svg
+
+# PLANTUML (optional)
+USE_PLANTUML = YES
+PLANTUML_JAR_PATH = /usr/share/plantuml/plantuml.jar
+PLANTUML_INCLUDE_PATH = .
+PLANTUML_CFG_FILE =
+
+# ALIASES (optional: adds headings like @responsibilities)
+ALIASES += responsibilities="\par Responsibilities:"
+ALIASES += collaborators="\par Collaborators:"
+
+# MARKDOWN
+MARKDOWN_SUPPORT = YES
diff --git a/pom.xml b/pom.xml
index ad76794..870a799 100644
--- a/pom.xml
+++ b/pom.xml
@@ -122,6 +122,39 @@
11
+ none
+
+
+ startuml
+
+ startuml
+
+
+ enduml
+
+ enduml
+
+
+ class
+
+ class
+
+
+ brief
+
+ brief
+
+
+ responsibilities
+
+ responsibilities
+
+
+ collaborators
+
+ collaborators
+
+
@@ -163,6 +196,8 @@
.github/ISSUE_TEMPLATE/*toolchains.xmlsettings.xml
+
+ DoxyfileREADME.adocREADME.md
diff --git a/src/main/java/com/teragrep/functions/dpf_02/BatchCollect.java b/src/main/java/com/teragrep/functions/dpf_02/BatchCollect.java
index 4368803..0c98863 100644
--- a/src/main/java/com/teragrep/functions/dpf_02/BatchCollect.java
+++ b/src/main/java/com/teragrep/functions/dpf_02/BatchCollect.java
@@ -54,6 +54,34 @@
import java.util.*;
+/**
+ * @class BatchCollect
+ * @brief Handles the business logic for processing orders.
+ *
+ * @responsibilities
+ * - Collects rows
+ *
+ * @collaborators
+ * - SortByClause
+ *
+ * @startuml
+ * class BatchCollect {
+ * + call()
+ * }
+ *
+ * BatchCollect --> SortByClause : sort order
+ *
+ * note right of BatchCollect
+ * Responsibilities:
+ * - Collects Rows
+ *
+ * Collaborators:
+ * - SortByClause
+ * end note
+ *
+ * @enduml
+ */
+
public final class BatchCollect extends SortOperation {
private static final Logger LOGGER = LoggerFactory.getLogger(BatchCollect.class);
private Dataset savedDs = null;
diff --git a/src/main/java/com/teragrep/functions/dpf_02/ObjectDesign.java b/src/main/java/com/teragrep/functions/dpf_02/ObjectDesign.java
new file mode 100644
index 0000000..d26dbd0
--- /dev/null
+++ b/src/main/java/com/teragrep/functions/dpf_02/ObjectDesign.java
@@ -0,0 +1,59 @@
+package com.teragrep.functions.dpf_02;
+
+/*
+ * Teragrep Batch Collect DPF-02
+ * Copyright (C) 2019, 2020, 2021, 2022 Suomen Kanuuna Oy
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ *
+ *
+ * Additional permission under GNU Affero General Public License version 3
+ * section 7
+ *
+ * If you modify this Program, or any covered work, by linking or combining it
+ * with other code, such other code is not for that reason alone subject to any
+ * of the requirements of the GNU Affero GPL version 3 as long as this Program
+ * is the same Program as licensed from Suomen Kanuuna Oy without any additional
+ * modifications.
+ *
+ * Supplemented terms under GNU Affero General Public License version 3
+ * section 7
+ *
+ * Origin of the software must be attributed to Suomen Kanuuna Oy. Any modified
+ * versions must be marked as "Modified version of" The Program.
+ *
+ * Names of the licensors and authors may not be used for publicity purposes.
+ *
+ * No rights are granted for use of trade names, trademarks, or service marks
+ * which are in The Program if any.
+ *
+ * Licensee must indemnify licensors and authors for any liability that these
+ * contractual assumptions impose on licensors and authors.
+ *
+ * To the extent this program is licensed as part of the Commercial versions of
+ * Teragrep, the applicable Commercial License may apply to this file if you as
+ * a licensee so wish it.
+ */
+
+/**
+ * @startuml
+ * !include src/main/java/com/teragrep/functions/dpf_02/BatchCollect.java!0
+ * !include src/main/java/com/teragrep/functions/dpf_02/SortByClause.java!0
+ *
+ * @enduml
+ */
+
+public class ObjectDesign {
+
+}
diff --git a/src/main/java/com/teragrep/functions/dpf_02/SortByClause.java b/src/main/java/com/teragrep/functions/dpf_02/SortByClause.java
index f34c607..b825b67 100644
--- a/src/main/java/com/teragrep/functions/dpf_02/SortByClause.java
+++ b/src/main/java/com/teragrep/functions/dpf_02/SortByClause.java
@@ -49,7 +49,19 @@
import java.io.Serializable;
/**
- * Class for the different sortByClauses in the 'sort' command
+ * @startuml
+ * class SortByClause {
+ * - getLimit()
+ * }
+ *
+ * note right of SortByClause
+ * Responsibilities:
+ * - Sorts Rows
+ *
+ * Collaborators:
+ * - ConvertIPStringToInt
+ * end note
+ * @enduml
*/
public class SortByClause implements Serializable {
private boolean descending = false; // + or -