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 Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprivate StringPath to header file.static final Stringstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final intstatic final intstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprivate HashtableMap 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 TypeMethodDescriptionbooleanDoes the file we are pointing to even exist?intGet the current header's band count.Get the file being used.getParameter(String parameter, Boolean defaultValue) ReturnBooleanvalue associated withparameter.getParameter(String parameter, Float defaultValue) ReturnFloatvalue associated withparameter.getParameter(String parameter, Integer defaultValue) ReturnIntegervalue associated withparameter.getParameter(String parameter, String defaultValue) ReturnStringvalue associated withparameter.getParameter(String parameter, List defaultValue) ReturnListassociated withparameter.booleanHave we already parsed once?protected voidOverride this when extending for a specific header typevoidsetFilename(String filename) Set the file name to be used.voidsetParameter(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
ReturnStringvalue associated withparameter.- Parameters:
parameter- Parameter name.defaultValue- Value to return ifparameterdoes not exist.- Returns:
- Either the
Listassociated withparameter, ordefaultValue.
-
getParameter
ReturnIntegervalue associated withparameter.- Parameters:
parameter- Parameter name.defaultValue- Value to return ifparameterdoes not exist.- Returns:
- Either the
Integerassociated withparameter, ordefaultValue.
-
getParameter
ReturnFloatvalue associated withparameter.- Parameters:
parameter- Parameter name.defaultValue- Value to return ifparameterdoes not exist.- Returns:
- Either the
Floatassociated withparameter, ordefaultValue.
-
getParameter
ReturnBooleanvalue associated withparameter.- Parameters:
parameter- Parameter name.defaultValue- Value to return ifparameterdoes not exist.- Returns:
- Either the
Booleanassociated withparameter, ordefaultValue.
-
getParameter
ReturnListassociated withparameter.- Parameters:
parameter- Parameter name.defaultValue- Value to return ifparameterdoes not exist.- Returns:
- Either the
Listassociated withparameter, ordefaultValue.
-
setParameter
Set a parsed parameter value.- Parameters:
parameter- Parameter name.value- Value associated withparameter.
-
haveParsed
Have we already parsed once?- Returns:
trueifparametershas at least entry.
-
doesExist
Does the file we are pointing to even exist?- Returns:
- Whether or not
headerFileexists.
-
parseHeader
Override this when extending for a specific header type
-