Skip to content
This repository has been archived by the owner on Aug 24, 2021. It is now read-only.

Structure

Sebastian Raubach edited this page Jan 1, 2018 · 4 revisions

Structure

In this section, we will explain the structure of the Germinate project. This includes the folder structure of the GitHub project as well as the structure of the deployed product. Afterwards we will provide information about the structure of the database itself.

GitHub project

The actual GitHub project of Germinate is structured as shown in the figure above. The left tree shows the overall structure of the whole project whereas the right tree shows the structure of the files and folders related to the web side of things.

Project structure

Germinate is designed to allow custom look and feel for different projects. This means you are able to have multiple configurations of Germinate, each tailored specifically for the special needs of the individual projects. As an example we show the structure of the project your-project which in reality would be named after your project.

There are several sub-directories. The apps directory includes external applications that ship with Germinate. In this example, we include an application called some-app. The "data" directory contains raw data files that are used during the export processes. The download directory contains all the data files that you want to provide as downloads on Germinate. Those can include images for the gallery, pdfs, etc. The download-de_DE directory contains internationalized versions of the files found in download. See Section Customization for further details. The "i18n" directory contains the internationalization property files for Germinate. The res folder can be used to host several files that are used as resources. The content of this folder is copied to the server and accessible from the server side code. In this example we have an R file that is used on the server to generate a dendrogram.

Finally, the template folder contains custom styling files for your individual instance of Germinate. Those include custom logos, custom css, custom html, custom JavaScript libraries, custom parallax images, fonts, a favicon, etc.

The other files in your project folder are the most important ones. They define how Germinate works. We'll give a detailed description of each file below.

config.properties

config.properties is the file you have already read about in Section Configuration. It is used to define how to connect to the database, where to find Flapjack and R, which title to use for Germinate and so on.

Web structure

The most important file in this structure is germinate.jsp. This file contains the basic web skeleton of the website, i.e. the overall structure. In this file, you should define external JavaScript files and external css files you want to load in addition to the already contained ones. `germinate-css.jsp` contains the custom Germinate style sheet. Most of what you find in this file takes care of how the content of the page looks.

As you might already have notices, both files are not typical .css files, but rather .jsp files. However, the first line in all of these files lets the browser know, that in fact they are css stylesheets. The reason for using jsp instead is based on the fact, that we have access to the PropertyReader in the jsp files. This allows us to get properties from the server and change the stylesheets before they are sent to the browser.

As mentioned earlier, you can simply add external css and js files to Germinate. There are predestined folders for these here as well. The Germinate folder is created by Ant when you compile the project. It contains all the JavaScript source files that are generated and served to the browser. You don't need to worry about this folder at all. The error folder contains resources for the error pages. At the moment Germinate provides humorous error pages for the most common errors: 404, 403 and 401. Feel free to add further error pages.

Finally, the WEB-INF folder should look familiar to every web developer. It contains the libraries (in form of .jar files that are necessary to run Germinate` on the server as well as the compiled Java source.

Database

We moved the documentation of the database to an online resource. You can find an overview of all the tables with detailed descriptions at the following location:

https://ics.hutton.ac.uk/resources/germinate/database-docs/