diff --git a/.gitignore b/.gitignore
index 4801179..762fb53 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
/.project
/.settings/
**/nbactions.xml
+**/nb-configuration.xml
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..7159faa
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,117 @@
+# Changelog
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [Unreleased]
+### `scitos`
+#### Added
+- capability to generate basic macOS `.app` bundle alternative for future releases
+
+#### Changed
+- BREAKING CHANGE: Minimum Java version is now `9` (and no longer `8`)!
+
+#### Fixed
+- show error if closing of connection to saved file encounters one
+- re-instate macOS specific handlers for About/Preferences/Quit actions (necessitated by changes in Java 9)
+
+## [2.3.1] - 2020-03-09
+### `scitos-ais`
+#### Fixed
+- improve error handling for import of interviews from ODS spreadsheet #29
+
+## [2.3.0] - 2020-03-08
+### `scitos`
+#### Changed
+- BREAKING CHANGE: Minimum Java version is now `8` (and no longer `6`)!
+
+### `scitos-ais`
+#### Added
+- allow importing multiple unscored interviews at once from an ODS spreadsheet
+
+## [2.2.0] - 2017-09-27
+### `scitos-hmx`
+#### Added
+- allow showing both translations (syntactical/semantical) at the same time #16
+- single analysis view with toggles for showing/hiding separate parts #17
+
+#### Fixed
+- translation in SVG export of semantical analysis #11
+- data loss in specific situation for "Split Proposition" action #21
+
+## [2.1.0] - 2017-09-15
+### `scitos-hmx`
+#### Added
+- offering new menu items for hiding the proposition labels and translations, allowing you to focus on the analysis part at hand (and to cater for uses of HermeneutiX where one of those fields is not being used) #9
+
+#### Changed
+- If the translation fields are hidden, the height of each displayed proposition is reduced. Therefore, more propositions can be shown at once. In case of the Semantical Analysis this also required a slight change in the way how the roles within relations are being displayed, in order to fit into the smaller available space.
+The SVG export however is not affected by these changes. Labels and translations are still always included there.
+
+#### Fixed
+- now enabling the usage of undo/redo also on the Analysis view (and not just on the initial Text Input view) #7
+
+## [2.0.0] - 2016-07-29
+### `scitos-hmx` (HermeneutiX)
+#### Added
+- new Module – a graphical tool for syntactic and semantic structure analysis of complex (foreign language) texts with a number of changes in comparison to the standalone HermeneutiX v1.12. #4
+- configurability of available relations for Semantical Analysis: assignable roles in relations
+- configurability of available origin languages for Syntactical Analysis including the assignable functions for Clause Items and Propositions
+- allow saving of project in text input mode
+- new more self-contained file structure for saving
+- maintaining backwards compatible opening of old file structure
+- allow project creation without requiring a target file path
+
+#### Fixed
+- various (minor) bug fixes, in comparison to the standalone predecessor HermeneutiX v1.12
+
+### `scitos-ais`
+#### Fixed
+- for some cases when assigning a detail category to tokens that already have a specific constellation of detail categories assigned to them
+
+## [1.2.0] - 2015-09-14
+### `scitos`
+#### Added
+- allow specific setting of the UI translation via the 'Preferences' dialog.
+- increasing/decreasing the global content font size via the new 'View' menu. #2
+- hide/show project tree via the new 'View' menu, to maximize usable space. #3
+
+### `scitos-ais`
+#### Changed
+- added the result table Spreadsheet export to the 'File' > 'Export' menu entry.
+
+#### Fixed
+- adjust width of result table columns to fit their contents, enabling a horizontal scroll bar if necessary. #5
+- added missing error message, for the 'selected Project file is already open' case.
+
+## [1.1.0] - 2015-09-06
+### `scitos-ais`
+#### Added
+- 'Export' entry in the 'File' menu, allowing the generation of a HTML representation, which can be displayed in any modern browser out-of-the-box.
+
+## [1.0.0] - 2015-09-04
+### `scitos`
+#### Added
+- General framework for adding different types of tools with some common/shared (technical) features
+
+### `scitos-ais` (Autobiographical Interview Scoring
+#### Added
+- Scoring via mouse and/or keyboard short cuts
+- Use of a configurable category model (i.e. specific aspects of internal and external details)
+- Automatic tallying
+- Result export to ODS Spreadsheet
+- XML based file format, that can also be viewed in modern Web Browsers (and printed there)
+ - Firefox does this out-of-the-box,
+ - other browsers (e.g. Chrome) might prevent this by default for local files (for security reasons), as this feature is realised via an embedded XSLT stylesheet (i.e. a script)
+
+
+[Unreleased]: https://github.com/scientific-tool-set/scitos/compare/v2.3.1...HEAD
+[2.3.1]: https://github.com/scientific-tool-set/scitos/compare/v2.3.0...v2.3.1
+[2.3.0]: https://github.com/scientific-tool-set/scitos/compare/v2.2.0...v2.3.0
+[2.2.0]: https://github.com/scientific-tool-set/scitos/compare/v2.1.0...v2.2.0
+[2.1.0]: https://github.com/scientific-tool-set/scitos/compare/v2.0.0...v2.1.0
+[2.0.0]: https://github.com/scientific-tool-set/scitos/compare/v1.2.0...v2.0.0
+[1.2.0]: https://github.com/scientific-tool-set/scitos/compare/v1.1.0...v1.2.0
+[1.1.0]: https://github.com/scientific-tool-set/scitos/compare/v1.0.0...v1.1.0
+[1.0.0]: https://github.com/scientific-tool-set/scitos/releases/tag/v1.0.0
diff --git a/README.md b/README.md
index 0ef6dcb..dbcfed4 100644
--- a/README.md
+++ b/README.md
@@ -16,6 +16,7 @@ Input of any kind is appreciated.
---
+## Modules
### 1. AIS – Autobiographical Interview Scoring
#### 1.1 Background
Autobiographical Interviews (AI) are a method to tease apart the forms of memory that contribute to a participant's description of a remembered past event.
@@ -69,3 +70,15 @@ The main advantage of the newer/ported version - besides better test coverage an
- Adding/Changing/Rearranging/Removing selectable **syntactical functions**.
- Adding/Changing/Rearranging/Removing selectable **semantical relations**.
- The applied origin text language (including the associated syntactical functions) is being stored as part of a .hmx save file and therefore portable.
+
+---
+
+## F.A.Q.
+### 1. How to exchange configurations?
+When using the `scitos.jar` directly, you can find various `.xml` files beside it (generated once the respective configuration was made).
+Those files contain all the configurations made inside the application (through the "Preferences" menu) and can simply be copy-pasted.
+
+### 2. Where are the configuration files in the macOS `SciToS.app`?
+In case of macOS, you have to right-click on the `SciToS.app` and select "Show Package Contents".
+In there, you'll find the configuration files under `Contents/Resources/`.
+The configuration files between the two distributions are the same, i.e. they can be shared regardless of the operating system.
diff --git a/pom.xml b/pom.xml
index c32b5f2..fcadfa8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,7 +2,7 @@
4.0.0
org.hmx
scitos
- 2.3.1
+ 2.4.0-SNAPSHOT
pom
scitos
parent project of SciToS
@@ -27,11 +27,11 @@
scm:git:ssh://git@github.com/scientific-tool-set/scitos.git
scm:git:ssh://git@github.com/scientific-tool-set/scitos.git
https://github.com/scientific-tool-set/scitos
- v2.3.1
+ HEAD
- 2.3.1
+ 2.4.0-SNAPSHOT
UTF-8
@@ -41,8 +41,8 @@
maven-compiler-plugin
3.8.1
- 1.8
- 1.8
+ 1.9
+ 1.9
diff --git a/scitos.ais/pom.xml b/scitos.ais/pom.xml
index 8ff9143..df3cc8b 100644
--- a/scitos.ais/pom.xml
+++ b/scitos.ais/pom.xml
@@ -3,7 +3,7 @@
org.hmx
scitos
- 2.3.1
+ 2.4.0-SNAPSHOT
scitos.ais
pom
diff --git a/scitos.ais/scitos.ais.core/pom.xml b/scitos.ais/scitos.ais.core/pom.xml
index 975ab81..f35fa94 100644
--- a/scitos.ais/scitos.ais.core/pom.xml
+++ b/scitos.ais/scitos.ais.core/pom.xml
@@ -3,7 +3,7 @@
org.hmx
scitos.ais
- 2.3.1
+ 2.4.0-SNAPSHOT
scitos.ais.core
scitos.ais.core
diff --git a/scitos.ais/scitos.ais.core/src/main/java/org/hmx/scitos/ais/core/ModelHandlerImpl.java b/scitos.ais/scitos.ais.core/src/main/java/org/hmx/scitos/ais/core/ModelHandlerImpl.java
index 55e4463..fd56ee2 100644
--- a/scitos.ais/scitos.ais.core/src/main/java/org/hmx/scitos/ais/core/ModelHandlerImpl.java
+++ b/scitos.ais/scitos.ais.core/src/main/java/org/hmx/scitos/ais/core/ModelHandlerImpl.java
@@ -752,7 +752,7 @@ public Map, AtomicLong>> extractDetailPatter
AtomicLong currentValue = patternOccurences.get(singlePattern);
if (currentValue == null) {
currentValue = new AtomicLong(0);
- patternOccurences.put(new ArrayList(singlePattern), currentValue);
+ patternOccurences.put(new ArrayList<>(singlePattern), currentValue);
}
// increase counter for the correct sized pattern by one
currentValue.incrementAndGet();
diff --git a/scitos.ais/scitos.ais.core/src/main/java/org/hmx/scitos/ais/core/ModelParseServiceImpl.java b/scitos.ais/scitos.ais.core/src/main/java/org/hmx/scitos/ais/core/ModelParseServiceImpl.java
index 020eed6..61fd7a4 100644
--- a/scitos.ais/scitos.ais.core/src/main/java/org/hmx/scitos/ais/core/ModelParseServiceImpl.java
+++ b/scitos.ais/scitos.ais.core/src/main/java/org/hmx/scitos/ais/core/ModelParseServiceImpl.java
@@ -121,7 +121,7 @@ public Document parseXmlFromModel(final IModel> model, final List> openViewE
doc.getDocumentElement().appendChild(this.parseXmlFromDetailCategories(doc, project));
// include scored interviews
final Element interviewRoot = doc.createElementNS(ModelParseServiceImpl.NAMESPACE, ModelParseServiceImpl.TAG_INTERVIEW_ROOT);
- final List interviews = new ArrayList(project.getInterviews());
+ final List interviews = new ArrayList<>(project.getInterviews());
// add interviews in sorted order - just for a user who opens the file in a text editor
Collections.sort(interviews);
for (final Interview singleInterview : interviews) {
@@ -188,13 +188,13 @@ public Entry> parseModelFromXml(final Document doc, final Fi
// retrieve interviews from document
final Element interviewRoot = DomUtil.getChildElement(doc.getDocumentElement(), ModelParseServiceImpl.TAG_INTERVIEW_ROOT);
if (interviewRoot != null) {
- final List containedInterviews = new LinkedList();
+ final List containedInterviews = new LinkedList<>();
for (final Element singleInterview : DomUtil.getChildElements(interviewRoot, ModelParseServiceImpl.TAG_INTERVIEW)) {
containedInterviews.add(this.parseInterviewFromXml(singleInterview, categories));
}
project.setInterviews(containedInterviews);
}
- return new SimpleEntry>(project, this.parseOpenViewElementsFromXml(doc, project));
+ return new SimpleEntry<>(project, this.parseOpenViewElementsFromXml(doc, project));
}
/**
@@ -287,7 +287,7 @@ MutableDetailCategoryModel parseDetailCategoriesFromXml(final Document doc) thro
*/
private List parseDetailCategoriesFromXmlRecursively(final List categories, final DetailCategory parentCategory)
throws HmxException {
- final List result = new LinkedList();
+ final List result = new LinkedList<>();
for (final Element singleCategoryElement : categories) {
// parse mandatory category attributes
final String code = singleCategoryElement.getAttribute(ModelParseServiceImpl.ATTR_CATEGORY_CODE);
@@ -421,7 +421,7 @@ private Entry parseXmlFromTokenRange(final Document doc, fin
// include last token of this range
detailElement.appendChild(this.parseXmlFromTokenText(doc, currentToken));
// return create wrapper element (including its tokens) and the token where to continue the parsing
- return new SimpleEntry(detailElement, currentToken.getFollowingToken());
+ return new SimpleEntry<>(detailElement, currentToken.getFollowingToken());
}
/**
@@ -458,7 +458,7 @@ private Interview parseInterviewFromXml(final Element interviewElement, final Mu
throw new HmxException(Message.ERROR_FILE_INVALID, new IllegalArgumentException("invalid " + ModelParseServiceImpl.TAG_INTERVIEW
+ " definition"));
}
- final List text = new LinkedList();
+ final List text = new LinkedList<>();
for (final Element singleParagraph : DomUtil.getChildElements(interviewElement, ModelParseServiceImpl.TAG_INTERVIEW_PARAGRAPH)) {
text.add(this.parseTextParagraphFromXml(singleParagraph, categories));
}
@@ -556,7 +556,7 @@ private Element parseXmlFromOpenViewElements(final Document doc, final List> o
* @return successfully parsed list of model elements that were open in the view, when the document was created
*/
private List parseOpenViewElementsFromXml(final Document doc, final AisProject parsedProject) {
- final List openViewElements = new LinkedList();
+ final List openViewElements = new LinkedList<>();
final Element viewsRoot = DomUtil.getChildElement(doc.getDocumentElement(), ModelParseServiceImpl.TAG_VIEWS);
if (viewsRoot != null) {
for (final Element singleView : DomUtil.getChildElements(viewsRoot)) {
diff --git a/scitos.ais/scitos.ais.core/src/test/java/org/hmx/scitos/ais/core/ModelHandlerTest.java b/scitos.ais/scitos.ais.core/src/test/java/org/hmx/scitos/ais/core/ModelHandlerTest.java
index c797a41..05477d3 100644
--- a/scitos.ais/scitos.ais.core/src/test/java/org/hmx/scitos/ais/core/ModelHandlerTest.java
+++ b/scitos.ais/scitos.ais.core/src/test/java/org/hmx/scitos/ais/core/ModelHandlerTest.java
@@ -137,7 +137,7 @@ public void testReplaceCategoryModel() throws HmxException {
this.assertTokenState(text.get(10), true, oldSelectableCategories.get(3), true);
this.assertTokenState(text.get(11), true, null, false);
final MutableDetailCategoryModel newModel = new MutableDetailCategoryModel();
- final Map mappedOldToNew = new HashMap();
+ final Map mappedOldToNew = new HashMap<>();
final DetailCategory firstCategory = new DetailCategory(null, "A", "Category A", true, Color.BLACK, null);
final DetailCategory parent = new DetailCategory(null, "B", "Parent", false, Color.BLUE, null);
final DetailCategory secondCategory = new DetailCategory(parent, "C", "", true, null, KeyStroke.getKeyStroke(KeyEvent.VK_C, 0, true));
@@ -1125,7 +1125,7 @@ private void assertTokenState(final TextToken token, final boolean firstOfDetail
* @return list of all following tokens (including given start token)
*/
private List getFlatTokenList(final TextToken startToken) {
- final List list = new ArrayList(20);
+ final List list = new ArrayList<>(20);
TextToken currentToken = startToken;
do {
list.add(currentToken);
@@ -1265,7 +1265,7 @@ public void testExtractDetailSequence() throws HmxException {
final DetailCategory thirdDetail = selectables.get(2);
final DetailCategory fourthDetail = selectables.get(3);
final List text = this.getFlatTokenList(this.paragraphStartToken);
- final List expectedSequence = new ArrayList(11);
+ final List expectedSequence = new ArrayList<>(11);
this.modelHandler.assignDetailCategory(this.interview, text.subList(1, 4), firstDetail);
expectedSequence.add(firstDetail);
this.modelHandler.assignDetailCategory(this.interview, text.subList(5, 6), secondDetail);
@@ -1306,7 +1306,7 @@ public void testValidateEquality_1() {
@Test
public void testValidateEquality_2() {
final AisProject clone = this.project.clone();
- final List categories = new ArrayList(this.project.provide());
+ final List categories = new ArrayList<>(this.project.provide());
categories.remove(categories.size() - 1);
this.modelHandler.replaceCategoryModel(new MutableDetailCategoryModel().reset(categories),
Collections.emptyMap());
diff --git a/scitos.ais/scitos.ais.core/src/test/java/org/hmx/scitos/ais/core/ModelParseServiceTest.java b/scitos.ais/scitos.ais.core/src/test/java/org/hmx/scitos/ais/core/ModelParseServiceTest.java
index 60b1987..0f2b9b0 100644
--- a/scitos.ais/scitos.ais.core/src/test/java/org/hmx/scitos/ais/core/ModelParseServiceTest.java
+++ b/scitos.ais/scitos.ais.core/src/test/java/org/hmx/scitos/ais/core/ModelParseServiceTest.java
@@ -67,7 +67,7 @@ public void testParseModelToAndFromXml_1() throws HmxException {
modelHandler.setInterviewText(modelHandler.createInterview("a"), "1 2 3\n4 5 6 7 8 9\n10");
modelHandler.createInterview("b");
// all interview views open, and a sub model group
- final List openViewElements = new LinkedList(model.getInterviews());
+ final List openViewElements = new LinkedList<>(model.getInterviews());
openViewElements.add("a");
final Document xml = this.service.parseXmlFromModel(model, openViewElements);
final Entry> parsed = this.service.parseModelFromXml(xml, new File("test.aisp"));
diff --git a/scitos.ais/scitos.ais.core/src/test/java/org/hmx/scitos/ais/core/i18n/AisMessageTest.java b/scitos.ais/scitos.ais.core/src/test/java/org/hmx/scitos/ais/core/i18n/AisMessageTest.java
index aa3a22b..83a344f 100644
--- a/scitos.ais/scitos.ais.core/src/test/java/org/hmx/scitos/ais/core/i18n/AisMessageTest.java
+++ b/scitos.ais/scitos.ais.core/src/test/java/org/hmx/scitos/ais/core/i18n/AisMessageTest.java
@@ -25,8 +25,8 @@ public class AisMessageTest {
public void testMessageAvailability() {
final ResourceBundle bundle = ResourceBundle.getBundle(AisMessage.class.getName(), Locale.ENGLISH, new XmlResourceBundleControl());
Assert.assertNotNull(bundle);
- final List unusedMessages = new LinkedList();
- final List unavailableMessages = new LinkedList();
+ final List unusedMessages = new LinkedList<>();
+ final List unavailableMessages = new LinkedList<>();
final Enumeration availableKeys = bundle.getKeys();
while (availableKeys.hasMoreElements()) {
unusedMessages.add(availableKeys.nextElement());
diff --git a/scitos.ais/scitos.ais.domain/pom.xml b/scitos.ais/scitos.ais.domain/pom.xml
index 7d4d097..69fb782 100644
--- a/scitos.ais/scitos.ais.domain/pom.xml
+++ b/scitos.ais/scitos.ais.domain/pom.xml
@@ -3,7 +3,7 @@
org.hmx
scitos.ais
- 2.3.1
+ 2.4.0-SNAPSHOT
scitos.ais.domain
domain project of the SciToS module AIS
diff --git a/scitos.ais/scitos.ais.domain/src/main/java/org/hmx/scitos/ais/domain/model/AisProject.java b/scitos.ais/scitos.ais.domain/src/main/java/org/hmx/scitos/ais/domain/model/AisProject.java
index 9666c8f..c95d530 100644
--- a/scitos.ais/scitos.ais.domain/src/main/java/org/hmx/scitos/ais/domain/model/AisProject.java
+++ b/scitos.ais/scitos.ais.domain/src/main/java/org/hmx/scitos/ais/domain/model/AisProject.java
@@ -40,7 +40,7 @@ public final class AisProject implements IMultiObjectModel categories;
/** The contained interviews. */
- private final List interviews = new LinkedList();
+ private final List interviews = new LinkedList<>();
/**
* Main constructor.
@@ -52,7 +52,7 @@ public final class AisProject implements IMultiObjectModel categories) {
this.setLabel(label);
- this.categories = new ArrayList(categories);
+ this.categories = new ArrayList<>(categories);
}
/**
@@ -120,8 +120,8 @@ public String getGroupKey(final Object interview) {
@Override
public Map> getSubModelObjects() {
- final Map> subModelMap = new HashMap>();
- final List sortedInterviews = new ArrayList(this.interviews);
+ final Map> subModelMap = new HashMap<>();
+ final List sortedInterviews = new ArrayList<>(this.interviews);
Collections.sort(sortedInterviews);
for (final Interview singleInterview : sortedInterviews) {
final String groupKey = this.getGroupKey(singleInterview);
@@ -129,7 +129,7 @@ public Map> getSubModelObjects() {
if (subModelMap.containsKey(groupKey)) {
groupedInterviews = subModelMap.get(groupKey);
} else {
- groupedInterviews = new LinkedList();
+ groupedInterviews = new LinkedList<>();
subModelMap.put(groupKey, groupedInterviews);
}
groupedInterviews.add(singleInterview);
@@ -144,7 +144,7 @@ public List provide() {
@Override
public List provideSelectables() {
- final List selectables = new LinkedList();
+ final List selectables = new LinkedList<>();
for (final DetailCategory singleCategory : this.categories) {
if (singleCategory.isSelectable()) {
selectables.add(singleCategory);
@@ -155,7 +155,7 @@ public List provideSelectables() {
@Override
public AisProject clone() {
- final List clonedInterviews = new LinkedList();
+ final List clonedInterviews = new LinkedList<>();
for (final Interview singleInterview : this.getInterviews()) {
clonedInterviews.add(singleInterview.clone());
}
diff --git a/scitos.ais/scitos.ais.domain/src/main/java/org/hmx/scitos/ais/domain/model/Interview.java b/scitos.ais/scitos.ais.domain/src/main/java/org/hmx/scitos/ais/domain/model/Interview.java
index 401da0c..39d78f8 100644
--- a/scitos.ais/scitos.ais.domain/src/main/java/org/hmx/scitos/ais/domain/model/Interview.java
+++ b/scitos.ais/scitos.ais.domain/src/main/java/org/hmx/scitos/ais/domain/model/Interview.java
@@ -36,7 +36,7 @@ public final class Interview implements IModel, Comparable
/** The index (i.e. number) of this interview in the project containing it. */
private int index;
/** The actual interview including assigned details (i.e. applied scoring). */
- private final List text = new LinkedList();
+ private final List text = new LinkedList<>();
/**
* Main constructor.
@@ -127,7 +127,7 @@ public Interview setText(final List text) {
public Interview reset(final Interview replacingState) {
this.setParticipantId(replacingState.getParticipantId());
this.setIndex(replacingState.getIndex());
- final List copiedParagraphs = new LinkedList();
+ final List copiedParagraphs = new LinkedList<>();
for (final TextToken singleParagraph : replacingState.getText()) {
copiedParagraphs.add(singleParagraph.clone());
}
diff --git a/scitos.ais/scitos.ais.domain/src/main/java/org/hmx/scitos/ais/domain/model/MutableDetailCategoryModel.java b/scitos.ais/scitos.ais.domain/src/main/java/org/hmx/scitos/ais/domain/model/MutableDetailCategoryModel.java
index ccbff3b..14a5d03 100644
--- a/scitos.ais/scitos.ais.domain/src/main/java/org/hmx/scitos/ais/domain/model/MutableDetailCategoryModel.java
+++ b/scitos.ais/scitos.ais.domain/src/main/java/org/hmx/scitos/ais/domain/model/MutableDetailCategoryModel.java
@@ -40,7 +40,7 @@ public class MutableDetailCategoryModel implements IDetailCategoryProvider {
/** Main constructor: initializes an empty category model. */
public MutableDetailCategoryModel() {
- this.categoryByCode = new LinkedHashMap();
+ this.categoryByCode = new LinkedHashMap<>();
}
/**
@@ -89,12 +89,12 @@ public MutableDetailCategoryModel reset(final List categories) {
*/
@Override
public List provide() {
- return new ArrayList(this.categoryByCode.values());
+ return new ArrayList<>(this.categoryByCode.values());
}
@Override
public List provideSelectables() {
- final List selectables = new LinkedList();
+ final List selectables = new LinkedList<>();
for (final DetailCategory singleCategory : this.categoryByCode.values()) {
if (singleCategory.isSelectable()) {
selectables.add(singleCategory);
@@ -120,7 +120,7 @@ public List getRootCategories() {
* @return detail category that have the given one as their parent
*/
public List getChildCategories(final DetailCategory parent) {
- final List children = new LinkedList();
+ final List children = new LinkedList<>();
for (final DetailCategory singleCategory : this.categoryByCode.values()) {
if (ComparisonUtil.isNullAwareEqual(singleCategory.getParent(), parent)) {
children.add(singleCategory);
diff --git a/scitos.ais/scitos.ais.view/pom.xml b/scitos.ais/scitos.ais.view/pom.xml
index e93a7a8..eff2eb1 100644
--- a/scitos.ais/scitos.ais.view/pom.xml
+++ b/scitos.ais/scitos.ais.view/pom.xml
@@ -3,7 +3,7 @@
org.hmx
scitos.ais
- 2.3.1
+ 2.4.0-SNAPSHOT
scitos.ais.view
scitos.ais.view
diff --git a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/CategoryModelChangeDialog.java b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/CategoryModelChangeDialog.java
index af5855b..4b7a0f1 100644
--- a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/CategoryModelChangeDialog.java
+++ b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/CategoryModelChangeDialog.java
@@ -135,7 +135,7 @@ void okButtonPressed() {
final Map> detailsInUse =
this.modelHandler.countDetailOccurrences(this.modelHandler.getModel().getInterviews());
// sum up and ignore unused detail categories
- final Map oldDetailOccurences = new HashMap();
+ final Map oldDetailOccurences = new HashMap<>();
for (final Map singleInterviewDetails : detailsInUse.values()) {
for (final Entry singleOldDetailCount : singleInterviewDetails.entrySet()) {
if (singleOldDetailCount.getKey().isSelectable() && singleOldDetailCount.getValue().get() > 0) {
@@ -257,7 +257,7 @@ private class CategoryModelMatchSubDialog extends JDialog {
final Border rightColumnBorder =
BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(1, 1, 0, 0, Color.BLACK),
BorderFactory.createEmptyBorder(1, 10, 1, 10));
- this.mapping = new HashMap();
+ this.mapping = new HashMap<>();
for (final Entry singleEntry : oldDetailOccurences.entrySet()) {
constraints.gridy++;
constraints.gridx = 0;
diff --git a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/DetailCategoryTreeModel.java b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/DetailCategoryTreeModel.java
index 507a425..132e6cf 100644
--- a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/DetailCategoryTreeModel.java
+++ b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/DetailCategoryTreeModel.java
@@ -61,8 +61,8 @@ final class DetailCategoryTreeModel extends AbstractTreeTableModel {
super(new Object());
final MutableDetailCategoryModel model = new MutableDetailCategoryModel();
model.addAll(categoryProvider.provide());
- this.rootCategories = new LinkedList();
- this.categoryChildren = new HashMap>();
+ this.rootCategories = new LinkedList<>();
+ this.categoryChildren = new HashMap<>();
for (final DetailCategory singleRoot : model.getRootCategories()) {
this.rootCategories.add(this.addCategoryTreeToMap(model, singleRoot));
}
@@ -79,7 +79,7 @@ final class DetailCategoryTreeModel extends AbstractTreeTableModel {
* @return row object representing the given category
*/
private DetailCategoryRow addCategoryTreeToMap(final MutableDetailCategoryModel model, final DetailCategory detail) {
- final List children = new LinkedList();
+ final List children = new LinkedList<>();
for (final DetailCategory singleChild : model.getChildCategories(detail)) {
children.add(this.addCategoryTreeToMap(model, singleChild));
}
@@ -106,7 +106,7 @@ TreePath addChildCategoryRow(final TreePath parent) {
} else {
final Object parentRow = parent.getLastPathComponent();
if (!this.categoryChildren.containsKey(parentRow)) {
- this.categoryChildren.put((DetailCategoryRow) parentRow, new LinkedList());
+ this.categoryChildren.put((DetailCategoryRow) parentRow, new LinkedList<>());
}
parentsChildren = this.categoryChildren.get(parentRow);
// inherit color from parent
@@ -313,7 +313,7 @@ public void setValueAt(final Object value, final Object node, final int column)
* @return all detail categories in unsorted list
*/
private List getFlatCategoryList() {
- final List categories = new LinkedList(this.rootCategories);
+ final List categories = new LinkedList<>(this.rootCategories);
for (final List childCategories : this.categoryChildren.values()) {
categories.addAll(childCategories);
}
@@ -329,7 +329,7 @@ private List getFlatCategoryList() {
* @return full tree path from root to given category row
*/
private TreePath buildPathToRow(final DetailCategoryRow row) {
- final Deque pathElements = new LinkedList();
+ final Deque pathElements = new LinkedList<>();
DetailCategoryRow currentElement = row;
// traverse the tree path from the given leaf upwards
outer: do {
@@ -353,7 +353,7 @@ private TreePath buildPathToRow(final DetailCategoryRow row) {
* @return all categories have unique, non-empty codes
*/
boolean isValid() {
- final Set codesInUse = new HashSet();
+ final Set codesInUse = new HashSet<>();
for (final DetailCategoryRow singleRoot : this.rootCategories) {
if (singleRoot.code.isEmpty() || codesInUse.contains(singleRoot.code)) {
return false;
@@ -379,11 +379,11 @@ boolean isValid() {
*/
SimpleEntry> toModelWithMapping() {
final MutableDetailCategoryModel model = new MutableDetailCategoryModel();
- final Map mapping = new HashMap();
+ final Map mapping = new HashMap<>();
for (final DetailCategoryRow singleRoot : this.rootCategories) {
this.addDetailCategoryToModel(null, singleRoot, model, mapping);
}
- return new SimpleEntry>(model, mapping);
+ return new SimpleEntry<>(model, mapping);
}
/**
diff --git a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/InterviewPanel.java b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/InterviewPanel.java
index f1f6a1b..1dd9b89 100644
--- a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/InterviewPanel.java
+++ b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/InterviewPanel.java
@@ -227,7 +227,7 @@ final boolean containsValidSelection() {
* @return selected text token ui components
*/
final List getSelection() {
- final List selection = new LinkedList();
+ final List selection = new LinkedList<>();
for (final Component singleParagraph : this.getViewPortView().getComponents()) {
for (final Component singleToken : ((Container) singleParagraph).getComponents()) {
if (((TextTokenComponent) singleToken).isSelected()) {
@@ -246,7 +246,7 @@ final List getSelection() {
*/
final List getSelectedTokens() {
final List components = this.getSelection();
- final List selection = new ArrayList(components.size());
+ final List selection = new ArrayList<>(components.size());
for (final TextTokenComponent selectedComponent : components) {
selection.add(selectedComponent.getModel());
}
diff --git a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/InterviewScoringPanel.java b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/InterviewScoringPanel.java
index ba058c1..7a2f653 100644
--- a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/InterviewScoringPanel.java
+++ b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/InterviewScoringPanel.java
@@ -71,7 +71,7 @@ public final class InterviewScoringPanel extends InterviewPanel implements IUndo
public InterviewScoringPanel(final InterviewView parentView) {
super(parentView, parentView.getProject().getModelHandler());
this.parentView = parentView;
- this.undoManager = new UndoManager(parentView.getModel());
+ this.undoManager = new UndoManager<>(parentView.getModel());
this.dragHandler = new MouseDragListener();
this.getViewPortView().setFocusable(true);
this.getViewPortView().addMouseListener(this.dragHandler);
diff --git a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/InterviewView.java b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/InterviewView.java
index 195c150..10d5f81 100644
--- a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/InterviewView.java
+++ b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/InterviewView.java
@@ -50,7 +50,7 @@ public final class InterviewView extends AbstractAisProjectView {
*/
private IUndoManagedView viewPanel;
/** The main tool bar items that belong to this view – in order to enable/disable them according to the current selection. */
- private final List detailToolBarItems = new LinkedList();
+ private final List detailToolBarItems = new LinkedList<>();
/**
* Main constructor.
diff --git a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/ParticipantInterviewGroupView.java b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/ParticipantInterviewGroupView.java
index d9ce0a5..b3df9bd 100644
--- a/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/ParticipantInterviewGroupView.java
+++ b/scitos.ais/scitos.ais.view/src/main/java/org/hmx/scitos/ais/view/swing/components/ParticipantInterviewGroupView.java
@@ -115,7 +115,7 @@ public void refresh() {
final GridBagConstraints constraints = new GridBagConstraints();
constraints.fill = GridBagConstraints.BOTH;
constraints.weightx = 1;
- final List interviews = new ArrayList(this.getProject().getModelObject().getSubModelObjects().get(this.getModel()));
+ final List interviews = new ArrayList<>(this.getProject().getModelObject().getSubModelObjects().get(this.getModel()));
final int interviewCount = interviews.size();
for (int listIndex = 0; listIndex < interviewCount; listIndex++) {
constraints.gridy = listIndex;
diff --git a/scitos.core/pom.xml b/scitos.core/pom.xml
index 8567908..253556d 100644
--- a/scitos.core/pom.xml
+++ b/scitos.core/pom.xml
@@ -3,7 +3,7 @@
org.hmx
scitos
- 2.3.1
+ 2.4.0-SNAPSHOT
scitos.core
scitos.core
diff --git a/scitos.core/src/main/java/org/hmx/scitos/core/AbstractModelHandler.java b/scitos.core/src/main/java/org/hmx/scitos/core/AbstractModelHandler.java
index 1e93e19..657b6f4 100644
--- a/scitos.core/src/main/java/org/hmx/scitos/core/AbstractModelHandler.java
+++ b/scitos.core/src/main/java/org/hmx/scitos/core/AbstractModelHandler.java
@@ -48,7 +48,7 @@ public abstract class AbstractModelHandler> implements IMode
*/
protected AbstractModelHandler(final M model) {
this.model = model;
- this.listeners = new LinkedList();
+ this.listeners = new LinkedList<>();
}
@Override
@@ -87,7 +87,7 @@ public void removeModelChangeListener(final ModelChangeListener listener) {
*/
protected void notifyListeners(final O changedElement, final boolean updated) {
// create generic model event
- final ModelEvent event = new ModelEvent(changedElement, updated);
+ final ModelEvent event = new ModelEvent<>(changedElement, updated);
// notify all currently registered ModelChangeListeners
for (final ModelChangeListener singleListener : this.listeners) {
singleListener.modelChanged(event);
diff --git a/scitos.core/src/main/java/org/hmx/scitos/core/UndoManager.java b/scitos.core/src/main/java/org/hmx/scitos/core/UndoManager.java
index fb6fec2..4628394 100644
--- a/scitos.core/src/main/java/org/hmx/scitos/core/UndoManager.java
+++ b/scitos.core/src/main/java/org/hmx/scitos/core/UndoManager.java
@@ -37,11 +37,11 @@ public final class UndoManager> {
/**
* The collection of previous model object states, available for {@link #undo()}.
*/
- private final Deque availableUndos = new LinkedList();
+ private final Deque availableUndos = new LinkedList<>();
/**
* The collection of previous model object states, which were rolled back and are available for {@link #redo()}.
*/
- private final Deque availableRedos = new LinkedList();
+ private final Deque availableRedos = new LinkedList<>();
/** The maximum of stored undo-able model changes. */
private int limit;
diff --git a/scitos.core/src/main/java/org/hmx/scitos/core/i18n/Translator.java b/scitos.core/src/main/java/org/hmx/scitos/core/i18n/Translator.java
index 0c318f4..cc6a6b2 100644
--- a/scitos.core/src/main/java/org/hmx/scitos/core/i18n/Translator.java
+++ b/scitos.core/src/main/java/org/hmx/scitos/core/i18n/Translator.java
@@ -81,7 +81,7 @@ public String getLocalizedMessage(final M message) {
*/
public static List getAvailableLocales(final Class extends ILocalizableMessage> messageType) {
final List messageFiles = ClassPathUtil.getFileResourcePaths(messageType, messageType.getSimpleName() + "_.+[.]xml");
- final List availableLocales = new ArrayList(messageFiles.size());
+ final List availableLocales = new ArrayList<>(messageFiles.size());
// the full file path starts like the full class name, plus a leading slash '/' and the trailing underscore '_'
final int prefixLength = messageType.getName().length() + 2;
for (final String messageFilePath : messageFiles) {
diff --git a/scitos.core/src/main/java/org/hmx/scitos/core/option/OptionHandler.java b/scitos.core/src/main/java/org/hmx/scitos/core/option/OptionHandler.java
index 8d9794b..b667124 100644
--- a/scitos.core/src/main/java/org/hmx/scitos/core/option/OptionHandler.java
+++ b/scitos.core/src/main/java/org/hmx/scitos/core/option/OptionHandler.java
@@ -66,7 +66,7 @@ public static & IOptionSetting> Option
if (OptionHandler.instances.containsKey(optionImplClass)) {
singleton = (OptionHandler) OptionHandler.instances.get(optionImplClass);
} else {
- singleton = new OptionHandler(optionImplClass);
+ singleton = new OptionHandler<>(optionImplClass);
OptionHandler.instances.put(optionImplClass, singleton);
}
return singleton;
diff --git a/scitos.core/src/main/java/org/hmx/scitos/core/util/ClassPathUtil.java b/scitos.core/src/main/java/org/hmx/scitos/core/util/ClassPathUtil.java
index 62b9654..ebbdd30 100644
--- a/scitos.core/src/main/java/org/hmx/scitos/core/util/ClassPathUtil.java
+++ b/scitos.core/src/main/java/org/hmx/scitos/core/util/ClassPathUtil.java
@@ -45,7 +45,7 @@ public final class ClassPathUtil {
* @see Class#getResourceAsStream(String)
*/
public static List getFileResourcePaths(final Class> clazz, final String fileNameRegex) {
- final List paths = new LinkedList();
+ final List paths = new LinkedList<>();
// check if this is being executed from within a jar file
final Pattern pattern = Pattern.compile(fileNameRegex);
final File jarFile = new File(clazz.getProtectionDomain().getCodeSource().getLocation().getPath());
diff --git a/scitos.core/src/main/java/org/hmx/scitos/core/util/DomUtil.java b/scitos.core/src/main/java/org/hmx/scitos/core/util/DomUtil.java
index 025408b..5459ad0 100644
--- a/scitos.core/src/main/java/org/hmx/scitos/core/util/DomUtil.java
+++ b/scitos.core/src/main/java/org/hmx/scitos/core/util/DomUtil.java
@@ -128,7 +128,7 @@ public static Element getChildElement(final Node parentNode, final String childN
* @return all child elements with the given name
*/
public static List getChildElements(final Node parentNode, final String... childNodeNames) {
- final List children = new LinkedList();
+ final List children = new LinkedList<>();
final NodeList candidates = parentNode.getChildNodes();
final int childCount = candidates.getLength();
final List targetNodeNames = Arrays.asList(childNodeNames);
diff --git a/scitos.core/src/test/java/org/hmx/scitos/core/UndoManagerTest.java b/scitos.core/src/test/java/org/hmx/scitos/core/UndoManagerTest.java
index 981967c..c10dda9 100644
--- a/scitos.core/src/test/java/org/hmx/scitos/core/UndoManagerTest.java
+++ b/scitos.core/src/test/java/org/hmx/scitos/core/UndoManagerTest.java
@@ -34,7 +34,7 @@ public static void setUp() {
@Before
public void prepareManager() {
this.managedModel = UndoManagerTest.MODEL_CLONE.clone();
- this.undoManager = new UndoManager(this.managedModel);
+ this.undoManager = new UndoManager<>(this.managedModel);
this.undoManager.setLimit(2);
}
@@ -87,13 +87,13 @@ public void testUndo() {
public void testUndoMultipleTimes() {
final int iterationCount = 3;
this.undoManager.setLimit(iterationCount);
- final List oldStates = new LinkedList();
+ final List oldStates = new LinkedList<>();
for (int iteration = 0; iteration < iterationCount; iteration++) {
oldStates.add(this.managedModel.clone());
this.managedModel.changeState();
this.undoManager.undoableEditHappened(this.managedModel);
}
- final Deque undoStates = new LinkedList();
+ final Deque undoStates = new LinkedList<>();
for (int iteration = 0; iteration < iterationCount; iteration++) {
undoStates.addFirst(this.undoManager.undo());
}
@@ -116,7 +116,7 @@ public void testRedo() {
public void testRedoMultipleTimes() {
final int iterationCount = 3;
this.undoManager.setLimit(iterationCount);
- final List originalStates = new LinkedList();
+ final List originalStates = new LinkedList<>();
for (int iteration = 0; iteration < iterationCount; iteration++) {
this.managedModel.changeState();
originalStates.add(this.managedModel.clone());
@@ -125,7 +125,7 @@ public void testRedoMultipleTimes() {
for (int iteration = 0; iteration < iterationCount; iteration++) {
this.undoManager.undo();
}
- final List redoStates = new LinkedList();
+ final List redoStates = new LinkedList<>();
for (int iteration = 0; iteration < iterationCount; iteration++) {
redoStates.add(this.undoManager.redo());
}
diff --git a/scitos.core/src/test/java/org/hmx/scitos/core/i18n/MessageTest.java b/scitos.core/src/test/java/org/hmx/scitos/core/i18n/MessageTest.java
index c5d35f8..6d01733 100644
--- a/scitos.core/src/test/java/org/hmx/scitos/core/i18n/MessageTest.java
+++ b/scitos.core/src/test/java/org/hmx/scitos/core/i18n/MessageTest.java
@@ -25,8 +25,8 @@ public class MessageTest {
public void testMessageAvailability() {
final ResourceBundle bundle = ResourceBundle.getBundle(Message.class.getName(), Locale.ENGLISH, new XmlResourceBundleControl());
Assert.assertNotNull(bundle);
- final List unusedMessages = new LinkedList();
- final List unavailableMessages = new LinkedList();
+ final List unusedMessages = new LinkedList<>();
+ final List unavailableMessages = new LinkedList<>();
final Enumeration availableKeys = bundle.getKeys();
while (availableKeys.hasMoreElements()) {
unusedMessages.add(availableKeys.nextElement());
diff --git a/scitos.distribution/build-mac-app.sh b/scitos.distribution/build-mac-app.sh
new file mode 100755
index 0000000..40c2884
--- /dev/null
+++ b/scitos.distribution/build-mac-app.sh
@@ -0,0 +1,66 @@
+#!/bin/sh
+#
+# Special script for creating a Mac .app Bundle.
+# This is not portable, needs to be triggered manually and the following parameters need to be adjusted accordingly.
+#
+VERSION="2.4.0"
+JDK_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
+JRE_MODULES="java.base,java.compiler,java.desktop,java.prefs,java.scripting,java.sql.rowset,jdk.unsupported"
+
+# collect dependencies to mention them in the classpath one-by-one
+LIBS=`ls -md target/lib/* | tr -d ','`
+java -jar src/main/resources/packr/packr-all-2.7.0.jar \
+ --platform mac \
+ --jdk $JDK_HOME \
+ --executable SciToS \
+ --classpath target/scitos.jar \
+ $LIBS \
+ --mainclass org.hmx.scitos.view.swing.ScitosApp \
+ --bundle org.hmx.scitos.swing \
+ --icon src/main/resources/icons/scitos_application.icns \
+ --vmargs Xmx256M \
+ --output target/SciToS.app
+
+echo "Removing the (ca. 300MB) JRE being included by default..."
+rm -rf target/SciToS.app/Contents/Resources/jre
+
+echo "Adding only the (ca. 43MB) JRE parts that are required..."
+$JDK_HOME/bin/jlink \
+ --module-path . \
+ --add-modules $JRE_MODULES \
+ --output target/SciToS.app/Contents/Resources/jre \
+ --no-header-files \
+ --no-man-pages \
+ --strip-debug \
+ --compress=2
+
+echo "Overriding the generated Info.plist to include the correct version number..."
+echo "
+<\!DOCTYPE plist PUBLIC \"-//Apple Computer//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">
+
+
+ CFBundleGetInfoString
+ SciToS
+ CFBundleExecutable
+ SciToS
+ CFBundleIdentifier
+ org.hmx.scitos.swing
+ CFBundleName
+ SciToS
+ CFBundleIconFile
+ icons.icns
+ CFBundleShortVersionString
+ $VERSION
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundlePackageType
+ APPL
+ NSHighResolutionCapable
+
+
+ " > target/SciToS.app/Contents/Info.plist
+
+echo "Packaging as SciTos-macOS-Bundle.tar.gz..."
+tar cJf target/SciTos-macOS-Bundle.tar.gz target/SciToS.app
+
+echo "SciToS.app creation completed!"
diff --git a/scitos.distribution/pom.xml b/scitos.distribution/pom.xml
index da7fce7..a41ae35 100644
--- a/scitos.distribution/pom.xml
+++ b/scitos.distribution/pom.xml
@@ -3,7 +3,7 @@
org.hmx
scitos
- 2.3.1
+ 2.4.0-SNAPSHOT
scitos.distribution
@@ -48,6 +48,18 @@
+
+ lib-dir-assembly
+ package
+
+ single
+
+
+ lib
+ src/main/resources/assembly/assembly-descriptor-libdir.xml
+ false
+
+
distribution-zip-assembly
package
diff --git a/scitos.distribution/src/main/resources/assembly/assembly-descriptor-libdir.xml b/scitos.distribution/src/main/resources/assembly/assembly-descriptor-libdir.xml
new file mode 100644
index 0000000..5df497c
--- /dev/null
+++ b/scitos.distribution/src/main/resources/assembly/assembly-descriptor-libdir.xml
@@ -0,0 +1,20 @@
+
+
+ dir
+
+ dir
+
+
+
+
+
+ false
+
+ org.hmx:scitos*
+
+
+
+
diff --git a/scitos.distribution/src/main/resources/assembly/assembly-descriptor-zip.xml b/scitos.distribution/src/main/resources/assembly/assembly-descriptor-zip.xml
index 1c7b6af..f4ad6c9 100644
--- a/scitos.distribution/src/main/resources/assembly/assembly-descriptor-zip.xml
+++ b/scitos.distribution/src/main/resources/assembly/assembly-descriptor-zip.xml
@@ -8,21 +8,13 @@
zip
scitos
-
-
- lib
- false
-
- org.hmx:scitos*
-
-
-
target
scitos*.jar
+ lib/*.jar
diff --git a/scitos.distribution/src/main/resources/icons/scitos_application.icns b/scitos.distribution/src/main/resources/icons/scitos_application.icns
new file mode 100644
index 0000000..1895fe8
Binary files /dev/null and b/scitos.distribution/src/main/resources/icons/scitos_application.icns differ
diff --git a/scitos.distribution/src/main/resources/packr/packr-all-2.7.0.jar b/scitos.distribution/src/main/resources/packr/packr-all-2.7.0.jar
new file mode 100644
index 0000000..d36a517
Binary files /dev/null and b/scitos.distribution/src/main/resources/packr/packr-all-2.7.0.jar differ
diff --git a/scitos.domain/pom.xml b/scitos.domain/pom.xml
index 0b1ea1c..875ae20 100644
--- a/scitos.domain/pom.xml
+++ b/scitos.domain/pom.xml
@@ -3,7 +3,7 @@
org.hmx
scitos
- 2.3.1
+ 2.4.0-SNAPSHOT
scitos.domain
scitos.domain
diff --git a/scitos.domain/src/main/java/org/hmx/scitos/domain/util/CollectionUtil.java b/scitos.domain/src/main/java/org/hmx/scitos/domain/util/CollectionUtil.java
index e63187d..ac4ba94 100644
--- a/scitos.domain/src/main/java/org/hmx/scitos/domain/util/CollectionUtil.java
+++ b/scitos.domain/src/main/java/org/hmx/scitos/domain/util/CollectionUtil.java
@@ -94,7 +94,7 @@ public static int indexOfInstance(final Collection extends T> collection,
* @return mapping of contained instances to their respective count of occurrences
*/
public static Map countOccurrences(final Collection collection) {
- final Map map = new HashMap();
+ final Map map = new HashMap<>();
for (final T instance : collection) {
final AtomicInteger counter = map.get(instance);
if (counter == null) {
@@ -128,7 +128,7 @@ public static Map countOccurrences(final Collection col
*/
public static void moveEntryInInsertSortedMap(final Map insertSortedMap, final K entryKey, final boolean increaseIndexByOne) {
// #1 create a copy of the original key order as list (to make it accessible via index)
- final List keyList = new ArrayList(insertSortedMap.keySet());
+ final List keyList = new ArrayList<>(insertSortedMap.keySet());
// #2 determine the designated entry's current position
final int index = keyList.indexOf(entryKey);
// #3 determine the entry's new position
@@ -144,7 +144,7 @@ public static void moveEntryInInsertSortedMap(final Map insertSorte
throw new IllegalArgumentException();
}
// #4 create a copy of the unchanged relation template groups map
- final Map groupsCopy = new LinkedHashMap(insertSortedMap);
+ final Map groupsCopy = new LinkedHashMap<>(insertSortedMap);
// #5 remove all mapping from the original relation template groups map, starting at the affected groups' indices
insertSortedMap.keySet().retainAll(keyList.subList(0, Math.min(index, indexToSwitchWith)));
final K entryToSwitchWith = keyList.get(indexToSwitchWith);
diff --git a/scitos.domain/src/test/java/org/hmx/scitos/domain/util/CollectionUtilTest.java b/scitos.domain/src/test/java/org/hmx/scitos/domain/util/CollectionUtilTest.java
index 94990a8..41d3bc5 100644
--- a/scitos.domain/src/test/java/org/hmx/scitos/domain/util/CollectionUtilTest.java
+++ b/scitos.domain/src/test/java/org/hmx/scitos/domain/util/CollectionUtilTest.java
@@ -59,7 +59,7 @@ public void testIndexOfInstance_4() {
/** Test: for moveEntryInInsertSortedMap method (expect failure: move first entry up) */
@Test(expected = IllegalArgumentException.class)
public void testMoveEntryInInsertSortedMap_First_Up() {
- final Map map = new LinkedHashMap(3);
+ final Map map = new LinkedHashMap<>(3);
map.put("1", 1);
map.put("2", 2);
CollectionUtil.moveEntryInInsertSortedMap(map, "1", false);
@@ -68,103 +68,103 @@ public void testMoveEntryInInsertSortedMap_First_Up() {
/** Test: for moveEntryInInsertSortedMap method (move first entry up) */
@Test
public void testMoveEntryInInsertSortedMap_First_Down() {
- final Map map = new LinkedHashMap(3);
+ final Map map = new LinkedHashMap<>(3);
map.put("1", 1);
map.put("2", 2);
map.put("3", 3);
CollectionUtil.moveEntryInInsertSortedMap(map, "1", true);
- Assert.assertEquals(Arrays.asList("2", "1", "3"), new ArrayList(map.keySet()));
+ Assert.assertEquals(Arrays.asList("2", "1", "3"), new ArrayList<>(map.keySet()));
}
/** Test: for moveEntryInInsertSortedMap method (move second entry up) */
@Test
public void testMoveEntryInInsertSortedMap_Second_Up() {
- final Map map = new LinkedHashMap(3);
+ final Map map = new LinkedHashMap<>(3);
map.put("1", 1);
map.put("2", 2);
map.put("3", 3);
map.put("4", 4);
CollectionUtil.moveEntryInInsertSortedMap(map, "2", false);
- Assert.assertEquals(Arrays.asList("2", "1", "3", "4"), new ArrayList(map.keySet()));
+ Assert.assertEquals(Arrays.asList("2", "1", "3", "4"), new ArrayList<>(map.keySet()));
}
/** Test: for moveEntryInInsertSortedMap method (move second entry down) */
@Test
public void testMoveEntryInInsertSortedMap_Second_Down() {
- final Map map = new LinkedHashMap(3);
+ final Map map = new LinkedHashMap<>(3);
map.put("1", 1);
map.put("2", 2);
map.put("3", 3);
map.put("4", 4);
CollectionUtil.moveEntryInInsertSortedMap(map, "2", true);
- Assert.assertEquals(Arrays.asList("1", "3", "2", "4"), new ArrayList(map.keySet()));
+ Assert.assertEquals(Arrays.asList("1", "3", "2", "4"), new ArrayList<>(map.keySet()));
}
/** Test: for moveEntryInInsertSortedMap method (move middle entry up) */
@Test
public void testMoveEntryInInsertSortedMap_Mid_Up() {
- final Map map = new LinkedHashMap(3);
+ final Map map = new LinkedHashMap<>(3);
map.put("1", 1);
map.put("2", 2);
map.put("3", 3);
map.put("4", 4);
map.put("5", 5);
CollectionUtil.moveEntryInInsertSortedMap(map, "3", false);
- Assert.assertEquals(Arrays.asList("1", "3", "2", "4", "5"), new ArrayList(map.keySet()));
+ Assert.assertEquals(Arrays.asList("1", "3", "2", "4", "5"), new ArrayList<>(map.keySet()));
}
/** Test: for moveEntryInInsertSortedMap method (move middle entry down) */
@Test
public void testMoveEntryInInsertSortedMap_Mid_Down() {
- final Map map = new LinkedHashMap(3);
+ final Map map = new LinkedHashMap<>(3);
map.put("1", 1);
map.put("2", 2);
map.put("3", 3);
map.put("4", 4);
map.put("5", 5);
CollectionUtil.moveEntryInInsertSortedMap(map, "3", true);
- Assert.assertEquals(Arrays.asList("1", "2", "4", "3", "5"), new ArrayList(map.keySet()));
+ Assert.assertEquals(Arrays.asList("1", "2", "4", "3", "5"), new ArrayList<>(map.keySet()));
}
/** Test: for moveEntryInInsertSortedMap method (move second to last entry up) */
@Test
public void testMoveEntryInInsertSortedMap_SecondToLast_Up() {
- final Map map = new LinkedHashMap(3);
+ final Map map = new LinkedHashMap<>(3);
map.put("1", 1);
map.put("2", 2);
map.put("3", 3);
map.put("4", 4);
CollectionUtil.moveEntryInInsertSortedMap(map, "3", false);
- Assert.assertEquals(Arrays.asList("1", "3", "2", "4"), new ArrayList(map.keySet()));
+ Assert.assertEquals(Arrays.asList("1", "3", "2", "4"), new ArrayList<>(map.keySet()));
}
/** Test: for moveEntryInInsertSortedMap method (move second to last entry down) */
@Test
public void testMoveEntryInInsertSortedMap_SecondToLast_Down() {
- final Map map = new LinkedHashMap(3);
+ final Map map = new LinkedHashMap<>(3);
map.put("1", 1);
map.put("2", 2);
map.put("3", 3);
map.put("4", 4);
CollectionUtil.moveEntryInInsertSortedMap(map, "3", true);
- Assert.assertEquals(Arrays.asList("1", "2", "4", "3"), new ArrayList(map.keySet()));
+ Assert.assertEquals(Arrays.asList("1", "2", "4", "3"), new ArrayList<>(map.keySet()));
}
/** Test: for moveEntryInInsertSortedMap method (move first entry up) */
@Test
public void testMoveEntryInInsertSortedMap_Last_Up() {
- final Map map = new LinkedHashMap(3);
+ final Map map = new LinkedHashMap<>(3);
map.put("1", 1);
map.put("2", 2);
map.put("3", 3);
CollectionUtil.moveEntryInInsertSortedMap(map, "3", false);
- Assert.assertEquals(Arrays.asList("1", "3", "2"), new ArrayList