Skip to content

Commit

Permalink
Merge pull request #30 from scientific-tool-set/stabilise-saving
Browse files Browse the repository at this point in the history
Stabilise saving and introduce macOS .app bundle alternative
  • Loading branch information
CarstenWickner committed Sep 13, 2020
2 parents f1dd211 + 6319834 commit 1e7320e
Show file tree
Hide file tree
Showing 92 changed files with 580 additions and 746 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/.project
/.settings/
**/nbactions.xml
**/nb-configuration.xml
117 changes: 117 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.hmx</groupId>
<artifactId>scitos</artifactId>
<version>2.3.1</version>
<version>2.4.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>scitos</name>
<description>parent project of SciToS</description>
Expand All @@ -27,11 +27,11 @@
<connection>scm:git:ssh://git@github.com/scientific-tool-set/scitos.git</connection>
<developerConnection>scm:git:ssh://git@github.com/scientific-tool-set/scitos.git</developerConnection>
<url>https://github.com/scientific-tool-set/scitos</url>
<tag>v2.3.1</tag>
<tag>HEAD</tag>
</scm>

<properties>
<scitos.version>2.3.1</scitos.version>
<scitos.version>2.4.0-SNAPSHOT</scitos.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
Expand All @@ -41,8 +41,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>1.9</source>
<target>1.9</target>
</configuration>
</plugin>
<plugin>
Expand Down
2 changes: 1 addition & 1 deletion scitos.ais/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.hmx</groupId>
<artifactId>scitos</artifactId>
<version>2.3.1</version>
<version>2.4.0-SNAPSHOT</version>
</parent>
<artifactId>scitos.ais</artifactId>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion scitos.ais/scitos.ais.core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.hmx</groupId>
<artifactId>scitos.ais</artifactId>
<version>2.3.1</version>
<version>2.4.0-SNAPSHOT</version>
</parent>
<artifactId>scitos.ais.core</artifactId>
<name>scitos.ais.core</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ public Map<Interview, Map<List<DetailCategory>, AtomicLong>> extractDetailPatter
AtomicLong currentValue = patternOccurences.get(singlePattern);
if (currentValue == null) {
currentValue = new AtomicLong(0);
patternOccurences.put(new ArrayList<DetailCategory>(singlePattern), currentValue);
patternOccurences.put(new ArrayList<>(singlePattern), currentValue);
}
// increase counter for the correct sized pattern by one
currentValue.incrementAndGet();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Interview> interviews = new ArrayList<Interview>(project.getInterviews());
final List<Interview> 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) {
Expand Down Expand Up @@ -188,13 +188,13 @@ public Entry<AisProject, List<?>> 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<Interview> containedInterviews = new LinkedList<Interview>();
final List<Interview> 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<AisProject, List<?>>(project, this.parseOpenViewElementsFromXml(doc, project));
return new SimpleEntry<>(project, this.parseOpenViewElementsFromXml(doc, project));
}

/**
Expand Down Expand Up @@ -287,7 +287,7 @@ MutableDetailCategoryModel parseDetailCategoriesFromXml(final Document doc) thro
*/
private List<DetailCategory> parseDetailCategoriesFromXmlRecursively(final List<Element> categories, final DetailCategory parentCategory)
throws HmxException {
final List<DetailCategory> result = new LinkedList<DetailCategory>();
final List<DetailCategory> result = new LinkedList<>();
for (final Element singleCategoryElement : categories) {
// parse mandatory category attributes
final String code = singleCategoryElement.getAttribute(ModelParseServiceImpl.ATTR_CATEGORY_CODE);
Expand Down Expand Up @@ -421,7 +421,7 @@ private Entry<Element, TextToken> 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<Element, TextToken>(detailElement, currentToken.getFollowingToken());
return new SimpleEntry<>(detailElement, currentToken.getFollowingToken());
}

/**
Expand Down Expand Up @@ -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<TextToken> text = new LinkedList<TextToken>();
final List<TextToken> text = new LinkedList<>();
for (final Element singleParagraph : DomUtil.getChildElements(interviewElement, ModelParseServiceImpl.TAG_INTERVIEW_PARAGRAPH)) {
text.add(this.parseTextParagraphFromXml(singleParagraph, categories));
}
Expand Down Expand Up @@ -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<Object> parseOpenViewElementsFromXml(final Document doc, final AisProject parsedProject) {
final List<Object> openViewElements = new LinkedList<Object>();
final List<Object> openViewElements = new LinkedList<>();
final Element viewsRoot = DomUtil.getChildElement(doc.getDocumentElement(), ModelParseServiceImpl.TAG_VIEWS);
if (viewsRoot != null) {
for (final Element singleView : DomUtil.getChildElements(viewsRoot)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<DetailCategory, DetailCategory> mappedOldToNew = new HashMap<DetailCategory, DetailCategory>();
final Map<DetailCategory, DetailCategory> 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));
Expand Down Expand Up @@ -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<TextToken> getFlatTokenList(final TextToken startToken) {
final List<TextToken> list = new ArrayList<TextToken>(20);
final List<TextToken> list = new ArrayList<>(20);
TextToken currentToken = startToken;
do {
list.add(currentToken);
Expand Down Expand Up @@ -1265,7 +1265,7 @@ public void testExtractDetailSequence() throws HmxException {
final DetailCategory thirdDetail = selectables.get(2);
final DetailCategory fourthDetail = selectables.get(3);
final List<TextToken> text = this.getFlatTokenList(this.paragraphStartToken);
final List<DetailCategory> expectedSequence = new ArrayList<DetailCategory>(11);
final List<DetailCategory> 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);
Expand Down Expand Up @@ -1306,7 +1306,7 @@ public void testValidateEquality_1() {
@Test
public void testValidateEquality_2() {
final AisProject clone = this.project.clone();
final List<DetailCategory> categories = new ArrayList<DetailCategory>(this.project.provide());
final List<DetailCategory> categories = new ArrayList<>(this.project.provide());
categories.remove(categories.size() - 1);
this.modelHandler.replaceCategoryModel(new MutableDetailCategoryModel().reset(categories),
Collections.<DetailCategory, DetailCategory>emptyMap());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Object> openViewElements = new LinkedList<Object>(model.getInterviews());
final List<Object> openViewElements = new LinkedList<>(model.getInterviews());
openViewElements.add("a");
final Document xml = this.service.parseXmlFromModel(model, openViewElements);
final Entry<AisProject, List<?>> parsed = this.service.parseModelFromXml(xml, new File("test.aisp"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> unusedMessages = new LinkedList<String>();
final List<String> unavailableMessages = new LinkedList<String>();
final List<String> unusedMessages = new LinkedList<>();
final List<String> unavailableMessages = new LinkedList<>();
final Enumeration<String> availableKeys = bundle.getKeys();
while (availableKeys.hasMoreElements()) {
unusedMessages.add(availableKeys.nextElement());
Expand Down
2 changes: 1 addition & 1 deletion scitos.ais/scitos.ais.domain/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.hmx</groupId>
<artifactId>scitos.ais</artifactId>
<version>2.3.1</version>
<version>2.4.0-SNAPSHOT</version>
</parent>
<artifactId>scitos.ais.domain</artifactId>
<description>domain project of the SciToS module AIS</description>
Expand Down
Loading

0 comments on commit 1e7320e

Please sign in to comment.