saaps.dbt
Class AEDB
java.lang.Object
|
+--saaps.dbt.Database
|
+--saaps.dbt.AEDB
- public class AEDB
- extends Database
AEDB extends the Database class. It contains
the read and write methods that are used in
Database. The field is a vector of AE objects.
- Version:
- 1.0 2001-03-05
- See Also:
AE
Constructor Summary |
AEDB()
|
AEDB(int i)
|
AEDB(java.util.Vector aeVec)
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 |
average, average, close, getDataGapValue, getFirst, getInstance, getInstance, getLast, getResampledTimeSeries, getTimeSeries, importAscii, isSet, position, position, position, retrieve, retrieve, retrieve, retrieve, retrieveAVE, retrieveAVE, retrieveOTS, retrieveSEA, retrieveTS, retrieveTS, store, store |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
dataGapValueDefinition
private double dataGapValueDefinition
name
private static java.lang.String name
description
private static java.lang.String description
longDescription
private static java.lang.String longDescription
st
private static java.util.Calendar st
et
private static java.util.Calendar et
ct
private static boolean ct
step
private static long step
fieldNames
private static java.lang.String[] fieldNames
fieldUnits
private static java.lang.String[] fieldUnits
fieldTypes
private static java.lang.String[] fieldTypes
ae
private AE ae
aeVec
private java.util.Vector aeVec
AEDB
public AEDB()
AEDB
public AEDB(int i)
AEDB
public AEDB(java.util.Vector aeVec)
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 AE 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
- Following copied from class:
saaps.dbt.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
- Following copied from class:
saaps.dbt.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
- Following copied from class:
saaps.dbt.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 retrieves 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
- Following copied from class:
saaps.dbt.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
- Following copied from class:
saaps.dbt.Database
- Parameters:
sd
- fake start dateed
- fake end date- Returns:
- the fake
MetaData
object