edu.wisc.ssec.mcidasv.data
Class HeaderInfo

java.lang.Object
  extended by edu.wisc.ssec.mcidasv.data.HeaderInfo
Direct Known Subclasses:
AxformInfo, EnviInfo

public class HeaderInfo
extends Object


Field Summary
static String BANDFILES
           
static String BANDNAMES
           
static String BIGENDIAN
           
static String BYTEORDER
           
static String DATATYPE
           
static String DESCRIPTION
           
static String ELEMENTS
           
private  String headerFile
          The url
static String INTERLEAVE
           
static int kFormat1ByteUInt
           
static int kFormat2ByteSInt
           
static int kFormat2ByteUInt
           
static int kFormat2x8Byte
           
static int kFormat4ByteFloat
           
static int kFormat4ByteSInt
           
static int kFormat8ByteDouble
           
static int kFormatASCII
           
static int kFormatImage
           
static int kFormatUnknown
           
static String kInterleaveByLine
           
static String kInterleaveByPixel
           
static String kInterleaveSequential
           
static int kNavigationBounds
           
static int kNavigationFiles
           
static int kNavigationUnknown
           
static String LINES
           
static String MISSINGVALUE
           
static String NAVBOUNDS
           
static String NAVFILES
           
static String OFFSET
           
private  Hashtable parameters
           
static String UNIT
           
 
Constructor Summary
HeaderInfo()
          Ctor for xml encoding
HeaderInfo(File thisFile)
          CTOR
HeaderInfo(String filename)
          CTOR
 
Method Summary
 boolean doesExist()
          Does the file we are pointing to even exist?
 int getBandCount()
          Get the number of bands this header knows about
 String getFilename()
          Get the filename we are working with
 Boolean getParameter(String parameter, Boolean defaultValue)
           
 Float getParameter(String parameter, Float defaultValue)
           
 Integer getParameter(String parameter, Integer defaultValue)
           
 List getParameter(String parameter, List defaultValue)
           
 String getParameter(String parameter, String defaultValue)
          Return the matching header parameter if available, default value if not available
 boolean haveParsed()
          Have we already parsed once?
protected  void parseHeader()
          Override this when extending for a specific header type
 void setFilename(String filename)
          Set the filename we are working with
 void setParameter(String parameter, Object value)
          Set a parsed parameter value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

kFormatUnknown

public static final int kFormatUnknown
See Also:
Constant Field Values

kFormatASCII

public static final int kFormatASCII
See Also:
Constant Field Values

kFormat1ByteUInt

public static final int kFormat1ByteUInt
See Also:
Constant Field Values

kFormat2ByteSInt

public static final int kFormat2ByteSInt
See Also:
Constant Field Values

kFormat4ByteSInt

public static final int kFormat4ByteSInt
See Also:
Constant Field Values

kFormat4ByteFloat

public static final int kFormat4ByteFloat
See Also:
Constant Field Values

kFormat8ByteDouble

public static final int kFormat8ByteDouble
See Also:
Constant Field Values

kFormat2x8Byte

public static final int kFormat2x8Byte
See Also:
Constant Field Values

kFormat2ByteUInt

public static final int kFormat2ByteUInt
See Also:
Constant Field Values

kFormatImage

public static final int kFormatImage
See Also:
Constant Field Values

kNavigationUnknown

public static final int kNavigationUnknown
See Also:
Constant Field Values

kNavigationBounds

public static final int kNavigationBounds
See Also:
Constant Field Values

kNavigationFiles

public static final int kNavigationFiles
See Also:
Constant Field Values

kInterleaveSequential

public static final String kInterleaveSequential
See Also:
Constant Field Values

kInterleaveByLine

public static final String kInterleaveByLine
See Also:
Constant Field Values

kInterleaveByPixel

public static final String kInterleaveByPixel
See Also:
Constant Field Values

DESCRIPTION

public static final String DESCRIPTION
See Also:
Constant Field Values

ELEMENTS

public static final String ELEMENTS
See Also:
Constant Field Values

LINES

public static final String LINES
See Also:
Constant Field Values

UNIT

public static final String UNIT
See Also:
Constant Field Values

OFFSET

public static final String OFFSET
See Also:
Constant Field Values

DATATYPE

public static final String DATATYPE
See Also:
Constant Field Values

MISSINGVALUE

public static final String MISSINGVALUE
See Also:
Constant Field Values

BANDNAMES

public static final String BANDNAMES
See Also:
Constant Field Values

BANDFILES

public static final String BANDFILES
See Also:
Constant Field Values

INTERLEAVE

public static final String INTERLEAVE
See Also:
Constant Field Values

BYTEORDER

public static final String BYTEORDER
See Also:
Constant Field Values

BIGENDIAN

public static final String BIGENDIAN
See Also:
Constant Field Values

NAVBOUNDS

public static final String NAVBOUNDS
See Also:
Constant Field Values

NAVFILES

public static final String NAVFILES
See Also:
Constant Field Values

headerFile

private String headerFile
The url


parameters

private Hashtable parameters
Constructor Detail

HeaderInfo

public HeaderInfo()
Ctor for xml encoding


HeaderInfo

public HeaderInfo(File thisFile)
CTOR

Parameters:
filename - The filename

HeaderInfo

public HeaderInfo(String filename)
CTOR

Parameters:
filename - The filename
Method Detail

setFilename

public void setFilename(String filename)
Set the filename we are working with


getFilename

public String getFilename()
Get the filename we are working with


getBandCount

public int getBandCount()
Get the number of bands this header knows about


getParameter

public String getParameter(String parameter,
                           String defaultValue)
Return the matching header parameter if available, default value if not available


getParameter

public Integer getParameter(String parameter,
                            Integer defaultValue)

getParameter

public Float getParameter(String parameter,
                          Float defaultValue)

getParameter

public Boolean getParameter(String parameter,
                            Boolean defaultValue)

getParameter

public List getParameter(String parameter,
                         List defaultValue)

setParameter

public void setParameter(String parameter,
                         Object value)
Set a parsed parameter value


haveParsed

public boolean haveParsed()
Have we already parsed once?


doesExist

public boolean doesExist()
Does the file we are pointing to even exist?


parseHeader

protected void parseHeader()
Override this when extending for a specific header type