Skip to content

Latest commit

 

History

History
93 lines (72 loc) · 2.81 KB

readme.md

File metadata and controls

93 lines (72 loc) · 2.81 KB

MOM-CA API

This is an API to access and modify the data in a MOM-CA Database.

Usage

  1. Create a connection.properties file on classpath with the following properties:
    connectionType=exist
    connectionUrl=xmldb:exist://[momca-url]/xmlrpc
    user=admin
    password=[momca-password]
  1. Get a connection factory and momca connection:
MomcaConnectionFactory factory = new MomcaConnectionFactory();
MomcaConnection momca = factory.getMomcaConnection();
  1. Use the various manager classes, e.g. CharterManager, provided by MomcaConnection to access and modify data:
CharterManager cm = momca.getCharterManager();
  1. Do something with it. For instance, the following snippet gets a list of the ids of the charters of a specific fond:
List<IdCharter> charterIds = cm.list(new IdFond("AT-StiASei", "SeitenstettenOSB"))

Tests

To run the unit tests, a new MOM-CA instance must be created and the backup data in /src/test/resources/test_database_backup.zip needs to be restored.

Features

Momcapi is not yet feature complete in regards of all features of MOM-CA. The following functionalities are available:

User manager

  • List all users
  • Get specific user from the database
  • Add new user
  • Delete existing user
  • Change moderator
  • Change password
  • Initialize user (for instance if the user didn't get the confirmation link after sign-up

Country manager

  • List all countries (used in archival fonds and collections)
  • Get specific country from the database
  • Add new country to static hierarchy (used for archival fonds)
  • Add new region to hierarchical countries
  • Delete countries from the hierarchy
  • Delete regions from hierarchical countries

Archive manager

  • List all archives
  • List all archives belonging to a specific country
  • List all archvies belonging to a specific region
  • Get specific archive from the database
  • Get archive metadata (e.g. country, address, logo Url)
  • Add new archive
  • Delete archive

Fond manager

  • List all fonds belonging to a specific archive
  • Get specific fond from the database
  • Add new fond
  • Delete fond

Collection manager

  • List all collections
  • List all collections belonging to a specific country
  • List all collections belonging to a specific region
  • Get a specific collection from the database
  • Add new collection
  • Delete collection

Charter Manager

  • List all charter instances (imported, private, public and saved) for fonds, collections, mycollections and users
  • Get all instances (imported, private, public and saved) of a charter from the database
  • Get specific charter instance, e.g. saved from the database
  • Get charter medadata like the list of all figures
  • Check if charter is a valid CEI document and list the validation problems if it's not