Class AncillaryFileManager

Object
AncillaryFileManager
All Implemented Interfaces:
FileSetManager

public class AncillaryFileManager extends Object implements FileSetManager
A class used to store any auxiliary indexing information such as the low level indexer definition as well as the datastore properties configuration specifying where to build that index.

Since 14.x is it also possible to store the catalog into a PostGis based DB

Author:
Daniele Romagnoli, GeoSolutions SAS
  • Field Details

  • Constructor Details

  • Method Details

    • writeToDisk

      public void writeToDisk() throws IOException, JAXBException
      Write indexer to disk

      TODO: Need to check for thread safety

      Throws:
      IOException
      JAXBException
    • getCoverageName

      public Name getCoverageName(String varName)
      Return a Name representation of the coverage name
    • dispose

      public void dispose()
      Dispose the Manager
    • getSlice2DIndex

      public Slice2DIndex getSlice2DIndex(int imageIndex) throws IOException
      Return a Slice2DIndex related to the provided imageIndex
      Throws:
      IOException
    • getSlicesIndexFile

      public File getSlicesIndexFile()
    • getIndexerFile

      public File getIndexerFile()
    • getDestinationDir

      public File getDestinationDir()
    • getDatastoreIndexFile

      public File getDatastoreIndexFile()
    • addSlice

      public void addSlice(Slice2DIndex variableIndex)
    • addCoverage

      public Indexer.Coverages.Coverage addCoverage(String varName)
    • initSliceManager

      public void initSliceManager() throws IOException
      Throws:
      IOException
    • resetSliceManager

      public void resetSliceManager() throws IOException
      Throws:
      IOException
    • getCoveragesNames

      public List<Name> getCoveragesNames()
      Get the list of Names for the underlying coverage list
    • initIndexer

      protected void initIndexer() throws JAXBException
      Retrieve basic indexer properties by scanning the indexer XML instance.
      Throws:
      JAXBException
    • getTypeName

      public String getTypeName(String coverageName)
      Returns the schema definition name for a given coverage (the schema definition name is not normally used in the database, which uses the coverage name instead)
    • setSchema

      public String setSchema(Indexer.Coverages.Coverage coverage, String schemaName, String schemaDef)
      Add the default schema to this coverage
    • acceptsVariable

      public boolean acceptsVariable(String varName)
    • isImposedSchema

      public boolean isImposedSchema()
    • addFile

      public void addFile(String filePath)
      Description copied from interface: FileSetManager
      Add a file to the file set manager
      Specified by:
      addFile in interface FileSetManager
    • list

      public List<String> list()
      Description copied from interface: FileSetManager
      Return the list of all the files currently added to the manager
      Specified by:
      list in interface FileSetManager
    • removeFile

      public void removeFile(String filePath)
      Description copied from interface: FileSetManager
      Remove a file from the manager (An implementation may also physically remove the file)
      Specified by:
      removeFile in interface FileSetManager
    • purge

      public void purge()
      Description copied from interface: FileSetManager
      Remove all the files from the manager (An implementation may also physically remove all the files)
      Specified by:
      purge in interface FileSetManager
    • convertToHex

      public static String convertToHex(byte[] data)
    • getDatastoreConfiguration

      public DataStoreConfiguration getDatastoreConfiguration() throws IOException
      Create the DataStoreConfiguration using the external datastoreIndexFile if provided, or the H2 based default.
      Throws:
      IOException
    • getParameter

      public String getParameter(String parameterKey)
    • getParameterAsBoolean

      public boolean getParameterAsBoolean(String parameterKey)
    • clearCache

      public static void clearCache()
      Clear the parsed configs (datastore and indexer) cache