Skip to content
Bernhard edited this page Jan 23, 2015 · 74 revisions

On this page, the overall project structure of the MOM-CA source code project is described. The figure shows how the MOM-CA source project looks like after you have installed MOM-CA successfully.

Java Perspective

my/betterFORM

betterFORM is an XForms processor bundled with the eXist Native XML database. Normally, the betterFORM XForms processor is just used in MOM-CA for user interface development. The cooperation project Virtuelles deutsches Urkundennetzwerk, above that, implemented a betterFORM extension for MOM-CA, namely an XForms control for XML Mixed Content edition. The code is located in my/betterFORM. See the MOM-CA compiling and deployment guide on how to compile and integrate a custom betterFORM version into MOM-CA.

my/eXist/extensions/module/src
my/eXist/src

MOM-CA uses and in some parts extends and patches the eXist application server. The source code extending or patching eXist is located under my/eXist. eXist provides an interface to write custom XQuery modules with which one can extend the standard XQuery function-set and the eXist-specific XQuery function-set. Following this interface, MOM-CA implements two new XQuery modules:

Besides these two new modules, there are patches and extensions implemented for some existing eXist XQuery modules:

Two eXist core XQuery modules are patched as well:

  • the eXist text XQuery module is extended with a function to compute text differences. The function forms the basis for the XML version difference tool.
  • the eXist validation XQuery module is extended with a custom XRX XML validation error handler for user-friendly validation reports.

See the MOM-CA compiling and deployment guide on how to compile custom eXist code into a MOM-CA instance.

my/XRX/src/core
my/XRX/src/mom

The my/XRX/src/core and my/XRX/src/mom directories contain the XRX source code of the MOM-CA platform, the most important part of the MOM-CA code project.

The my/XRX/src/core directory contains underlying functionality and the XRX infrastructure. The my/XRX/src/mom directory contains the code connected to the mom-ca browser experience and interaction. Code that is not used in the inner MOM context is held outside of the mom folder in the core directory for conceptual clarity. Look at the auth folder for example: The folder can be found in both (core & mom) directories. But the one in the core directory is different from the one inside the mom directory. Open the two auth.app.xml files side by side: The core/auth/auth.app.xml contains general infrastructural code. It contains different XQuery-modules that are pretty general. Now look at the mom/auth/auth.app.xml: In line 3 there is an xrx-element we have not seen before -> <xrx:inherits>tag:www.monasterium.net,2011:/core/app/auth</xrx:inherits> The modules are inherited from /core/app/auth. So we have the basic infrastructural components at our disposal. The specific MOM implementation adds to that the routing information in the <xrx:resolver> element. And in the <xrx:conf> part that follows the sequence of user-roles that we are using in Monasterium (e.g. Moderator, HtmlAuthor). A quick word concerning inheritance: You will only find <xrx:inherits> elements in files in the mom directory and not in files in the core folder, because the core directory only contains the fundamental building blocks -- thus the name "core" directory. See XRX plus plus Inheritance for detailed info.

See the MOM-CA compiling and deployment guide on how to compile and deploy XRX source code into a MOM-CA instance.

my/XRX/res/jssaxparser
my/XRX/res/jquery
my/XRX/res/codemirror

The my/XRX/res directory contains external JavaScript libraries such as jssaxparser, jQuery UI or codemirror. The external JavaScript libraries are patched with the code below the my/XRX/res directory during installation and afterwards they are deployed into the eXist database. JavaScript is mainly used for client-side features that cannot be implemented with the XForms language.

my/XRX/system

The my/XRX/system directory contains database index configuration files important for the eXist database to perform well with MOM-CA's large XML data collections. See the eXist index configuration guide for detailed information.

See the MOM-CA compiling and deployment guide on how to deploy the index files into a MOM-CA instance.

build

The build directory contains the build system for the MOM-CA platform, which is based on Apache Ant.

Clone this wiki locally