-
Notifications
You must be signed in to change notification settings - Fork 7
Development
DiMe server is developed in Java using the Spring framework, specifically we are using Spring Boot which provides easy auto-configuration.
To start developing you just need the code, the Java 7 JDK (or newer)
and you favourite text editor. Just typing make
in the command line
will run gradle
which downloads any Java requirements, including
Spring framework.
You can run the unit tests by typing:
make test
(or equivalently ./gradlew test
if you don't have GNU Make). The tests among other things will run a temporary DiMe server, add various things to the database and then try to retrieve them back over the API. After the tests have finished you can access them by opening the file build/reports/tests/index.html
in a web browser.
Contains various configurations used by the Makefile. In particular if you want to change your own configuration take a look at the Configuration documentation.
Various bits and pieces of "documentation". Most documentation should be here in the wiki.
Various helper scripts and simple examples (in Python) on how to use the DiMe API.
Various external loggers. These have been moved to a separate git repository https://github.com/HIIT/dime-loggers .
Various non-code resources used by DiMe. E.g. templates
contains the Thymeleaf sources for the web dashboard, static
contains static parts of the web page such as images and CSS files.
db/changelog/db.changelog-master.xml
is an important file, it's the SQL schema update rules used by liquibase to keep the SQL databases up-to-date over different versions.
application.properties
contains the default configuration of DiMe, don't change this unless you want to change the defaults for all users. To change your own settings only use the files in the config
directory.
Java source code, main application and controllers. Some important files include:
-
Application.java
, which is the main class that starts the whole server application. AppConfig.java
WebSecurityConfig.java
The Controller classes respond to HTTP requests:
ApiController.java
-
DataController.java
, for uploading data items AnswerController.java
WebController.java
Classes for answers, i.e. feature extraction side. This has not really been used yet.
Classes for handling user accounts.
Classes for data types that are stored in DiMe. See also documentation of the DiMe data model and documentation on how to add new data classes.
Classes for interfacing with the database (SQL). The DAO
classes are meant to be used by the rest of the application, the Repository
classes shouldn't be used directly.
Classes related to the Lucene-based text search.
Simple stand-alone utility classes.
Unit tests live here.