Creating a new repository type
To create a new repository type, you must extend the edu.illinois.ncsa.ergo.gis.repositoryTypes extension point (which is defined in the edu.illinois.ncsa.ergo.gis plugin). You must specify an id and tag, and a class that implements the GISDatasetRepository interface (in the package edu.illinois.ncsa.ergo.gis). To make this easier, Ergo provides an abstract class, edu.illinois.ncsa.ergo.gis.repositories.BaseRepository, which implements many of the basic methods.
Implementing a new repository is fairly complex, it is recommended that you study the source code for LocalRepository and SamRepository (which is the class that implements the WebDAV repository type).
Default repository directory layout
While it is generally recommended to not modify a repository's data by hand, understanding the layout of the Local and WebDAV repository directories will help a developer debug issues that arise while implementing new features.
The repository folder contains the following sub-folders. Each is organized hierarchically based on dataset schema ids.
- properties – this folder contains an xml file in a custom format that defines meta-data about each dataset, including, but not limited to:
- location – a unique URL that identifies the dataset. Datasets that were originally from a different repositories can include the original URL so they can provide a copy of the original dataset
- description – a tag to describe the location ID. This is used to identify matching datasets across different repositories
- maeviz-mapping – a set of mappings that map between the dataset's field names and the field names that Ergo expects
- datasets – this folder contains the actual data files for each dataset, grouped in folders by dataset schema ids.