Class MajorObject
- java.lang.Object
-
- org.gdal.gdal.MajorObject
-
public class MajorObject extends java.lang.Object
Class used for object with metadata.The MajorObject class is a binding for the C++ GDALMajorObject class.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
java.lang.String
GetDescription()
Fetch object description.java.util.Hashtable
GetMetadata_Dict()
Fetch metadata.java.util.Hashtable
GetMetadata_Dict(java.lang.String domain)
Fetch metadata.java.util.Vector
GetMetadata_List()
Fetch metadata.java.util.Vector
GetMetadata_List(java.lang.String domain)
Fetch metadata.java.util.Vector
GetMetadataDomainList()
java.lang.String
GetMetadataItem(java.lang.String name)
Fetch single metadata item.java.lang.String
GetMetadataItem(java.lang.String name, java.lang.String domain)
Fetch single metadata item.void
SetDescription(java.lang.String newDescription)
Set object description.int
SetMetadata(java.lang.String metadataString)
Set metadata.int
SetMetadata(java.lang.String metadataString, java.lang.String domain)
Set metadata.int
SetMetadata(java.util.Hashtable metadata)
Set metadata.int
SetMetadata(java.util.Hashtable metadata, java.lang.String domain)
Set metadata.int
SetMetadata(java.util.Vector metadata)
Set metadata.int
SetMetadata(java.util.Vector metadata, java.lang.String domain)
Set metadata.int
SetMetadataItem(java.lang.String name, java.lang.String value)
Set single metadata item.int
SetMetadataItem(java.lang.String name, java.lang.String value, java.lang.String domain)
Set single metadata item.
-
-
-
Method Detail
-
delete
public void delete()
-
SetMetadata
public int SetMetadata(java.util.Hashtable metadata, java.lang.String domain)
Set metadata.The metadata is set into the domain specified.
- Parameters:
metadata
- the metadata as a table of (key, value) tuples to applydomain
- the domain of interest. Use "" or null for the default domain.- Returns:
- gdalconst.CE_None on success, gdalconst.CE_Failure on failure and gdalconst.CE_Warning if the metadata has been accepted, but is likely not maintained persistently by the underlying object between sessions.
-
SetMetadata
public int SetMetadata(java.util.Hashtable metadata)
Set metadata.The metadata is set into the default domain
- Returns:
- gdalconst.CE_None on success, gdalconst.CE_Failure on failure and gdalconst.CE_Warning if the metadata has been accepted, but is likely not maintained persistently by the underlying object between sessions.
- Since:
- Java bindings 1.7.0
-
GetDescription
public java.lang.String GetDescription()
Fetch object description.The semantics of the returned description are specific to the derived type. For Dataset object it is the dataset name. For Band object it is actually a description (if supported) or "".
- Returns:
- description
-
SetDescription
public void SetDescription(java.lang.String newDescription)
Set object description.The semantics of the returned description are specific to the derived type. For Dataset object it is the dataset name. For Band object it is actually a description (if supported) or "". Normally application code should not set the "description" for GDALDatasets. It is handled internally.
- Parameters:
newDescription
- new description
-
GetMetadataDomainList
public java.util.Vector GetMetadataDomainList()
-
GetMetadata_Dict
public java.util.Hashtable GetMetadata_Dict(java.lang.String domain)
Fetch metadata. Returns metadata as (key, value) tuples in the result table- Parameters:
domain
- the domain of interest. Use "" or null for the default domain.- Returns:
- null or a hash table with metadata
-
GetMetadata_Dict
public java.util.Hashtable GetMetadata_Dict()
Fetch metadata. Returns metadata from the default domain as (key, value) tuples in the result table- Returns:
- null or a hash table with metadata
- Since:
- Java bindings 1.7.0
-
GetMetadata_List
public java.util.Vector GetMetadata_List(java.lang.String domain)
Fetch metadata. Returns metadata as a vector of strings of the format "KEY=VALUE".- Parameters:
domain
- the domain of interest. Use "" or null for the default domain.- Returns:
- null or a vector of strings
-
GetMetadata_List
public java.util.Vector GetMetadata_List()
Fetch metadata.Returns metadata from the default domain as a vector of strings of the format "KEY=VALUE".
- Returns:
- null or a vector of strings
- Since:
- Java bindings 1.7.0
-
SetMetadata
public int SetMetadata(java.util.Vector metadata, java.lang.String domain)
Set metadata.The metadata is set into the domain specified.
- Parameters:
metadata
- the metadata to apply as a vector of strings of the format "KEY=VALUE".domain
- the domain of interest. Use "" or null for the default domain.- Returns:
- gdalconst.CE_None on success, gdalconst.CE_Failure on failure and gdalconst.CE_Warning if the metadata has been accepted, but is likely not maintained persistently by the underlying object between sessions.
- Since:
- Java bindings 1.7.0
-
SetMetadata
public int SetMetadata(java.util.Vector metadata)
Set metadata.The metadata is set into the default domain
- Parameters:
metadata
- the metadata to apply as a vector of strings of the format "KEY=VALUE".- Returns:
- gdalconst.CE_None on success, gdalconst.CE_Failure on failure and gdalconst.CE_Warning if the metadata has been accepted, but is likely not maintained persistently by the underlying object between sessions.
- Since:
- Java bindings 1.7.0
-
SetMetadata
public int SetMetadata(java.lang.String metadataString, java.lang.String domain)
Set metadata.The metadata is set into the domain specified.
- Parameters:
metadataString
- the metadata to apply as a string of the format "KEY=VALUE".domain
- the domain of interest. Use "" or null for the default domain.- Returns:
- gdalconst.CE_None on success, gdalconst.CE_Failure on failure and gdalconst.CE_Warning if the metadata has been accepted, but is likely not maintained persistently by the underlying object between sessions.
-
SetMetadata
public int SetMetadata(java.lang.String metadataString)
Set metadata.The metadata is set into the default domain
- Parameters:
metadataString
- the metadata to apply as a string of the format "KEY=VALUE".- Returns:
- gdalconst.CE_None on success, gdalconst.CE_Failure on failure and gdalconst.CE_Warning if the metadata has been accepted, but is likely not maintained persistently by the underlying object between sessions.
- Since:
- Java bindings 1.7.0
-
GetMetadataItem
public java.lang.String GetMetadataItem(java.lang.String name, java.lang.String domain)
Fetch single metadata item.- Parameters:
name
- the key for the metadata item to fetch.domain
- the domain to fetch for, use null for the default domain.- Returns:
- null on failure to find the key, or the value string on success.
-
GetMetadataItem
public java.lang.String GetMetadataItem(java.lang.String name)
Fetch single metadata item.The metadata item is searched into the default domain.
- Parameters:
name
- the key for the metadata item to fetch.- Returns:
- null on failure to find the key, or the value string on success.
- Since:
- Java bindings 1.7.0
-
SetMetadataItem
public int SetMetadataItem(java.lang.String name, java.lang.String value, java.lang.String domain)
Set single metadata item.- Parameters:
name
- the key for the metadata item to fetch.value
- the value to assign to the key.domain
- the domain to set within, use null for the default domain.- Returns:
- gdalconst.CE_None on success, or an error code on failure.
-
SetMetadataItem
public int SetMetadataItem(java.lang.String name, java.lang.String value)
Set single metadata item.The metadata item is set into the default domain.
- Parameters:
name
- the key for the metadata item to fetch.value
- the value to assign to the key.- Returns:
- gdalconst.CE_None on success, or an error code on failure.
- Since:
- Java bindings 1.7.0
-
-