alma.aedf.types
Class Table

java.lang.Object
  |
  +--alma.aedf.types.Table
Direct Known Subclasses:
AlmaCorrelatorModeTable, AntennaTable, CalDeviceTable, CalWidgetTable, ConfigDescriptionTable, DataDescriptionTable, DopplerTable, ExecuteSummaryTable, FeedTable, FieldTable, FlagCmdTable, FocusTable, FreqOffsetTable, GainCurveTable, GainTrackingTable, HistoryTable, MainTable, ObsSummaryTable, ObsUnitTable, PointingTable, PolarizationTable, ProcessorTable, ReceiverTable, ScanSummaryTable, ScheduleTable, SeeingTable, SourceParameterTable, SourceTable, SpectralWindowTable, StateTable, SwitchCycleTable, SysCalTable, TotPowMonitoringTable, WeatherTable, WvmCalTable

public abstract class Table
extends java.lang.Object

A abstract class ancestor of all tables of AEDF instances.

Author:
caillat

Constructor Summary
Table(java.lang.String aedfType)
          This constructor just defines the AEDF type of its content
Table(java.lang.String aedfType, java.lang.String itsUID, java.lang.String projectUID)
          A constructor with its AEDF type, its UID and the project's UID.
 
Method Summary
 int add(java.lang.Object row)
          Append a row at the end of the table.
 java.lang.String getAedfType()
           
 java.lang.String getAEDFXMLDirectory()
           
 java.lang.String getProjectUID()
          Returns the identifier of the project this table belongs to.
 java.lang.Object getRow(int index)
          Returns the row at index in the table.
 java.lang.String getUID()
          Returns the table's identifier.
 int nRows()
           
static Table parseXML(java.lang.String xmlString, java.lang.String rules)
          A constructor from an xml content.
 void setAEDFXMLDirectory(java.lang.String string)
           
 void setProjectUID(java.lang.String projectUID)
          Set the projectUID property.
 boolean setProperty(java.lang.String name, java.lang.String value)
          Set a property's value based on name/value pair.
 void setUID(java.lang.String itsUID)
          Set the uid property.
 java.lang.String toXML()
          Construct an XML representation of the table : which respects the VO Table schema, which respects the template defined for the particular type of AEDF being processed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Table

public Table(java.lang.String aedfType)
This constructor just defines the AEDF type of its content

Parameters:
aedfType - a string representing the AEDF type of the table content

Table

public Table(java.lang.String aedfType,
             java.lang.String itsUID,
             java.lang.String projectUID)
      throws java.lang.Exception
A constructor with its AEDF type, its UID and the project's UID.

Parameters:
aedfType - a string representing the AEDF type of the table content
itsUID - The identifier of the table to create.
projectUID - The identifier of the project the table belongs to.
Method Detail

parseXML

public static Table parseXML(java.lang.String xmlString,
                             java.lang.String rules)
                      throws java.lang.Exception
A constructor from an xml content.

Parameters:
xmlString -
rules -
Returns:
The built table.
java.lang.Exception

setProperty

public boolean setProperty(java.lang.String name,
                           java.lang.String value)
Set a property's value based on name/value pair.

Parameters:
name - The name
value - The value

setProjectUID

public void setProjectUID(java.lang.String projectUID)
Set the projectUID property.

Parameters:
projectUID - The identifier of the project this table belongs to.

setUID

public void setUID(java.lang.String itsUID)
Set the uid property.

Parameters:
itsUID - The identifier of this table .

getUID

public java.lang.String getUID()
Returns the table's identifier.

Returns:
the value of itsUID

getProjectUID

public java.lang.String getProjectUID()
Returns the identifier of the project this table belongs to.

Returns:
the value of projectUID.

add

public int add(java.lang.Object row)
Append a row at the end of the table.

Parameters:
row -
Returns:
the 0-based index of insertion.

getRow

public java.lang.Object getRow(int index)
Returns the row at index in the table.

Parameters:
index -
Returns:
the object at index.

toXML

public java.lang.String toXML()
Construct an XML representation of the table :

Returns:
The XML representation of the table.

getAedfType

public java.lang.String getAedfType()
Returns:
a string indicating the AEDF type of the table.

nRows

public int nRows()
Returns:
The number of rows in the table.

getAEDFXMLDirectory

public java.lang.String getAEDFXMLDirectory()
Returns:
The directory containing all the XML files used in writing/parsing VOTables.

setAEDFXMLDirectory

public void setAEDFXMLDirectory(java.lang.String string)
Parameters:
string - The directory containing all the XML files used in writing/parsing VOTables.