Difference between revisions of "Administration"

From reBiND Documentation
Jump to: navigation, search
Line 48: Line 48:
  
 
===Correction Manager===
 
===Correction Manager===
 +
 +
Though all of the corrections and modifications to the data document could be done using XQuery and the XQuery Update Facility, it was decided to not have the corrections run in XQuery directly. The Correction Manager is written in Java. It is only loosely coupled to eXist in order to make the Framework more modular. Instead of a document being directly accessed within eXist by the Correction Manager, it will be exported by the custom XQuery function to a regular XML file on the file system of the server. This file is then handed over to the Correction Manager. The actual corrections are not done by the Correction Manager, but by individual Correction Modules which are managed by the Correction Manager. The source code for the exist module that calls the individual correction functions is avaialable from our [http://ww2.biocase.org/svn/rebind/trunk/reBiND-eXist-Module/ subversion repository].
 +
 +
A Correction Module is a Java Class which implements a specific Java Interface. So if the Technical Administrator wants to add a new module to take care of a specific problem for the XML documents of the particular reBiND Instance, he/she just has to write a new class implementing the interface and putting the compiled class into a specific folder. The eXist server might have to be restarted, but does not have to be rebuild which makes it very easy to add new correction modules. This was also one of the reasons why the corrections are done in Java code and not in XQuery, since a lot more programmers are able and comfortable to write Java code than to write custom XQuery functions.
  
 
==[[Correction Modules]]==
 
==[[Correction Modules]]==

Revision as of 19:32, 29 October 2014

Administration

An XML document can be uploaded to the eXist database even if the document is not valid according to the schema used. However it is mandatory that the document is well formed, otherwise errors will occur when trying to store the document.

But before the documents can be stored, a closer look at the collection structure within eXist is needed. The reBiND Framework depends on two collections for managing the different data projects. One of the collections is for the unpublished data projects, which are still being corrected, reviewed or otherwise prepared for publication. The other collection is for the published projects, which can be publicly searched and accessed. Within this document they will be referred to as unpublished and published. Both of these collections are located in the root collection of eXist. Within these collections are the collection for the individual data projects. Having the two collections for unpublished and published data projects makes the security configuration also quite easy, since the security settings for these two collections are automatically inherited by data projects within these.

Instructions on how to create projects via the reBiND user interface have been desctibed in the [Data_upload_to_rebind_framework data archiving section].

The collection structure of eXist, showing the unpublished and published project collections is shown below:

/db/
 ├─ (eXist default)
 ├─ unpublished/
 │   ├─ (data-project-name 1)/
 │   │   ├─ data.xml
 │   │   ├─ metadata.xml
 │   │   ├─ original-data.xls
 │   │   └─ images/
 │   │       ├─ image_001.jpg
 │   │       ├─ image_002.jpg
 │   │       └─ ...
 │   └─ (data-project-name 2)/
 │       └─ ...
 └─ published/
     └─ (data-project-name 3)/
         ├─ data.xml
         ├─ metadata.xml
         ├─ original-data.xls
         ├─ images/
         │   ├─ image_001.jpg
         │   ├─ image_002.jpg
         │   └─ ...
         └─ multimedia/
             ├─ movie1.mov
             ├─ movie2.avi
             └─ ...

The majority of the database administration can be done through the eXist Java webstart client. For example, the client can be used to add new user accounts, modify permissions to different database collections and delete/edit/query the data.

User management

Users can be created via the eXist Java admin client. For example creating a new user for the contributing scientist is shown in the screenshot below.

Create exist user.PNG

In the above example the 'contributing scientist' is allocated to the group 'users', so the /db/unpublished/ directory within the eXist database should be made accessible to the group 'users'.

Correction Manager

Though all of the corrections and modifications to the data document could be done using XQuery and the XQuery Update Facility, it was decided to not have the corrections run in XQuery directly. The Correction Manager is written in Java. It is only loosely coupled to eXist in order to make the Framework more modular. Instead of a document being directly accessed within eXist by the Correction Manager, it will be exported by the custom XQuery function to a regular XML file on the file system of the server. This file is then handed over to the Correction Manager. The actual corrections are not done by the Correction Manager, but by individual Correction Modules which are managed by the Correction Manager. The source code for the exist module that calls the individual correction functions is avaialable from our subversion repository.

A Correction Module is a Java Class which implements a specific Java Interface. So if the Technical Administrator wants to add a new module to take care of a specific problem for the XML documents of the particular reBiND Instance, he/she just has to write a new class implementing the interface and putting the compiled class into a specific folder. The eXist server might have to be restarted, but does not have to be rebuild which makes it very easy to add new correction modules. This was also one of the reasons why the corrections are done in Java code and not in XQuery, since a lot more programmers are able and comfortable to write Java code than to write custom XQuery functions.

Correction Modules