Skip to content

Commit

Permalink
Config/settings XML files + default status + added 2 new XSD schemas
Browse files Browse the repository at this point in the history
- added default segment status and removed integers (resolves trakem2#13)
- added config.xsd that defines project level settings (resolves trakem2#17)
- added settings.xsd that defines global settings in home folder
(resolves trakem2#18)
- added jaxb2-maven-plugin to the pom file
- cleaned and reorganized VisbilityPanel.java
- updated and reorganized RhizoAddons.java to handle the new xml files
  • Loading branch information
Tino Schmidt committed Mar 7, 2018
1 parent 45a7493 commit 0310c88
Show file tree
Hide file tree
Showing 12 changed files with 1,471 additions and 889 deletions.
24 changes: 24 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,30 @@
</execution>
</executions>
</plugin>

<!-- config.xsd -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>2.3.1</version>
<executions>
<execution>
<id>xjc-configXSD</id>
<goals>
<goal>xjc</goal>
</goals>
</execution>
</executions>
<configuration>
<outputDirectory>${project.basedir}/src/main/java</outputDirectory>
<sources>
<source>src/main/resources/schemas/config.xsd</source>
<source>src/main/resources/schemas/settings.xsd</source>
</sources>
<clearOutputDir>false</clearOutputDir>
<packageName>de.unihalle.informatik.rhizoTrak.config</packageName>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
23 changes: 23 additions & 0 deletions src/main/java/META-INF/sun-jaxb.episode
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<jaxb:bindings version="2.1" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb">
<!--
This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
Any modifications to this file will be lost upon recompilation of the source schema.
Generated on: 2018.03.07 at 06:54:45 PM CET
-->
<jaxb:bindings scd="x-schema::">
<jaxb:schemaBindings map="false">
<jaxb:package name="de.unihalle.informatik.rhizoTrak.config"/>
</jaxb:schemaBindings>
<jaxb:bindings scd="config">
<jaxb:class ref="de.unihalle.informatik.rhizoTrak.config.Config"/>
</jaxb:bindings>
<jaxb:bindings scd="globalSettings">
<jaxb:class ref="de.unihalle.informatik.rhizoTrak.config.GlobalSettings"/>
</jaxb:bindings>
</jaxb:bindings>
</jaxb:bindings>

8 changes: 6 additions & 2 deletions src/main/java/de/unihalle/informatik/rhizoTrak/Project.java
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,12 @@ static public Project newFSProject(String arg, TemplateThing template_root, Stri

// aeekz
final OpenDialog od = new OpenDialog("Select status file", dir_project, null);
RhizoAddons.loadStatusFile(od.getPath());
if(RhizoAddons.userSettingFile.exists()) RhizoAddons.loadUserSettings();
RhizoAddons.loadConfigFile(od.getPath());
if(RhizoAddons.userSettingsFile.exists())
{
Utils.log("@Project: called loadUserSettings(");
RhizoAddons.loadUserSettings();
}

// help the helpless users:
if (autocreate_one_layer && null != project && ControlWindow.isGUIEnabled()) {
Expand Down
Loading

0 comments on commit 0310c88

Please sign in to comment.