Commit 36a219a5 authored by Marian Dovgialo's avatar Marian Dovgialo

#45363 Merge branch 'dev/45363_obci_webpage_offer_demo_to_merge' into 'development'

Dev/45363 obci webpage offer demo to merge

See merge request brain/svarog2!178
parents 681c630f c54c1ebb
......@@ -37,18 +37,6 @@ directories PLUGIN-NAME/target. To run generated JAR, execute
java -jar svarog-standalone/target/svarog-standalone-*.jar
ATTENTION: This method runs Svarog without any plugins.
To run Svarog with all available plugins, you should
a) create symbolic links to JAR and XML files of all plugins you want
to run, linking from PLUGIN-NAME/target/PLUGIN-NAME.(xml|jar)
to directory $HOME/.svarog/plugins
OR
b) create a separate directory according to ZIP creation guide (below)
and run Svarog from that directory.
III. IDE configuration
----------------------
......@@ -70,7 +58,6 @@ Svarog consists of several connected Maven packages:
* Svarog-top, which is the top-most project, which, when built, builds
the entire Svarog with all dependencies
* Svarog, which is the main part of Svarog
* other separate projects, one for each plugin
Most of the source code of Svarog's main part is in directory
......@@ -87,25 +74,16 @@ defines the package, to which this class belongs:
package org.signalml.app;
Analogically, every Svarog plugins has its own package hierarchy,
starting in:
plugins/PLUGIN-NAME/src/main/java
IV. Working with translations
-----------------------------
The first step is to generate *.pot files from Svarog's code, as well as from
the source code of all the plugins. It is done by executing
The first step is to generate *.pot files from Svarog's source code.
It is done by executing
mvn gettext:gettext
in the "svarog" directory as well as in the directory of each plugin.
Next, the resulting *.pot files have to be merged into one *.pot file.
Utility "msgmerge" can be used to accomplish this, and it is preferable
to call it with "-s" ("--sort-output") flag.
in the "svarog" directory.
The resulting *.pot file can be used to initialize a new translation
by the use of "msginit" command. This will create an empty *.po
......@@ -158,7 +136,6 @@ VI. Creating ZIP file for github Releases
ZIP package consists of:
a) Svarog's JAR file
b) plugins' JAR and XML files
c) executable script run_svarog.sh
d) an example signal wakeEEG.bin with corresponding XML file
e) binary executables of MP5 and empi
......@@ -166,7 +143,7 @@ e) binary executables of MP5 and empi
The most recent ZIP file can be used to provide all the files except
a) and b). Afterwards, it is necessary to:
* replace Svarog's JAR file and plugins' files, if they have changed
* replace Svarog's JAR file, if it has changed
* replace version number in run_svarog.sh
* make a ZIP file with the new name (check if the name of the package
corresponds to the package's main directory)
......
<plugin>
<name>Book Reporting</name>
<version>0.6.2</version>
<jar-file>BookReporter.jar</jar-file>
<starting-class>org.signalml.plugin.bookreporter.BookReporterPlugin</starting-class>
<dependencies>
<dependency>
<name>Svarog API</name>
<version>0.5</version>
</dependency>
<dependency>
<name>Plugin Common Tools</name>
<version>1.0</version>
</dependency>
</dependencies>
</plugin>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.signalml.plugin</groupId>
<artifactId>BookReporter</artifactId>
<version>0.6.2</version>
<packaging>jar</packaging>
<name>BookReporter</name>
<parent>
<groupId>org.signalml</groupId>
<artifactId>svarog-top</artifactId>
<version>2.3</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.i18n.resources>src/main/resources/org/signalml/plugin/bookreporter/resource/i18n/</project.build.i18n.resources>
<maven.final.name>BookReporter</maven.final.name>
</properties>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>copy-xml</id>
<phase>package</phase>
<configuration>
<target>
<copy file="BookReporter.xml" tofile="target/BookReporter.xml" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>compile</id>
<phase>compile</phase>
<configuration>
<target>
<property name="runtime_classpath" refid="maven.runtime.classpath" />
<echo message="runtime classpath: ${runtime_classpath}" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>jdeb</artifactId>
<groupId>org.vafer</groupId>
<version>1.5</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jdeb</goal>
</goals>
<configuration>
<dataSet>
<data>
<src>${project.build.directory}/${project.build.finalName}.jar</src>
<type>file</type>
<mapper>
<type>perm</type>
<prefix>/usr/share/java/svarog/plugins</prefix>
</mapper>
</data>
<data>
<src>${project.build.directory}/${project.build.finalName}.xml</src>
<type>file</type>
<mapper>
<type>perm</type>
<prefix>/usr/share/java/svarog/plugins</prefix>
</mapper>
</data>
</dataSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.xnap.commons</groupId>
<artifactId>maven-gettext-plugin</artifactId>
<versionRange>[1.2.3,)</versionRange>
<goals>
<goal>dist</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute>
<runOnIncremental>false</runOnIncremental>
</execute>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<versionRange>[1.6,)</versionRange>
<goals>
<goal>run</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute>
<runOnIncremental>false</runOnIncremental>
</execute>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencies>
<dependency>
<groupId>org.signalml</groupId>
<artifactId>svarog</artifactId>
<version>2.3</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.signalml.plugin</groupId>
<artifactId>PluginToolCommon</artifactId>
<version>1.0</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
Package: svarog-bookreporter
Version: [[version]]
Section: misc
Priority: optional
Architecture: all
Depends: svarog, oracle-java8-installer | openjfx
Maintainer: MDovgialo <marian.dowgialo@braintech.pl>
Description: Bookreporter plugin for svarog
License: GPLv3 (https://www.gnu.org/licenses/gpl-3.0.en.html)
<plugin>
<name>FFT Signal Tool</name>
<version> 0.2.1 </version>
<jar-file>FFTSignalTool.jar</jar-file>
<starting-class>
org.signalml.plugin.fftsignaltool.FFTSignalPlugin
</starting-class>
<dependencies>
<dependency>
<name>Svarog API</name>
<version>0.5</version>
</dependency>
</dependencies>
</plugin>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.signalml.plugin</groupId>
<artifactId>FFTSignalTool</artifactId>
<version>0.2.1</version>
<packaging>jar</packaging>
<name>FFTSignalTool</name>
<parent>
<groupId>org.signalml</groupId>
<artifactId>svarog-top</artifactId>
<version>2.3</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.i18n.resources>src/main/resources/i18n/</project.build.i18n.resources>
</properties>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>copy-xml</id>
<phase>package</phase>
<configuration>
<target>
<copy file="FFTSignalTool.xml" tofile="target/FFTSignalTool.xml" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.xnap.commons</groupId>
<artifactId>maven-gettext-plugin</artifactId>
<version>1.2.3</version>
<configuration>
<poDirectory>${project.build.i18n.resources}</poDirectory>
<targetBundle>org.signalml.plugin.fftsignaltool</targetBundle>
</configuration>
<executions>
<execution>
<id>gettext-dist</id>
<phase>generate-resources</phase>
<goals>
<goal>dist</goal>
</goals>
<inherited>false</inherited>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>jdeb</artifactId>
<groupId>org.vafer</groupId>
<version>1.5</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jdeb</goal>
</goals>
<configuration>
<dataSet>
<data>
<src>${project.build.directory}/${project.build.finalName}.jar</src>
<type>file</type>
<mapper>
<type>perm</type>
<prefix>/usr/share/java/svarog/plugins</prefix>
</mapper>
</data>
<data>
<src>${project.build.directory}/${project.build.finalName}.xml</src>
<type>file</type>
<mapper>
<type>perm</type>
<prefix>/usr/share/java/svarog/plugins</prefix>
</mapper>
</data>
</dataSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.signalml</groupId>
<artifactId>svarog</artifactId>
<version>2.3</version>
<scope>provided</scope>
</dependency>
<!-- dependencies below are specified in util/maven/pom.xml -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>
</project>
Package: svarog-fftsignaltool
Version: [[version]]
Section: misc
Priority: optional
Architecture: all
Depends: svarog
Maintainer: MDovgialo <marian.dowgialo@braintech.pl>
Description: FFTSignalTool plugin for svarog
License: GPLv3 (https://www.gnu.org/licenses/gpl-3.0.en.html)
package org.signalml.plugin.fftsignaltool;
import org.signalml.plugin.export.SvarogAccess;
import org.springframework.context.MessageSourceResolvable;
/**
* Svarog i18n API delegator.
*
* @author Stanislaw Findeisen (Eisenbits)
*/
public class I18nDelegator {
private SvarogAccess svarogAccess;
protected I18nDelegator(SvarogAccess sa) {
this.svarogAccess = sa;
}
/**
* Translates a message using Svarog i18n API.
*
* @param msg message to translate
* @return the translated message
*/
public String _(String msg) {
return svarogAccess.getI18nAccess().translate(msg);
}
/**
* Translates and renders a message using Svarog i18n API.
*
* @param msg message to translate
* @param arguments the values to render
* @return the translated message with values filled in
*/
public String _R(String msg, Object ... arguments) {
return svarogAccess.getI18nAccess().translateR(msg, arguments);
}
/**
* A workaround for the old code.
*
* @param msgKey
* @return msgKey
*/
@Deprecated
public String getMessage(String msgKey) {
return msgKey;
}
/**
* A workaround for the old code.
*
* @param x
* @return x.getDefaultMessage()
*/
@Deprecated
public String getMessage(MessageSourceResolvable x) {
return x.getDefaultMessage();
}
}
<plugin>
<name>Plugin Common Tools</name>
<version>1.0</version>
<jar-file>PluginToolCommon.jar</jar-file>
<starting-class>org.signalml.plugin.tool.PluginToolCommon</starting-class>
<dependencies>
<dependency>
<name>Svarog API</name>
<version>0.5</version>
</dependency>
</dependencies>
</plugin>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.signalml.plugin</groupId>
<artifactId>PluginToolCommon</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<name>PluginToolCommon</name>
<parent>
<groupId>org.signalml</groupId>
<artifactId>svarog-top</artifactId>
<version>2.3</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.final.name>PluginToolCommon</maven.final.name>
</properties>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>copy-xml</id>
<phase>package</phase>
<configuration>
<target>
<copy file="PluginToolCommon.xml" tofile="target/PluginToolCommon.xml" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>compile</id>
<phase>compile</phase>
<configuration>
<target>
<property name="runtime_classpath" refid="maven.runtime.classpath" />
<echo message="runtime classpath: ${runtime_classpath}" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>jdeb</artifactId>
<groupId>org.vafer</groupId>
<version>1.5</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jdeb</goal>
</goals>
<configuration>
<dataSet>
<data>
<src>${project.build.directory}/${project.build.finalName}.jar</src>
<type>file</type>
<mapper>
<type>perm</type>
<prefix>/usr/share/java/svarog/plugins</prefix>
</mapper>
</data>
<data>
<src>${project.build.directory}/${project.build.finalName}.xml</src>
<type>file</type>
<mapper>
<type>perm</type>
<prefix>/usr/share/java/svarog/plugins</prefix>
</mapper>
</data>
</dataSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.signalml</groupId>
<artifactId>svarog</artifactId>
<version>2.3</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
</dependencies>