public class AncillaryFileManager extends Object implements FileSetManager
Since 14.x is it also possible to store the catalog into a PostGis based DB
Modifier and Type | Field and Description |
---|---|
protected static Map<String,DataStoreConfiguration> |
DATASTORE_CONFIG_CACHE |
protected static Map<String,Indexer> |
INDEXER_CACHE |
Constructor and Description |
---|
AncillaryFileManager(File netcdfFile,
String indexFilePath) |
AncillaryFileManager(File netcdfFile,
String indexFilePath,
String datastoreFilePath) |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsVariable(String varName) |
Indexer.Coverages.Coverage |
addCoverage(String varName) |
void |
addFile(String filePath)
Add a file to the file set manager
|
void |
addSlice(Slice2DIndex variableIndex) |
static void |
clearCache()
Clear the parsed configs (datastore and indexer) cache
|
static String |
convertToHex(byte[] data) |
void |
dispose()
Dispose the Manager
|
Name |
getCoverageName(String varName)
Return a
Name representation of the coverage name |
List<Name> |
getCoveragesNames()
Get the list of Names for the underlying coverage list
|
DataStoreConfiguration |
getDatastoreConfiguration()
Create the
DataStoreConfiguration using the external datastoreIndexFile if provided,
or the H2 based default. |
File |
getDatastoreIndexFile() |
File |
getDestinationDir() |
File |
getIndexerFile() |
String |
getParameter(String parameterKey) |
boolean |
getParameterAsBoolean(String parameterKey) |
Slice2DIndex |
getSlice2DIndex(int imageIndex)
Return a
Slice2DIndex related to the provided imageIndex |
File |
getSlicesIndexFile() |
String |
getTypeName(String coverageName) |
protected void |
initIndexer()
Retrieve basic indexer properties by scanning the indexer XML instance.
|
void |
initSliceManager() |
boolean |
isImposedSchema() |
List<String> |
list()
Return the list of all the files currently added to the manager
|
void |
purge()
Remove all the files from the manager (An implementation may also physically remove all the
files)
|
void |
removeFile(String filePath)
Remove a file from the manager (An implementation may also physically remove the file)
|
void |
resetSliceManager() |
String |
setSchema(Indexer.Coverages.Coverage coverage,
String schemaName,
String schemaDef)
Add the default schema to this coverage
|
void |
writeToDisk()
Write indexer to disk
TODO: Need to check for thread safety
|
protected static final Map<String,DataStoreConfiguration> DATASTORE_CONFIG_CACHE
public AncillaryFileManager(File netcdfFile, String indexFilePath) throws IOException, JAXBException, NoSuchAlgorithmException
public AncillaryFileManager(File netcdfFile, String indexFilePath, String datastoreFilePath) throws IOException, JAXBException, NoSuchAlgorithmException
public void writeToDisk() throws IOException, JAXBException
TODO: Need to check for thread safety
IOException
JAXBException
public Name getCoverageName(String varName)
Name
representation of the coverage namepublic void dispose()
public Slice2DIndex getSlice2DIndex(int imageIndex) throws IOException
Slice2DIndex
related to the provided imageIndexIOException
public File getSlicesIndexFile()
public File getIndexerFile()
public File getDestinationDir()
public File getDatastoreIndexFile()
public void addSlice(Slice2DIndex variableIndex)
public Indexer.Coverages.Coverage addCoverage(String varName)
public void initSliceManager() throws IOException
IOException
public void resetSliceManager() throws IOException
IOException
public List<Name> getCoveragesNames()
protected void initIndexer() throws JAXBException
JAXBException
public String setSchema(Indexer.Coverages.Coverage coverage, String schemaName, String schemaDef)
public boolean acceptsVariable(String varName)
public boolean isImposedSchema()
public void addFile(String filePath)
FileSetManager
addFile
in interface FileSetManager
public List<String> list()
FileSetManager
list
in interface FileSetManager
public void removeFile(String filePath)
FileSetManager
removeFile
in interface FileSetManager
public void purge()
FileSetManager
purge
in interface FileSetManager
public static String convertToHex(byte[] data)
public DataStoreConfiguration getDatastoreConfiguration() throws IOException
DataStoreConfiguration
using the external datastoreIndexFile if provided,
or the H2 based default.IOException
public boolean getParameterAsBoolean(String parameterKey)
public static void clearCache()
Copyright © 1996–2023 Geotools. All rights reserved.