Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
39 changes: 39 additions & 0 deletions Doxyfile
Original file line number Diff line number Diff line change
@@ -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
35 changes: 35 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,39 @@
</goals>
<configuration>
<source>11</source>
<doclint>none</doclint>
<tags>
<tag>
<name>startuml</name>
<placement></placement>
<head>startuml</head>
</tag>
<tag>
<name>enduml</name>
<placement></placement>
<head>enduml</head>
</tag>
<tag>
<name>class</name>
<placement></placement>
<head>class</head>
</tag>
<tag>
<name>brief</name>
<placement></placement>
<head>brief</head>
</tag>
<tag>
<name>responsibilities</name>
<placement></placement>
<head>responsibilities</head>
</tag>
<tag>
<name>collaborators</name>
<placement></placement>
<head>collaborators</head>
</tag>
</tags>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -163,6 +196,8 @@
<exclude>.github/ISSUE_TEMPLATE/*</exclude>
<exclude>toolchains.xml</exclude>
<exclude>settings.xml</exclude>
<!-- Doxygen -->
<exclude>Doxyfile</exclude>
<!-- readme -->
<exclude>README.adoc</exclude>
<exclude>README.md</exclude>
Expand Down
28 changes: 28 additions & 0 deletions src/main/java/com/teragrep/functions/dpf_02/BatchCollect.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<Row> savedDs = null;
Expand Down
59 changes: 59 additions & 0 deletions src/main/java/com/teragrep/functions/dpf_02/ObjectDesign.java
Original file line number Diff line number Diff line change
@@ -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 <https://github.com/teragrep/teragrep/blob/main/LICENSE>.
*
*
* 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 {

}
14 changes: 13 additions & 1 deletion src/main/java/com/teragrep/functions/dpf_02/SortByClause.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 -
Expand Down