Package edu.wisc.ssec.mcidasv.data
Class HeaderInfo
java.lang.Object
edu.wisc.ssec.mcidasv.data.HeaderInfo
- Direct Known Subclasses:
AxformInfo
,EnviInfo
"Base" class that represents several different types of header
files.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
private String
Path to header file.static final String
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final String
static final String
static final String
static final int
static final int
static final int
static final String
static final String
static final String
static final String
static final String
private Hashtable
Map containing relevant parameters and values inheaderFile
.static final String
-
Constructor Summary
ConstructorsConstructorDescriptionCtor for xml encodingHeaderInfo
(File thisFile) CTORHeaderInfo
(String filename) CTOR -
Method Summary
Modifier and TypeMethodDescriptionboolean
Does the file we are pointing to even exist?int
Get the current header's band count.Get the file being used.getParameter
(String parameter, Boolean defaultValue) ReturnBoolean
value associated withparameter
.getParameter
(String parameter, Float defaultValue) ReturnFloat
value associated withparameter
.getParameter
(String parameter, Integer defaultValue) ReturnInteger
value associated withparameter
.getParameter
(String parameter, String defaultValue) ReturnString
value associated withparameter
.getParameter
(String parameter, List defaultValue) ReturnList
associated withparameter
.boolean
Have we already parsed once?protected void
Override this when extending for a specific header typevoid
setFilename
(String filename) Set the file name to be used.void
setParameter
(String parameter, Object value) Set a parsed parameter value.
-
Field Details
-
kFormatUnknown
- See Also:
-
kFormatASCII
- See Also:
-
kFormat1ByteUInt
- See Also:
-
kFormat2ByteSInt
- See Also:
-
kFormat4ByteSInt
- See Also:
-
kFormat4ByteFloat
- See Also:
-
kFormat8ByteDouble
- See Also:
-
kFormat2x8Byte
- See Also:
-
kFormat2ByteUInt
- See Also:
-
kFormatImage
- See Also:
-
kInterleaveSequential
- See Also:
-
kInterleaveByLine
- See Also:
-
kInterleaveByPixel
- See Also:
-
DESCRIPTION
- See Also:
-
ELEMENTS
- See Also:
-
LINES
- See Also:
-
UNIT
- See Also:
-
OFFSET
- See Also:
-
DATATYPE
- See Also:
-
MISSINGVALUE
- See Also:
-
BANDNAMES
- See Also:
-
BANDFILES
- See Also:
-
INTERLEAVE
- See Also:
-
BYTEORDER
- See Also:
-
BIGENDIAN
- See Also:
-
NAVBOUNDS
- See Also:
-
NAVFILES
- See Also:
-
headerFile
Path to header file. -
parameters
Map containing relevant parameters and values inheaderFile
.
-
-
Constructor Details
-
HeaderInfo
public HeaderInfo()Ctor for xml encoding -
HeaderInfo
CTOR- Parameters:
thisFile
- File to use. Cannot benull
.
-
HeaderInfo
CTOR- Parameters:
filename
- File containing header information.
-
-
Method Details
-
setFilename
Set the file name to be used.- Parameters:
filename
- File containing header information.
-
getFilename
Get the file being used.- Returns:
- File in use.
-
getBandCount
Get the current header's band count.- Returns:
- Number of bands.
-
getParameter
ReturnString
value associated withparameter
.- Parameters:
parameter
- Parameter name.defaultValue
- Value to return ifparameter
does not exist.- Returns:
- Either the
List
associated withparameter
, ordefaultValue
.
-
getParameter
ReturnInteger
value associated withparameter
.- Parameters:
parameter
- Parameter name.defaultValue
- Value to return ifparameter
does not exist.- Returns:
- Either the
Integer
associated withparameter
, ordefaultValue
.
-
getParameter
ReturnFloat
value associated withparameter
.- Parameters:
parameter
- Parameter name.defaultValue
- Value to return ifparameter
does not exist.- Returns:
- Either the
Float
associated withparameter
, ordefaultValue
.
-
getParameter
ReturnBoolean
value associated withparameter
.- Parameters:
parameter
- Parameter name.defaultValue
- Value to return ifparameter
does not exist.- Returns:
- Either the
Boolean
associated withparameter
, ordefaultValue
.
-
getParameter
ReturnList
associated withparameter
.- Parameters:
parameter
- Parameter name.defaultValue
- Value to return ifparameter
does not exist.- Returns:
- Either the
List
associated withparameter
, ordefaultValue
.
-
setParameter
Set a parsed parameter value.- Parameters:
parameter
- Parameter name.value
- Value associated withparameter
.
-
haveParsed
Have we already parsed once?- Returns:
true
ifparameters
has at least entry.
-
doesExist
Does the file we are pointing to even exist?- Returns:
- Whether or not
headerFile
exists.
-
parseHeader
Override this when extending for a specific header type
-