net.sf.mpxj
Class Table

java.lang.Object
  extended by net.sf.mpxj.Table

public final class Table
extends Object

This class represents the definition of a table of data from an MPP file. Much of the important information held in MS Project is represented in a tabular format. This class represents the attributes associated with these tables. For example, the attributes of the table of data that appears as the left hand part of the standard Gantt Chart view in MS Project will be defined here.


Constructor Summary
Table()
           
 
Method Summary
 void addColumn(Column column)
          Adds a column definition to this table.
 List<Column> getColumns()
          Retrieves the list of columns that make up this table.
 int getID()
          This method is used to retrieve the unique table identifier.
 String getName()
          This method is used to retrieve the table name.
 boolean getResourceFlag()
          This method retrieves the resource flag attribute of the table.
 void setID(int id)
          This method is used to to set the unique identifier associated with this table.
 void setName(String name)
          This method is used to set the name associated with this table.
 void setResourceFlag(boolean flag)
          This method sets the resource flag attribute of the table.
 String toString()
          This method dumps the contents of this table as a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Table

public Table()
Method Detail

getID

public int getID()
This method is used to retrieve the unique table identifier. This value identifies the table within the file. It does not identify the type of table represented by an instance of this class.

Returns:
table identifier

setID

public void setID(int id)
This method is used to to set the unique identifier associated with this table.

Parameters:
id - unique table identifier

getName

public String getName()
This method is used to retrieve the table name. Note that internally in MS Project the table name will contain an ampersand (&) used to flag the letter that can be used as a shortcut for this table. The ampersand is stripped out by MPXJ.

Returns:
view name

setName

public void setName(String name)
This method is used to set the name associated with this table.

Parameters:
name - table name

getResourceFlag

public boolean getResourceFlag()
This method retrieves the resource flag attribute of the table. This attribute represents whether the table refers to task data (false) or resource data (true).

Returns:
boolean flag

setResourceFlag

public void setResourceFlag(boolean flag)
This method sets the resource flag attribute of the table. This attribute represents whether the table refers to task data (false) or resource data (true).

Parameters:
flag - boolean flag

addColumn

public void addColumn(Column column)
Adds a column definition to this table.

Parameters:
column - column definition

getColumns

public List<Column> getColumns()
Retrieves the list of columns that make up this table.

Returns:
list of columns

toString

public String toString()
This method dumps the contents of this table as a String. Note that this facility is provided as a debugging aid.

Overrides:
toString in class Object
Returns:
formatted contents of this table


Copyright © 2012. All Rights Reserved.