Package org.geotools.imageio.netcdf
Class AncillaryFileManager
Object
AncillaryFileManager
- All Implemented Interfaces:
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAncillaryFileManager(File netcdfFile, String indexFilePath) AncillaryFileManager(File netcdfFile, String indexFilePath, String datastoreFilePath) -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptsVariable(String varName) addCoverage(String varName) voidAdd a file to the file set managervoidaddSlice(Slice2DIndex variableIndex) static voidClear the parsed configs (datastore and indexer) cachestatic StringconvertToHex(byte[] data) voiddispose()Dispose the ManagergetCoverageName(String varName) Return aNamerepresentation of the coverage nameGet the list of Names for the underlying coverage listCreate theDataStoreConfigurationusing the external datastoreIndexFile if provided, or the H2 based default.getParameter(String parameterKey) booleangetParameterAsBoolean(String parameterKey) getSlice2DIndex(int imageIndex) Return aSlice2DIndexrelated to the provided imageIndexgetTypeName(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)protected voidRetrieve basic indexer properties by scanning the indexer XML instance.voidbooleanlist()Return the list of all the files currently added to the managervoidpurge()Remove all the files from the manager (An implementation may also physically remove all the files)voidremoveFile(String filePath) Remove a file from the manager (An implementation may also physically remove the file)voidsetSchema(Indexer.Coverages.Coverage coverage, String schemaName, String schemaDef) Add the default schema to this coveragevoidWrite indexer to disk
-
Field Details
-
INDEXER_CACHE
-
DATASTORE_CONFIG_CACHE
-
-
Constructor Details
-
AncillaryFileManager
public AncillaryFileManager(File netcdfFile, String indexFilePath) throws IOException, JAXBException, NoSuchAlgorithmException - Throws:
IOExceptionJAXBExceptionNoSuchAlgorithmException
-
AncillaryFileManager
public AncillaryFileManager(File netcdfFile, String indexFilePath, String datastoreFilePath) throws IOException, JAXBException, NoSuchAlgorithmException - Throws:
IOExceptionJAXBExceptionNoSuchAlgorithmException
-
-
Method Details
-
writeToDisk
Write indexer to diskTODO: Need to check for thread safety
- Throws:
IOExceptionJAXBException
-
getCoverageName
Return aNamerepresentation of the coverage name -
dispose
public void dispose()Dispose the Manager -
getSlice2DIndex
Return aSlice2DIndexrelated to the provided imageIndex- Throws:
IOException
-
getSlicesIndexFile
-
getIndexerFile
-
getDestinationDir
-
getDatastoreIndexFile
-
addSlice
-
addCoverage
-
initSliceManager
- Throws:
IOException
-
resetSliceManager
- Throws:
IOException
-
getCoveragesNames
Get the list of Names for the underlying coverage list -
initIndexer
protected void initIndexer() throws JAXBExceptionRetrieve basic indexer properties by scanning the indexer XML instance.- Throws:
JAXBException
-
getTypeName
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
Add the default schema to this coverage -
acceptsVariable
-
isImposedSchema
public boolean isImposedSchema() -
addFile
Description copied from interface:FileSetManagerAdd a file to the file set manager- Specified by:
addFilein interfaceFileSetManager
-
list
Description copied from interface:FileSetManagerReturn the list of all the files currently added to the manager- Specified by:
listin interfaceFileSetManager
-
removeFile
Description copied from interface:FileSetManagerRemove a file from the manager (An implementation may also physically remove the file)- Specified by:
removeFilein interfaceFileSetManager
-
purge
public void purge()Description copied from interface:FileSetManagerRemove all the files from the manager (An implementation may also physically remove all the files)- Specified by:
purgein interfaceFileSetManager
-
convertToHex
-
getDatastoreConfiguration
Create theDataStoreConfigurationusing the external datastoreIndexFile if provided, or the H2 based default.- Throws:
IOException
-
getParameter
-
getParameterAsBoolean
-
clearCache
public static void clearCache()Clear the parsed configs (datastore and indexer) cache
-