Legacy ISO Metadata Publishing

From Gcube Wiki
Revision as of 18:02, 16 July 2013 by Fabio.sinibaldi (Talk | contribs)

Jump to: navigation, search

This page aims to explain how to publish ISO metadata using legacy GIS library org.gcube.common.geoserverinterface (referred as GeoServerInterface from now on).

Since various components still rely on GeoServerInterface to publish geo-referenced data, the library has been enhanced to facilitate publication of ISO Metadata correctly filled (see GCube Object Metadata).

Maven Dependency

The GeoServerInterface library is released as a maven artifact with the following coordinates

<groupId>org.gcube.common</groupId>
<artifactId>geoserverinterface</artifactId>

ISO Metadata facilities are released from version 1.10.2.

Code Adaptation

Introduced enhancements have been designed in order to make code adaptation as easy as possible from developers view. The class org.gcube.common.geoserverinterface.GeoCaller remains the main entry point of GeoServerInterface library for publishing means.

Preexistent publishing methods have been doubled in a way that users just need to change the passed arguments in order to change ISO Metadata publishing behavior.

The following is the list of newly introduced methods

public boolean addGeoLayer(String fileUrl, String layerName, String layerTitle, String workspace, GeonetworkCategory category, Metadata toPublishMeta, String scope, String defaultStyle) throws Exception;
public boolean addFeatureType(FeatureTypeRest featureTypeRest,String defaultStyle, GeonetworkCategory category, Metadata toPublishMeta) throws Exception;
public boolean addGeoTiff(String geoTiffUrl, final String layerName, String layerTitle, final String workspace, GeonetworkCategory category, Metadata toPublishMeta, String scope, String defaultStyle) throws Exception;
public boolean addPreExistentGeoTiff(String fileName, final String layerName, String layerTitle, final String workspace, GeonetworkCategory category, Metadata toPublishMeta,String defaultStyle) throws Exception;

To summerize difference in methods signature :

  • removed argument String description
  • removed argument String abstract
  • added argument org.opengis.metadata.Metadata toPublishMeta : ISO Metadata object representation. It must be already filled with all needed information but layer OGC links, which will be generated at publishing time by the library.
  • added arguemnt String defaultStyle : the defaultStyle to be used when generating OGC links in ISO metadata

Metadata generation

Extending default behaviour