Class GeoHeifStore
- All Implemented Interfaces:
AutoCloseable, Aggregate, Resource, Localized
-
Nested Class Summary
Nested classes/interfaces inherited from interface Resource
Resource.FileSetModifier and TypeInterfaceDescriptionstatic classPaths to the files potentially used by the enclosing resource. -
Field Summary
Fields inherited from class DataStore
listeners, providerModifier and TypeFieldDescriptionprotected final StoreListenersThe set of registeredStoreListeners for this data store.protected final DataStoreProviderThe factory that created thisDataStoreinstance, ornullif unspecified. -
Constructor Summary
ConstructorsConstructorDescriptionGeoHeifStore(DataStoreProvider provider, StorageConnector connector) Creates a new GeoHEIF store from the given file, URL or stream object. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this GeoHEIF store and releases any underlying resources.Collection<? extends Resource> Returns the children resources of this aggregate.Returns the paths to the files used by this GeoHEIF store.Returns an identifier constructed from the name of the HEIF file.Returns information about the dataset as a whole.Returns HEIF boxes and their fields as a tree for debugging purpose.Returns the parameters used to open this GeoHEIF data store.Methods inherited from class DataStore
addListener, findResource, getDisplayName, getLocale, getProvider, removeListener, setLocale, toStringModifier and TypeMethodDescription<T extends StoreEvent>
voidaddListener(Class<T> eventType, StoreListener<? super T> listener) Registers a listener to notify when the specified kind of event occurs in this data store or in a resource.findResource(String identifier) Searches for a resource identified by the given identifier.Returns a short name or label for this data store.The locale to use for formatting warnings and other messages.Returns the factory that created thisDataStoreinstance.<T extends StoreEvent>
voidremoveListener(Class<T> eventType, StoreListener<? super T> listener) Unregisters a listener previously added to this data store for the given type of events.voidsetLocale(Locale locale) Sets the locale to use for formatting warnings and other messages.Returns a string representation of this data store for debugging purpose.
-
Constructor Details
-
GeoHeifStore
public GeoHeifStore(DataStoreProvider provider, StorageConnector connector) throws DataStoreException Creates a new GeoHEIF store from the given file, URL or stream object. This constructor invokesStorageConnector.closeAllExcept(Object), keeping open only the needed resource.- Parameters:
provider- the factory that created thisDataStoreinstance, ornullif unspecified.connector- information about the storage (URL, stream, etc).- Throws:
DataStoreException- if an error occurred while opening the GeoHEIF file.
-
-
Method Details
-
getOpenParameters
Returns the parameters used to open this GeoHEIF data store. The parameters are described byGeoHeifStoreProvider.getOpenParameters()and contains at least a parameter named "location" with aURIvalue. The return value may be empty if the storage input cannot be described by a URI (for example a GeoHEIF file reading directly from aReadableByteChannel).- Specified by:
getOpenParametersin classDataStore- Returns:
- parameters used for opening this data store.
- See Also:
-
getFileSet
Returns the paths to the files used by this GeoHEIF store.- Specified by:
getFileSetin interfaceResource- Returns:
- files used by this GeoHEIF store.
- Throws:
DataStoreException- if an error occurred while preparing the set of files.
-
getIdentifier
Returns an identifier constructed from the name of the HEIF file. An identifier is available only if the storage input specified at construction time was something convertible toURI, for example anURL,FileorPath.- Specified by:
getIdentifierin interfaceResource- Overrides:
getIdentifierin classDataStore- Returns:
- the identifier derived from the filename.
- Throws:
DataStoreException- if an error occurred while fetching the identifier.- See Also:
-
getMetadata
Returns information about the dataset as a whole. The returned metadata object can contain information such as the spatiotemporal extent of the dataset, contact information about the creator or distributor, data quality, usage constraints and more.- Specified by:
getMetadatain interfaceResource- Specified by:
getMetadatain classDataStore- Returns:
- information about the dataset.
- Throws:
DataStoreException- if an error occurred while reading the data.- See Also:
-
getNativeMetadata
Returns HEIF boxes and their fields as a tree for debugging purpose. The boxes appear in the order they are declared in the file. Only the boxes and fields recognized by this HEIF store implementation are shown. The table contains the following columns:-
invalid reference
TableColumn#NAME
-
invalid reference
TableColumn#VALUE
-
invalid reference
TableColumn#VALUE_AS_TEXT
Usage and performance note
This method should not be invoked during normal operations. The standard metadata are preferred because they allow abstraction of data format details. Native metadata should be used only when an information does not appear in standard metadata, or for debugging purposes.Since this method should not be invoked in normal operations, it has not been tuned for performance. Invoking this method may cause a lot of seek operations.
- Overrides:
getNativeMetadatain classDataStore- Returns:
- resources information structured in an implementation-specific way.
- Throws:
DataStoreException- if an error occurred while reading the metadata.- "TODO:"
- It is sometime possible, through the tree cell values, to modify the content of internal arrays. This is unsafe, we should makes this implementation safer before this module is released.
-
-
components
Returns the children resources of this aggregate.- Specified by:
componentsin interfaceAggregate- Returns:
- all children resources that are components of this aggregate.
- Throws:
DataStoreException- if an error occurred while fetching the components.
-
close
Closes this GeoHEIF store and releases any underlying resources. This method can be invoked asynchronously for interrupting a long reading process.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein classDataStore- Throws:
DataStoreException- if an error occurred while closing the GeoHEIF file.- See Also:
-