org.geotools.gce.imagemosaic
Class CatalogManager

Object
  extended by CatalogManager

public class CatalogManager
extends Object

An utility class which allows to create schema, catalogs, and populate them.

Author:
Daniele Romagnoli, GeoSolutions SAS

Constructor Summary
CatalogManager()
           
 
Method Summary
static GranuleCatalog createCatalog(CatalogBuilderConfiguration runConfiguration)
          Create a GranuleCatalog on top of the provided configuration
static GranuleCatalog createCatalog(CatalogBuilderConfiguration runConfiguration, boolean create)
          Create or load a GranuleCatalog on top of the provided configuration
static GranuleCatalog createGranuleCatalogFromDatastore(File parent, File datastoreProperties, boolean create, Hints hints)
          Create a granule catalog from a datastore properties file
static Properties createGranuleCatalogProperties(File datastoreProperties)
           
static SimpleFeatureType createSchema(CatalogBuilderConfiguration runConfiguration, String name, CoordinateReferenceSystem actualCRS)
          Create a SimpleFeatureType from the specified configuration.
static String getRelativePath(String targetPath, String basePath, String pathSeparator)
          Get the relative path from one file to another, specifying the directory separator.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CatalogManager

public CatalogManager()
Method Detail

createCatalog

public static GranuleCatalog createCatalog(CatalogBuilderConfiguration runConfiguration)
                                    throws IOException
Create a GranuleCatalog on top of the provided configuration

Parameters:
runConfiguration -
Returns:
Throws:
IOException

createCatalog

public static GranuleCatalog createCatalog(CatalogBuilderConfiguration runConfiguration,
                                           boolean create)
                                    throws IOException
Create or load a GranuleCatalog on top of the provided configuration

Parameters:
runConfiguration -
create - if true create a new catalog, otherwise it is loaded
Returns:
Throws:
IOException

createGranuleCatalogProperties

public static Properties createGranuleCatalogProperties(File datastoreProperties)
                                                 throws IOException
Throws:
IOException

createGranuleCatalogFromDatastore

public static GranuleCatalog createGranuleCatalogFromDatastore(File parent,
                                                               File datastoreProperties,
                                                               boolean create,
                                                               Hints hints)
                                                        throws IOException
Create a granule catalog from a datastore properties file

Parameters:
parent -
datastoreProperties -
create -
hints -
Returns:
Throws:
IOException

createSchema

public static SimpleFeatureType createSchema(CatalogBuilderConfiguration runConfiguration,
                                             String name,
                                             CoordinateReferenceSystem actualCRS)
Create a SimpleFeatureType from the specified configuration.

Parameters:
configurationBean -
actualCRS -
Returns:

getRelativePath

public static String getRelativePath(String targetPath,
                                     String basePath,
                                     String pathSeparator)
Get the relative path from one file to another, specifying the directory separator. If one of the provided resources does not exist, it is assumed to be a file unless it ends with '/' or '\'.

Parameters:
targetPath - targetPath is calculated to this file
basePath - basePath is calculated from this file
pathSeparator - directory separator. The platform default is not assumed so that we can test Unix behaviour when running on Windows (for example)
Returns:


Copyright © 1996-2014 Geotools. All Rights Reserved.