saaps.dbt
Class ACEmagHourlyDB
java.lang.Object
|
+--saaps.dbt.Database
|
+--saaps.dbt.ACEmagHourlyDB
- public class ACEmagHourlyDB
- extends Database
ACEmagHourlyDB extends the Database class. It contains
the read and write methods that are used in
Database. The field is a vector of ACEmagHourly objects.
- See Also:
ACEmagHourly
Constructor Summary |
ACEmagHourlyDB()
|
ACEmagHourlyDB(int i)
|
ACEmagHourlyDB(java.util.Vector ACEV)
When a new class is added to the database this
constructor should be used which includes the
information that goes into the meta data file. |
Method Summary |
java.util.Date |
getDate(java.lang.Object obj)
Gets the date from this object. |
protected MetaData |
getEmptyMetaData(java.util.Date sd,
java.util.Date ed)
Returns an "empty" metadata object. |
java.util.Vector |
getLatestDatabaseObjects()
This method is implemented for Database abstract metod. |
protected void |
importAscii1(java.lang.String inputfile)
This method is used for importing ASCII data to our database. |
void |
myHello()
|
java.lang.Object |
read()
Gets the object at the current point in file. |
protected MetaData |
setDefaultMeta(java.util.Date sd,
java.util.Date ed)
Creates a metadata file for this class with the default values set
to the static values defined above. |
void |
write(java.lang.Object obj)
Writes data at the current point in file. |
Methods inherited from class saaps.dbt.Database |
close,
getDataGapValue,
getFirst,
getInstance,
getInstance,
getLast,
getTimeSeries,
getTimeSeries,
importAscii,
isSet,
position,
retrieve,
retrieve,
retrieve,
retrieve,
retrieveAVE,
retrieveAVE,
retrieveOTS,
retrieveSEA,
retrieveTS,
store,
store |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ACEmagHourlyDB
public ACEmagHourlyDB()
ACEmagHourlyDB
public ACEmagHourlyDB(int i)
ACEmagHourlyDB
public ACEmagHourlyDB(java.util.Vector ACEV)
throws java.io.IOException
- When a new class is added to the database this
constructor should be used which includes the
information that goes into the meta data file.
The arguments are: Vector of ACE objects, the class name,
a short description, continuos time series (false/true), and
if a continous time series the time step.
read
public java.lang.Object read()
throws java.io.IOException
- Description copied from class: Database
- Gets the object at the current point in file.
- Overrides:
- read in class Database
- Tags copied from class: Database
- Returns:
- an object from the database
- Throws:
- java.io.IOException - when reading fails
myHello
public void myHello()
write
public void write(java.lang.Object obj)
throws java.io.IOException
- Description copied from class: Database
- Writes data at the current point in file.
- Overrides:
- write in class Database
- Tags copied from class: Database
- Parameters:
dbo
- an object containg data to be written.- Throws:
- java.io.IOException - when writeing fails
getDate
public java.util.Date getDate(java.lang.Object obj)
- Description copied from class: Database
- Gets the date from this object.
See also
DatabaseObject.getDate()
.
- Overrides:
- getDate in class Database
- Tags copied from class: Database
- Parameters:
obj
- a database object- Returns:
- the
Date
for the input object
getLatestDatabaseObjects
public java.util.Vector getLatestDatabaseObjects()
- This method is implemented for Database abstract metod.
It retreives the latest data from the dataprovider and returns the vector of Database objects.
- Overrides:
- getLatestDatabaseObjects in class Database
importAscii1
protected void importAscii1(java.lang.String inputfile)
- This method is used for importing ASCII data to our database.
The format of the data is as output from ExportAscii application.
It will fill a buffer of databaseobjects and then try to store it,
read again and store until it is finished or an exception occures.
setDefaultMeta
protected MetaData setDefaultMeta(java.util.Date sd,
java.util.Date ed)
throws java.io.IOException
- Creates a metadata file for this class with the default values set
to the static values defined above. OBS!, check calendar ....
- Overrides:
- setDefaultMeta in class Database
- Tags copied from class: Database
- Parameters:
sd
- start time of data in datafileed
- end time of data in datafile- Returns:
- the new
MetaData
object - Throws:
- java.io.IOException - when save of
MetaData
fails
getEmptyMetaData
protected MetaData getEmptyMetaData(java.util.Date sd,
java.util.Date ed)
- Returns an "empty" metadata object. All fields but Start and end time
has valid values (as set in the respective database class).
The times will be set to that what is supplied.
OBS! This is not stored in the MetaData file !!
- Overrides:
- getEmptyMetaData in class Database
- Tags copied from class: Database
- Parameters:
sd
- fake start dateed
- fake end date- Returns:
- the fake
MetaData
object