strolch/li.strolch.xmlpers
Robert von Burg fa389d7072 [Project] Updated .gitignore files 2020-01-08 09:18:37 +01:00
..
src [Major] Refactored locking xmlpers to always first lock parent, and unlock in TX 2019-09-04 12:38:59 +02:00
.gitignore [Project] Updated .gitignore files 2020-01-08 09:18:37 +01:00
LICENSE [Major] Move ch.eitchnet projects to li.strolch 2016-06-24 17:42:16 +02:00
README.md [Project] Updated project for deployment to Maven Central 2016-09-22 09:37:55 +02:00
pom.xml [Project] Update all dependencies and plugin dependencies in pom.xml 2017-09-28 19:11:34 +02:00

README.md

li.strolch.java.xmlpers

Generic Java XML persistence layer. Implemented to be light-weight and simple to use

Dependencies

XmlPers is built by Maven3 and has very few external dependencies. The current dependencies are:

  • the Java Runtime Environment 8
  • li.strolch.utils
  • slf4j 1.7.2
  • slf4j-log4j bindings (only during tests)
  • JUnit 4.10 (only during tests)

Features

The idea behind XmlPers is to have a very lightweight database where each object is saved in its own XML file.

The model for XmlPers is that for each persistable class the following information is available:

  • Type (e.g. the class name)
  • Optional Sub Type (e.g. some type in your class)
  • Id

This is not forced on the model itself, but in the DAO. Persisting changes is done by delegating to XmlFilePersister and the DAO must convert the object to a XML Document.

See the tests for a reference implementation.

Building

*Prerequisites:

  • JDK 8 is installed and JAVA_HOME is properly set and ../bin is in path
  • Maven 3 is installed and MAVEN_HOME is properly set and ../bin is in path
  • li.strolch.utils is installed in your local Maven Repository
  • Clone repository and change path to root
  • Run maven:
    • mvn clean install