Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fork merge: Diagram-Text tracelinks, Improvements to the MME detection capabilities #286

Merged
merged 167 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
f6285f2
Add diagrams and diagrams goldstandard
menof36go Jun 25, 2023
a7c076a
Use pipeline step data properly
menof36go Jun 26, 2023
6ac53e0
Encapsulate mock in single folder structure
menof36go Jun 26, 2023
64e0640
Implement base tlr approach
menof36go Jun 26, 2023
d0891ff
Restructure modules, create tests-resources model for shared resources
menof36go Jun 28, 2023
84f4a71
Add missing logger dependencies, fix packet structure
menof36go Jun 30, 2023
14640be
Change diagram subclasses inheritance and test runner setups
menof36go Jun 30, 2023
3542a9d
Move filter to Diagram Projects, add debug toString to DiaTexTraceLink
menof36go Jun 30, 2023
c37f06c
Implement comparables and change diagram to model instance conversion
menof36go Jun 30, 2023
baed754
Fix Set duplicates DiaTexTraceLink bug
menof36go Jul 1, 2023
606c8b7
Fix goldstandard bigbluebutton
menof36go Jul 1, 2023
24799bc
Add result wrapper, add missing goldstandard tls
menof36go Jul 4, 2023
52389d6
JacksonInject Diagram to DEs, fix TemporaryFile bug, improve diagramToM
menof36go Jul 5, 2023
8692cf1
Implement boundinbox behaviour and tests
menof36go Jul 5, 2023
64a16a9
DiagramElement getSubElements, DiagramLink compareTo, missing TL in GS
menof36go Jul 5, 2023
5965a75
Add AbbreviationDisambiguationHelper and fix my grave performance sins
menof36go Jul 7, 2023
167e4cc
Add FileBasedCache superclass, add DBPediaHelper
menof36go Jul 9, 2023
5b01021
Filter out some Software words using DBPedia
menof36go Jul 9, 2023
70ca7af
Fix parse bug, add confidence and start eliminating interdiagram overlap
menof36go Jul 11, 2023
30b06f1
Update to ArDoCo 0.15.0-SNAPSHOT
menof36go Jul 13, 2023
4916650
Add pom.xml to editorconfig for consistency
menof36go Jul 13, 2023
a7b822b
Fix package error, fix pom warning
menof36go Jul 13, 2023
0a78368
Remove vestigial benchmark files from tests module
menof36go Jul 13, 2023
2a0991f
Fix small Levensthein similarity calculation bug, add simple test
menof36go Jul 14, 2023
16e50b0
Add confidence map to diagram links to reduce FP
menof36go Jul 14, 2023
b73dca8
Allow for datarepository cloning, faster test setup with PreTestRunner
menof36go Jul 14, 2023
4ac1360
update expected results, update dcg test, update goldstandard
menof36go Jul 14, 2023
c847f6b
DataRepository deep copy, make most data classes serializable
menof36go Jul 14, 2023
ccd6c6e
Towards determinism
menof36go Jul 15, 2023
d3e12e9
getPipelineSteps, getAgents and StageTest for auto. repetition testing
menof36go Jul 16, 2023
e9fa789
Subclass DiaTexTraceLink into DiaWordTraceLink to fix consistency issue
menof36go Jul 16, 2023
8e8e216
Use BigDecimal instead of double
menof36go Jul 16, 2023
7bf0029
Serialize between runs for test prerunners
menof36go Jul 17, 2023
fff9102
Derive DiaGSTraceLink from DiaTexTraceLink
menof36go Jul 19, 2023
a670f80
Add missing dot
menof36go Jul 19, 2023
d06f7f7
Fix resetFile bug
menof36go Jul 19, 2023
7de9c50
Benchmark to test-base, change DiaTexTL, auto invalidate testcache
menof36go Jul 19, 2023
1008f08
Remove vestigial code-java.json file
menof36go Jul 19, 2023
a3358a9
Move schema to proper folder, add tracelink attributes, encapsulate bbox
menof36go Jul 20, 2023
6631ed7
Update goldstandards with typed tracelinks
menof36go Jul 20, 2023
4dc76fe
Implement tracetypes
menof36go Jul 20, 2023
317a364
Add new similarity strategy
menof36go Jul 22, 2023
d0f5de3
Update json schema
menof36go Jul 28, 2023
f4915dc
Merge remote-tracking branch 'github/main' into main
menof36go Aug 2, 2023
bb99eb5
Update to ArDoCo 0.18-SNAPSHOT
menof36go Aug 2, 2023
2d4dedf
Fix repetition test distinct bug
menof36go Aug 2, 2023
8441455
Change stage and agent superclass to remove lots of unnecessary code …
menof36go Aug 2, 2023
8549fe1
Add getResourceName to Diagram
menof36go Aug 3, 2023
ca4a2f5
Add ConfigurationUtility
menof36go Aug 3, 2023
61a300a
Serialization changes
menof36go Aug 3, 2023
a03c066
Add deepcopy annotation, change runner structure, add pipeline metadata
menof36go Aug 3, 2023
1aaa11d
Serialize connectors, use new runner structure
menof36go Aug 3, 2023
f7db3ab
Implement diagram inconsistency checker
menof36go Aug 3, 2023
68b2209
Change api package to erid
menof36go Aug 4, 2023
5bee026
Remove vestigial serialization stuff, fix clone bug, refactor package…
menof36go Aug 6, 2023
2457995
Fix ArDoCoForErid Runner
menof36go Aug 6, 2023
896a0b4
change id to class names
menof36go Aug 6, 2023
5f2bf7d
fix erid pom bug
menof36go Aug 6, 2023
0743487
Run inconsistency evaluation with ERID
menof36go Aug 6, 2023
f7611e9
Add DiagramBackedNounMappingImpl, delegate TextStateImpl
menof36go Aug 7, 2023
cf12669
Add confidence threshold to diagramlink diawordlink
menof36go Aug 7, 2023
093872c
Cleanup, add project interfaces
menof36go Aug 10, 2023
5994355
Use GoldStandardProject instead of refering to enum directly
menof36go Aug 10, 2023
af2080d
Update poms, minor fixes
menof36go Aug 10, 2023
1c49a8c
Move AddNounMapping into DefaultTextStrategy
menof36go Aug 10, 2023
756f2f4
Fix OriginalTextStrategy merge bug
menof36go Aug 10, 2023
44cf71b
Remove InputDiagramDataMock
menof36go Aug 13, 2023
46aad7f
DiagramConnectionState use comparator
menof36go Aug 13, 2023
7b99b07
Use AcronymFinder and implement AmbiguationConnectionInformant
menof36go Aug 14, 2023
7e6a491
Update DiagramInconsistencyState
menof36go Aug 14, 2023
1e7a120
Remove diagram-recognition-mock module, refactor results
menof36go Aug 15, 2023
f5b98da
Backup
menof36go Aug 16, 2023
c59ba5b
Refactor StageTest, AnonymousRunner, improve abbreviation disambiguation
menof36go Aug 17, 2023
61cddc2
Refactor caches to reduce writes, add Color to Diagram Element
menof36go Aug 18, 2023
8c41e12
Generify TraceLinkEvaluation
menof36go Aug 18, 2023
7aa5372
Move ModelReferenceAgent into DiagramRecognition, generify
menof36go Aug 18, 2023
7663590
Fix diagram recognition
menof36go Aug 18, 2023
64358bc
Cache Docker, add diagrams to DiagramProject, add TextBoxCleanUp
menof36go Aug 20, 2023
1b6309e
Merge LiSSA, fix GoldStandard
menof36go Aug 25, 2023
844c958
Resolve merge conflicts
menof36go Aug 26, 2023
05352d5
Fix merge issues with DiagramRecognition
menof36go Sep 1, 2023
63d52d3
Move ambiguation into WordSimUtils
menof36go Sep 1, 2023
00bd8f5
Remove deprecated
menof36go Sep 2, 2023
95e58b0
Add hierarchy to diagram elements, fix recognition combinator
menof36go Sep 2, 2023
3ed8e99
Add confusables (homoglyphs) support to WordSimUtils
menof36go Sep 3, 2023
8e74eb9
Add faster structure for homoglyphs, add to WordSimUtils and stages
menof36go Sep 3, 2023
48c0df8
Change logger.info to debug where appropriate
menof36go Sep 3, 2023
1b095cf
Rename files
menof36go Sep 6, 2023
6d1487a
Optimize imports
menof36go Sep 8, 2023
c715f50
Minor changes to DataRepository and PreprocessingData
menof36go Sep 8, 2023
95f5c6b
LazyInitializer diagram element
menof36go Sep 8, 2023
afe7ae7
Change precomputation step of HoldBackRunResults
menof36go Sep 8, 2023
8f26b33
Restructure HoldBackRunsProducer
menof36go Sep 8, 2023
1cab60f
Fix ProjectNameFilterInformant
menof36go Sep 8, 2023
1c8e27a
Fix ERID HoldBackRunResults
menof36go Sep 8, 2023
12e20eb
Speed up Inconsistency Detection by a lot
menof36go Sep 8, 2023
43585cd
Fix nullable in diagram elements
menof36go Sep 10, 2023
de9d788
Change reference calculation, update TestUtil
menof36go Sep 14, 2023
d6611a4
Fix macroResults bug and add separate baseline ID class
menof36go Sep 14, 2023
ae02057
Minor fix
menof36go Sep 16, 2023
7ef2c9d
Remove whitespace from UME teastore historical goldstandard
menof36go Sep 28, 2023
a170370
Add Documentation for some classes
menof36go Oct 5, 2023
11c2abb
Refactoring, more documentation, update test values, prepare for merge
menof36go Oct 16, 2023
1a81145
Merge remote-tracking branch 'github/main' into main
menof36go Oct 16, 2023
cfeb381
spotless apply
menof36go Oct 25, 2023
e55815e
Merge branch 'main' into menof36go-main
dfuchss Oct 30, 2023
2afc4f3
Revert parts of editorconfig
dfuchss Oct 30, 2023
429b3ae
Fix some JavaDocs
dfuchss Oct 30, 2023
3d63a12
Merge branch 'main' into main-menof36go
dfuchss Oct 31, 2023
bd8235a
Alternatives to Set and Map
menof36go Oct 31, 2023
f93de09
Fix test fails except metric deviations
menof36go Nov 1, 2023
c3cff4a
Merge branch 'pr-erid' into main
menof36go Nov 1, 2023
c8ac84c
requested changes
menof36go Nov 1, 2023
c853af4
spotless apply
menof36go Nov 1, 2023
4f1816f
fix determinism check fail
menof36go Nov 1, 2023
d69bfed
Merge branch 'pr-erid2' into main
menof36go Nov 1, 2023
eab0326
Better sketch recognition visualization for low resolution images
menof36go Nov 5, 2023
8e793c5
Better sketch recognition visualization for low resolution images
menof36go Nov 5, 2023
ef14eec
Merge branch 'main' into main
dfuchss Nov 9, 2023
303aa2a
Fix integration tests, make abbreviations configurable, stateless
menof36go Dec 4, 2023
fe80d12
spotless
menof36go Dec 4, 2023
ea1e11c
Merge branch 'pr-erid4' into main
menof36go Dec 4, 2023
26d5a0f
Fix ratchet
menof36go Dec 4, 2023
8027ff2
Merge remote-tracking branch 'github/main' into main
menof36go Dec 5, 2023
7425d29
Add Serialization ArchRule, fix violations
menof36go Dec 6, 2023
6db62a0
Fix abbreviation cache access and filebasedcache conditions
menof36go Dec 6, 2023
7971732
Spotless
dfuchss Dec 6, 2023
d346163
Fix microservice related ci fail
menof36go Dec 6, 2023
aec06fd
Merge branch 'pr-erid5' into main
menof36go Dec 6, 2023
23bbeba
Merge branch 'main' into main
dfuchss Dec 6, 2023
09d17b8
Fix and speed up code model initialization
menof36go Dec 6, 2023
22b6908
Remove unused AmbiguationConnectionInformant and utility methods
menof36go Dec 6, 2023
69ae6e3
Performance improvements to similarity utils and some foreaches
menof36go Dec 6, 2023
d3e61be
Fix broken DtoToObjectConversion due to unescaped brackets
menof36go Dec 6, 2023
014b1a1
Fix some sonar cloud issues
menof36go Dec 6, 2023
4a15f22
Merge branch 'pr-erid6' into main
menof36go Dec 6, 2023
bf01d04
Merge branch 'main' into main
dfuchss Dec 8, 2023
1e84ac2
Work on Code Issues (Spotless)
dfuchss Dec 11, 2023
f4f679c
Merge branch 'main' into main-menof36go
dfuchss Dec 13, 2023
a4bdbda
Reset changes in benchmark
dfuchss Dec 13, 2023
98b62d1
fix
menof36go Dec 13, 2023
837cd92
Fix path
menof36go Dec 13, 2023
2c3a819
Merge branch 'main' into main-menof36go
dfuchss Dec 14, 2023
16d4b03
SonarCloud issues
menof36go Dec 19, 2023
4b25bd5
Spotless
menof36go Dec 19, 2023
df0a4ca
Test fails
menof36go Dec 19, 2023
9cea1c3
SonarCloud minor
menof36go Dec 20, 2023
5fa1d0e
Remove suppress
menof36go Dec 20, 2023
b6ee070
Merge branch 'main' into main-menof36go
dfuchss Jan 11, 2024
d576147
Update License Header (spotless:apply)
dfuchss Jan 11, 2024
1c849ec
Try to merge (still wip)
dfuchss Jan 12, 2024
943bbe5
Fix tests and adapt new values.
dfuchss Jan 12, 2024
79bf9b9
Fix loading
dfuchss Jan 12, 2024
f0619ff
Try to fix diagram-consistency stage
dfuchss Jan 16, 2024
8cb311f
Increase SUID
dfuchss Jan 17, 2024
ef5f670
Migrate code to Kotlin (if kotlin module)
dfuchss Jan 17, 2024
edcc669
Fix kotlin code
dfuchss Jan 18, 2024
bbab8c1
Cleanup kotlin code
dfuchss Jan 18, 2024
9da5974
Merge branch 'main' into menof36go-main
dfuchss Jan 18, 2024
05fd265
Fix null handling
dfuchss Jan 18, 2024
42eef84
Fix some code issues
dfuchss Jan 18, 2024
6d474fc
FileBaseCache to TMP
dfuchss Jan 19, 2024
b3df1f6
Fix check
dfuchss Jan 19, 2024
9d81545
Remove Null-Object
dfuchss Jan 19, 2024
992e271
Remove DataRepository from States
dfuchss Feb 2, 2024
5679056
Merge branch 'main' into menof36go-main
dfuchss Feb 8, 2024
db0238b
Merge branch 'main' into main
dfuchss Feb 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ ij_visual_guides = none
ij_wrap_on_typing = false

[*.{kt,kts}]
insert_final_newline = true
ij_kotlin_allow_trailing_comma = false
ij_kotlin_allow_trailing_comma_on_call_site = false
ij_kotlin_name_count_to_use_star_import = 999
Expand Down Expand Up @@ -118,7 +117,7 @@ ij_java_for_statement_wrap = off
ij_java_generate_final_locals = false
ij_java_generate_final_parameters = false
ij_java_if_brace_force = never
ij_java_imports_layout = $*,|,java.**,javax.**,|,org.**,com.**,|,*
ij_java_imports_layout = $*, |, java.**, javax.**, |, org.**, com.**, |, *
ij_java_indent_case_from_switch = false
ij_java_insert_inner_class_imports = false
ij_java_insert_override_annotation = true
Expand Down Expand Up @@ -155,7 +154,7 @@ ij_java_names_count_to_use_import_on_demand = 3
ij_java_new_line_after_lparen_in_annotation = false
ij_java_new_line_after_lparen_in_deconstruction_pattern = true
ij_java_new_line_after_lparen_in_record_header = false
ij_java_packages_to_use_import_on_demand = java.awt.*,javax.swing.*
ij_java_packages_to_use_import_on_demand = java.awt.*, javax.swing.*
ij_java_parameter_annotation_wrap = off
ij_java_parentheses_expression_new_line_after_left_paren = false
ij_java_parentheses_expression_right_paren_on_new_line = false
Expand Down Expand Up @@ -269,3 +268,4 @@ ij_java_while_on_new_line = false
ij_java_wrap_comments = true
ij_java_wrap_first_method_in_call_chain = false
ij_java_wrap_long_lines = false

10 changes: 10 additions & 0 deletions framework/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-arq</artifactId>
<version>4.8.0</version>
</dependency>
<dependency>
<groupId>org.apache.opennlp</groupId>
<artifactId>opennlp-tools</artifactId>
Expand All @@ -50,6 +55,11 @@
<artifactId>jgrapht-core</artifactId>
<version>${jgrapht.version}</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.16.1</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
/* Licensed under MIT 2023-2024. */
package edu.kit.kastel.mcse.ardoco.core.api;

import java.io.IOException;
import java.io.Serializable;
import java.util.*;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import edu.kit.kastel.mcse.ardoco.core.architecture.Deterministic;

/**
* This class represents an abbreviation with a known set of meanings. An abbreviation is a string such as "ArDoCo" and has the meaning "Architecture
* Documentation Consistency". The abbreviation that is disambiguated by the meanings of this class is final, but the meanings can be changed. An instance of
* this class can be serialized and deserialized into JSON using Jackson.
*/
@Deterministic
@JsonSerialize(using = Disambiguation.DisambiguationSerializer.class)
public class Disambiguation implements Comparable<Disambiguation>, Serializable {
private final String abbreviation;
private final SortedSet<String> meanings;

public String getAbbreviation() {
return abbreviation;
}

public SortedSet<String> getMeanings() {
return new TreeSet<>(meanings);
}

@Override
public int compareTo(Disambiguation o) {
return abbreviation.compareTo(o.abbreviation);
}

@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj instanceof Disambiguation other) {
return getAbbreviation().equals(other.getAbbreviation());
}
return false;
}

@Override
public int hashCode() {
return Objects.hash(getAbbreviation());
}

/**
* Used by the Jackson library to serialize a disambiguation into JSON format.
*/
public static class DisambiguationSerializer extends JsonSerializer<Disambiguation> {
@Override
public void serialize(Disambiguation abbreviation, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
jsonGenerator.writeStartObject();
jsonGenerator.writeStringField("abbreviation", abbreviation.abbreviation);
jsonGenerator.writeArrayFieldStart("meanings");
var meanings = abbreviation.meanings;
for (var meaning : meanings) {
jsonGenerator.writeString(meaning);
}
jsonGenerator.writeEndArray();
jsonGenerator.writeEndObject();
}
}

/**
* Creates a new disambiguation of the provided abbreviation using the given array of meanings.
*
* @param abbreviation the abbreviation that is disambiguated by this instance
* @param meanings an array of meanings for the abbreviation, may be empty
*/
@JsonCreator
public Disambiguation(@JsonProperty("abbreviation") String abbreviation, @JsonProperty("meanings") String[] meanings) {
this(abbreviation, new TreeSet<>(Arrays.stream(meanings).toList()));
}

/**
* Creates a new disambiguation of the provided abbreviation using the given set of meanings.
*
* @param abbreviation the abbreviation that is disambiguated by this instance
* @param meanings a set of meanings for the abbreviation, may be empty
*/
public Disambiguation(String abbreviation, SortedSet<String> meanings) {
this.abbreviation = abbreviation;
this.meanings = new TreeSet<>(meanings);
}

/**
* Adds all meanings from another disambiguation to this disambiguation. Be careful, this does not perform any checks regarding the abbreviations.
*
* @param other the other disambiguation
* @return this
*/
public Disambiguation addMeanings(Disambiguation other) {
meanings.addAll(other.meanings);
return this;
}

/**
* Searches the text for meanings contained by this disambiguation and replaces them with the abbreviation.
*
* @param text the text to search
* @param ignoreCase whether letter case should be ignored when searching for the meanings
* @return the abbreviated text
*/
public String replaceMeaningWithAbbreviation(String text, boolean ignoreCase) {
var abbreviatedText = text;
for (String meaning : meanings) {
String pattern = ignoreCase ? "(?i)" : "";
pattern += meaning;
abbreviatedText = abbreviatedText.replaceAll(pattern, abbreviation);
}
return abbreviatedText;
}

/**
* Merges the first map with the second map in a new map. If a key already exists, the disambiguations are merged non-destructively.
*
* @param a the first map
* @param b the second map
* @return a mutable map
*/

public static SortedMap<String, Disambiguation> merge(SortedMap<String, Disambiguation> a, SortedMap<String, Disambiguation> b) {
var mergedMap = new TreeMap<>(a);
for (var entry : b.entrySet()) {
mergedMap.merge(entry.getKey(), entry.getValue(), Disambiguation::merge);
}
return mergedMap;
}

/**
* Merges the first disambiguation with the second disambiguation into a new instance.
*
* @param a first ambiguation
* @param b second ambiguation
* @return new merged disambiguation
*/

public static Disambiguation merge(Disambiguation a, Disambiguation b) {
var temp = new TreeSet<>(a.meanings);
temp.addAll(b.meanings);
return new Disambiguation(a.abbreviation, temp);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Licensed under MIT 2023. */
/* Licensed under MIT 2023-2024. */
package edu.kit.kastel.mcse.ardoco.core.api;

import java.io.File;
Expand All @@ -7,6 +7,7 @@
import java.util.List;
import java.util.Objects;

import edu.kit.kastel.mcse.ardoco.core.common.tuple.Pair;
import edu.kit.kastel.mcse.ardoco.core.data.PipelineStepData;

/**
Expand All @@ -16,7 +17,9 @@ public class InputDiagramData implements PipelineStepData {
public static final String ID = "InputDiagramData";
private static final List<String> ALLOWED_FILE_TYPES = List.of("jpg", "png", "jpeg");

private final transient String pathToDiagrams;
private String pathToDiagrams;

private List<Pair<String, File>> diagramFiles;

/**
* Create the data by a directory of image files.
Expand All @@ -36,12 +39,24 @@ public InputDiagramData(File diagramDirectory) {
this(Objects.requireNonNull(diagramDirectory).getAbsolutePath());
}

/**
* Create the data by a list of image files.
*
* @param diagramFiles the diagram files
*/
public InputDiagramData(List<Pair<String, File>> diagramFiles) {
Objects.requireNonNull(diagramFiles);
this.diagramFiles = diagramFiles;
}

/**
* Get all image files of the given directory (not recursive).
*
* @return a list of image files ordered by name
*/
public List<File> getFiles() {
public List<Pair<String, File>> getDiagramData() {
if (diagramFiles != null)
return diagramFiles;
if (pathToDiagrams == null)
return List.of();
File directoryOfDiagrams = new File(pathToDiagrams);
Expand All @@ -51,10 +66,11 @@ public List<File> getFiles() {
File[] allFiles = directoryOfDiagrams.listFiles();
if (allFiles == null)
return List.of();
List<File> diagrams = Arrays.stream(allFiles)
List<Pair<String, File>> diagrams = Arrays.stream(allFiles)
.filter(File::isFile)
.filter(f -> ALLOWED_FILE_TYPES.stream().anyMatch(t -> f.getName().toLowerCase().endsWith("." + t)))
.sorted(Comparator.comparing(File::getName))
.map(f -> new Pair<>(f.getName(), f))
.toList();
logger.info("Found {} diagrams to consider.", diagrams.size());
return diagrams;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Licensed under MIT 2023. */
/* Licensed under MIT 2023-2024. */
package edu.kit.kastel.mcse.ardoco.core.api;

import edu.kit.kastel.mcse.ardoco.core.data.PipelineStepData;
Expand All @@ -7,7 +7,7 @@ public class InputTextData implements PipelineStepData {

public static final String ID = "InputTextData";

private transient String text;
private String text;

public InputTextData(String text) {
super();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/* Licensed under MIT 2022-2023. */
/* Licensed under MIT 2022-2024. */
package edu.kit.kastel.mcse.ardoco.core.api;

import edu.kit.kastel.mcse.ardoco.core.api.text.Text;
import edu.kit.kastel.mcse.ardoco.core.data.PipelineStepData;

/**
* This class serves as container for different data after preprocessing to store as {@link PipelineStepData}. Right
* now, this includes the preprocessed {@link Text} only.
* This class serves as container for different data after preprocessing to store as {@link PipelineStepData}. Right now, this includes the preprocessed
* {@link Text} only.
*/
public class PreprocessingData implements PipelineStepData {
public static final String ID = "PreprocessingData";

private transient Text preprocessedText;
private final Text preprocessedText;

public PreprocessingData(Text preprocessedText) {
super();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Licensed under MIT 2023. */
/* Licensed under MIT 2023-2024. */
package edu.kit.kastel.mcse.ardoco.core.api.diagramconsistency.common;

import java.util.List;
Expand Down Expand Up @@ -108,7 +108,7 @@ public static List<Box> getContainedBoxes(Box box, SortedMap<String, Box> boxes)
*/
public static Box addBox(Diagram diagram, String text) {
TextBox textBox = new TextBox(0, 0, 0, 0, 1.0, text, null);
Box box = new Box(String.valueOf(diagram.getBoxes().size()), new int[] { 0, 0, 0, 0 }, 1.0, null, List.of(textBox), null);
Box box = new Box(diagram, String.valueOf(diagram.getBoxes().size()), new int[] { 0, 0, 0, 0 }, 1.0, null, List.of(textBox), null);

diagram.addBox(box);
return box;
Expand Down

This file was deleted.

Loading
Loading