Skip to content

noacktino/core

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Core

This folder contains the core Java and Maven-based implementation of OpenInfRA. The project page can be found here.

LOC (version 1.4.2): approx 25.000

Installation

To run OpenInfRA different prerequisites must be complied. At this point we will give a broad overview about the necessary components and their configuration. OpenInfRA consists of the following parts:

Application

The application is written in Java and must be compiled with Java 7. It must be packed into a war file and run on a server. Currently, the application is optimized for Apache Tomcat. There are only a few handles necessary to configure the application. The main configuration file must be adapted to the current needs. The different configuration parameters are commented and need no further explanations. The prime configurations are the database connection and file path properties. These must be set correctly in order to run the application.

The OpenInfRA application is based on the following software stack:

OpenInfRA Softwarestack

Database

The database is necessary to provide a data storage for OpenInfRA. Further instructions can be found in the appropriated repositoriy.

Solr

To make use of Solr in OpenInfRA two prerequisites must be complied. First the server itself must be installed. Second the core definition must be installed in the specified file path. Further instructions can be found in the appropriated repositories.

WebGis/GeoServer

A detailed description is provided in the specific folder: GXC.

ImageMagick

OpenInfRA provides a file upload. This upload requires ImageMagick to generate and produce different image representations.

  • PDF conversion requires ghostscript
  • Conversion of raw file formats (such as DNG) require UFRaw under Linux-based systems.

Some Internals

This section shows some starting points and describes a few details. Project and TopicCharacteristic are used as running examples. As the name states, 'Project' refers to an OpenInfRA project. A 'TopicCharacteristic' is an abstract container which groups a set of objects by the description and consolidation of specific attributes. An object is called TopicInstance and it defines attribute values consolidated by a 'TopicCharacteristic'. This leads to the following correlation: a set of TopicInstances are type of a specific TopicCharacteristic.

Model

The following picture shows the 'Project' and the 'TopicCharacteristic' as model objects. 'Model objects' refer to the persistence layer. Native SQL queries or JPA queries schould be placed here. This helps to keep the code nice and clean.

OpenInfRA Model

POJO

The following picture shows the 'Project' and the 'TopicCharacteristic' as POJO objects. 'POJO objects' are data containers. These containers are used to transfer data from the application core to the REST API.

OpenInfRA POJOI

DAO

Database access is utilized by means of a DAO pattern. There exists a DAO class for each model object. DAO classes are used to transform 'model objects' into 'POJO objects' and vice versa. This is a litle bit implementation intensive but leads to a maximum of data control. Thus, it is possible to hide data in the REST API and to enrich the REST API with additional information without invoking side effects to the persistence layer.

OpenInfRA DAO

Entity Manager

The entity manager is very important for the DAO classes and the reaction time of the application since it utilizes the database access. Each DAO class uses its own 'entity manager'. In order to provide fast access it exists an EntityManagerFactoryCache which provides the administation of 'entity manager' objects for DAO classes.

OpenInfRA EM

Database Schemas

OpenInfRA provides different database schemas. Each 'database schema' is optimized for specific needs:

  • system: The 'system schema' contains abstract data and information which is used to derive project schemas.
  • project: A 'project schema' contains only project specific data without meta data. There are several project schemas. Each project schema provides its own UUID.
  • meta data: The 'meta data schema' contains additional information of a project.
  • rbac: The 'rbac schema' contains information for the role-based access control system. This includes user information, roles and permissions.
  • webapp: The 'webapp schema' provides additional information for GUI applications.
  • files: The 'files schema' provides data of the file upload system.
  • search: The 'search schema' is not a real database schema, it only provides an access point for the search engine.

OpenInfRA Database Schemas

Adding a new schema can be done very easy by the following steps:

    1. Create schema on the database level.
    1. Generate necessary model objects.
    1. Register the new schema in the OpenInfraSchemas enumeration
    1. Create POJO, DAO and RBAC classes.
    1. Register the new schema in the EntityManagerFactoryCache.
    1. Register resources and URLs in the REST API.

TODO

  • The JUnit tests have to be extended.
  • Logging isn't implemented appropriately.

Revision of REST-Resources and DAO-Classes

The initial database schema didn't consider an UUID for the identification of associations. An association object was initally identified by the UUIDs of the related objects e.g. the 'attribute type' to 'attribute type group' association was identified by the UUID of the 'attribute type' and the 'attribute type group'. Each of the aforementioned objects relates to a POJO object. Thus, it became necessary to equip each POJO with an UUID (especially the association object) in order to provide a generic API. However, the old access stratedgy is still available and should be revised.

About

This folder contains the core Java and Maven based implementation of OpenInfRA.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 78.6%
  • CSS 6.8%
  • JavaScript 6.5%
  • HTML 6.4%
  • XSLT 1.7%