public class AncillaryFileManager extends Object implements FileSetManager
Since 14.x is it also possible to store the catalog into a PostGis based DB
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 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
|
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
IOException
JAXBException
- TODO: Need to check for thread safety
public Name getCoverageName(String varName)
Name
representation of the coverage namevarName
- public void dispose()
public Slice2DIndex getSlice2DIndex(int imageIndex) throws IOException
Slice2DIndex
related to the provided imageIndeximageIndex
- IOException
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)
coverage
- public boolean acceptsVariable(String varName)
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)
Copyright © 1996–2019 Geotools. All rights reserved.