moos.ssds.model
Interface IHeaderDescription

All Superinterfaces:
java.io.Serializable, ValueObject
All Known Implementing Classes:
HeaderDescription

public interface IHeaderDescription
extends java.io.Serializable, ValueObject

This class represents a interface for a description of header sections in DataFile. It is used for DataFile processing and parsing.


Version:
: $Revision: 1.2 $

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement. This information should not be published or distributed to third parties without specific written permission from MBARI.


Copyright 2002 MBARI.
MBARI Proprietary Information. All rights reserved.



Author:
: $Author: kgomes $
See Also:
CommentTag, ICommentTag, HeaderDescription, IDataFile, DataFile

Method Summary
 void addCommentTag(ICommentTag tag)
          This method takes in a CommentTag and adds it to the ArrayList
 void addCommentTag(java.lang.String tag)
          This method takes in a string and adds a CommentTag to the ArrayList
 java.util.Collection commentTagsAsStrings()
          This method returns a collection of Strings that represent the CommentTag objects in the ArrayList.
 long getByteOffset()
          This method returns the number of bytes that the HeaderDescription is located at in the DataFile
 java.util.Collection getCommentTags()
          This method returns the collection of CommentTagss for this HeaderDescription.
 java.lang.String getDescription()
          This method retrieves the description of the HeaderDescription
 java.lang.Long getId()
          This is the method used to retrieve the unique identifier for the HeaderDescription
 int getNumHeaderLines()
          This method retrieves the number of lines that this HeaderDescription spans.
 boolean hasByteOffset()
          This method indicates whether or not this HeaderDescription has a byteOffset in the DataFile
 boolean hasCommentTags()
          This method returns the result of a check to see if any CommentTags are present in the HeaderDescription.
 boolean hasHeaderLines()
          This returns a boolean that indicates if there are header lines in this HeaderDescription
 java.util.Collection listCommentTags()
          This method returns a collection of Strings that represent the CommentTag objects in the ArrayList.
 void removeCommentTag(ICommentTag tag)
          This method removes a CommentTag from ArrayList.
 void removeCommentTag(java.lang.String tag)
          This method removes a CommentTag from ArrayList.
 void setByteOffset(long byteOffset)
          This method is used to set the number of bytes that the HeaderDescription is offset in the DataFile
 void setByteOffset(java.lang.String byteOffset)
          This method is used to set the number of bytes that the HeaderDescription is offset in the DataFile but takes a string representation of that number as a parameter
 void setDataFile(IDataFile file)
          TODO kgomes: Change this to protected? This should NOT be public.
 void setDescription(java.lang.String description)
          This method is used to set the description of the HeaderDescription
 void setId(java.lang.Long id)
          This method is used to set the unique identifier for the HeaderDescription
 void setNumHeaderLines(int numHeaderLines)
          This method sets the number of lines that the HeaderDescription spans
 void setNumHeaderLines(java.lang.String numHeaderLines)
          This method sets the number of header lines, but takes a string representation of that number as an input
 

Method Detail

getId

public java.lang.Long getId()
This is the method used to retrieve the unique identifier for the HeaderDescription

Specified by:
getId in interface ValueObject
Returns:
The Long that is the unique identifier

setId

public void setId(java.lang.Long id)
This method is used to set the unique identifier for the HeaderDescription

Specified by:
setId in interface ValueObject
Parameters:
id - is the Long that will be the unique identifier

getDescription

public java.lang.String getDescription()
This method retrieves the description of the HeaderDescription

Returns:
A string that is the description

setDescription

public void setDescription(java.lang.String description)
This method is used to set the description of the HeaderDescription

Parameters:
description - is the String used to set the description

getByteOffset

public long getByteOffset()
This method returns the number of bytes that the HeaderDescription is located at in the DataFile


setByteOffset

public void setByteOffset(long byteOffset)
This method is used to set the number of bytes that the HeaderDescription is offset in the DataFile


setByteOffset

public void setByteOffset(java.lang.String byteOffset)
This method is used to set the number of bytes that the HeaderDescription is offset in the DataFile but takes a string representation of that number as a parameter

Parameters:
byteOffset - is a string representation of the number of bytes the HeaderDesription is offset

hasByteOffset

public boolean hasByteOffset()
This method indicates whether or not this HeaderDescription has a byteOffset in the DataFile

Returns:
a boolean that is true if there is a byte offset, false otherwise.

getNumHeaderLines

public int getNumHeaderLines()
This method retrieves the number of lines that this HeaderDescription spans.

Returns:
An integer representing the number of lines the HeaderDescription spans

setNumHeaderLines

public void setNumHeaderLines(int numHeaderLines)
This method sets the number of lines that the HeaderDescription spans

Parameters:
numHeaderLines - is the number of lines the HeaderDescription spans

setNumHeaderLines

public void setNumHeaderLines(java.lang.String numHeaderLines)
This method sets the number of header lines, but takes a string representation of that number as an input

Parameters:
numHeaderLines - a String representation of the number of lines this HeaderDescription spans

hasHeaderLines

public boolean hasHeaderLines()
This returns a boolean that indicates if there are header lines in this HeaderDescription

Returns:
a boolean that is true if there are one or more header lines, false otherwise

addCommentTag

public void addCommentTag(ICommentTag tag)
This method takes in a CommentTag and adds it to the ArrayList

Parameters:
tag - is an object that implements the CommentTag interface that is added to the ArrayList

addCommentTag

public void addCommentTag(java.lang.String tag)
This method takes in a string and adds a CommentTag to the ArrayList

Parameters:
tag - is a String that will be the tagString of the CommentTag object that is added to the ArrayList

removeCommentTag

public void removeCommentTag(ICommentTag tag)
This method removes a CommentTag from ArrayList.

Parameters:
tag - is a CommentTag that has a tagString that is to be removed from the ArrayList

removeCommentTag

public void removeCommentTag(java.lang.String tag)
This method removes a CommentTag from ArrayList.

Parameters:
tag - is a String that is the tagString of a CommentTag object that is to be removed from the ArrayList

hasCommentTags

public boolean hasCommentTags()
This method returns the result of a check to see if any CommentTags are present in the HeaderDescription.

Returns:
a boolean that is true if there are CommentTags and false if not

listCommentTags

public java.util.Collection listCommentTags()
This method returns a collection of Strings that represent the CommentTag objects in the ArrayList.

Returns:
A collection of Strings that are the tagStrings from the CommentTag objects in the arrayList

commentTagsAsStrings

public java.util.Collection commentTagsAsStrings()
This method returns a collection of Strings that represent the CommentTag objects in the ArrayList.

Returns:
A collection of Strings that are the tagStrings from the CommentTag objects in the arrayList

getCommentTags

public java.util.Collection getCommentTags()
This method returns the collection of CommentTagss for this HeaderDescription. This method is protected because it should only be used by members of the model classes (specifically this class).

Returns:
A collection of the CommentTags

setDataFile

public void setDataFile(IDataFile file)
TODO kgomes: Change this to protected? This should NOT be public. ONly called by DataFile.setHeaderDescription()

Parameters:
file -