Catalogs - GeoscienceAustralia/earthsci GitHub Wiki

Introduction

Catalogs are a core concept of the EarthSci platform.

The basic premise of the 'catalog' mechanism is to provide an abstraction over data sources of different types. The abstraction has been designed to support as many hierarchical style data sources as possible. This abstraction can then be presented to the user in a seamless, coherent view which gives them access to the data.

An example of a catalog might be a WMS service endpoint, which contains a number of raster layers that can be accessed by the user. Another example might be a GOCAD project file, which references multiple GOCAD geometries. In each case, the user is provided with the same interaction model and can perform the same core actions on the data in each type of catalog (e.g. add/remove from the current Layer model, obtain metadata etc.).

Contents

The primary class in the catalog API is the ICatalogTreeNode. This represents a single element in the hierarchy of a catalog. Implementations may provide access to information relevant for the catalog type in question (for example, a WMS implementation might give access to the capabilities document of the parent service).

A base AbstractCatalogTreeNode class is provided that implements many of the boilerplate methods needed to create a new catalog node type. It is recommended that you extend this class if possible, rather than implement ICatalogTreeNode directly.

A number of utility implementations are provided:

  • ErrorCatalogTreeNode - A special node that represents a failed load of a node in the catalog tree. Allows users to access the source of the error.
  • LoadingCatalogTreeNode - Used to represent that children of a catalog node are being loaded. Provides a nice spinner icon.

The ICatalogModel serves as the top-level domain model for the the catalog API. It maintains a special (hidden) root node that then contains all other top-level catalogs that have been added to the system. There should only ever be a single ICatalogModel instance per application.

Catalogs are loaded using the Intent API. Implementors should register intent handlers with a return type of ICatalogTreeNode.

The core catalog API is provided by the au.gov.ga.earthsci.catalog plugin. A UI part is provided in au.gov.ga.earthsci.catalog.ui.

Along with the basic API, a number of concrete implementations are provided with the platform. These include:

  • au.gov.ga.earthsci.catalog.dataset - A catalog implementation that reads the legacy dataset.xml format supported by the GA WorldWind Suite.
  • au.gov.ga.earthsci.catalog.directory - A catalog implementation that reads from a local filesystem and displays any files that are supported Layer types.
  • au.gov.ga.earthsci.catalog.wms - A catalog implementation that connects to a WMS service and displays available raster layers.