Style Intelligence v12.0

inetsoft.report
Class TableDataPath

java.lang.Object
  extended by inetsoft.report.TableDataPath
All Implemented Interfaces:
inetsoft.util.DataSerializable, inetsoft.util.XMLSerializable, Serializable, Cloneable

public class TableDataPath
extends Object
implements inetsoft.util.XMLSerializable, inetsoft.util.DataSerializable, Serializable, Cloneable

Table data path contains the structual infos of a table row/col/cell. It contains infos like type, data type, etc.

See Also:
Serialized Form

Field Summary
static int CALENDAR_TITLE
          Calendar title.
static int DETAIL
          Table detail row/col/cell.
static int GRAND_TOTAL
          Table grand total row/col/cell.
static int GROUP_HEADER
          Table group header row/col/cell.
static int HEADER
          Table header row/col/cell.
static int MONTH_CALENDAR
          Month calendar.
static int OBJECT
          Object.
static int SUMMARY
          Table summary row/col/cell.
static int SUMMARY_HEADER
          Table summary header row/col/cell.
static int TITLE
          Title.
static int TRAILER
          Table trailer row/col/cell.
static int UNKNOWN
          Unknown.
static int YEAR_CALENDAR
          Year calendar.
 
Constructor Summary
TableDataPath()
          Create a default table data path.
TableDataPath(int level, int type)
          Create a row table data path.
TableDataPath(int level, int type, int index)
          Create a row table data path.
TableDataPath(int level, int type, String dtype, String[] path)
          Create a cell table data path.
TableDataPath(int level, int type, String dtype, String[] path, boolean row, boolean col)
          Create a table data path.
TableDataPath(String header)
          Create a col table data path.
 
Method Summary
 Object clone()
          Clone the table data path.
 Object clone(String[] arr)
          Clone the table data path.
 boolean equals(Object obj)
          Check if equals another object.
 int getColIndex()
          Get the col index of this data path.
 String getDataType()
          Get data type of the table data path.
 int getIndex()
          Get the row index of this data path.
 int getLevel()
          Get table data path level, which is useful for nested table.
 String[] getPath()
          Get path of the table data path.
 int getType()
          Get table data path type, which is one of the types defined in TableDataPath like HEADER, GROUP_TOTAL, etc.
 int hashCode()
          Get hash code of the table data path for map.
 boolean isCell()
          Check if is a cell table data path.
 boolean isCol()
          Check if is a col table data path.
 boolean isRow()
          Check if is a row table data path.
 boolean isSpecial()
          Check if this table data path is special.
 boolean parseData(DataInputStream input)
          Parse data from an InputStream.
 void parseXML(Element tag)
          Method to parse an xml segment.
 void setColIndex(int cidx)
          Set the col index to this data path.
 String toString()
          Return the string representaion.
 void writeData(DataOutputStream output)
          Write data to a DataOutputStream.
 void writeXML(PrintWriter writer)
          Write the xml segment to print writer.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

HEADER

public static final int HEADER
Table header row/col/cell.

See Also:
Constant Field Values

DETAIL

public static final int DETAIL
Table detail row/col/cell.

See Also:
Constant Field Values

TRAILER

public static final int TRAILER
Table trailer row/col/cell.

See Also:
Constant Field Values

GROUP_HEADER

public static final int GROUP_HEADER
Table group header row/col/cell.

See Also:
Constant Field Values

SUMMARY

public static final int SUMMARY
Table summary row/col/cell.

See Also:
Constant Field Values

SUMMARY_HEADER

public static final int SUMMARY_HEADER
Table summary header row/col/cell.

See Also:
Constant Field Values

GRAND_TOTAL

public static final int GRAND_TOTAL
Table grand total row/col/cell.

See Also:
Constant Field Values

UNKNOWN

public static final int UNKNOWN
Unknown.

See Also:
Constant Field Values

TITLE

public static final int TITLE
Title.

See Also:
Constant Field Values

CALENDAR_TITLE

public static final int CALENDAR_TITLE
Calendar title.

See Also:
Constant Field Values

YEAR_CALENDAR

public static final int YEAR_CALENDAR
Year calendar.

See Also:
Constant Field Values

MONTH_CALENDAR

public static final int MONTH_CALENDAR
Month calendar.

See Also:
Constant Field Values

OBJECT

public static final int OBJECT
Object.

See Also:
Constant Field Values
Constructor Detail

TableDataPath

public TableDataPath()
Create a default table data path.


TableDataPath

public TableDataPath(String header)
Create a col table data path.

Parameters:
header - the specified column header

TableDataPath

public TableDataPath(int level,
                     int type)
Create a row table data path.

Parameters:
level - the specified table data path level
type - the specified table data path type

TableDataPath

public TableDataPath(int level,
                     int type,
                     int index)
Create a row table data path.

Parameters:
level - the specified table data path level
type - the specified table data path type
index - row index.

TableDataPath

public TableDataPath(int level,
                     int type,
                     String dtype,
                     String[] path)
Create a cell table data path.

Parameters:
level - the specified table data path level
type - the specified table data path type
dtype - the specified data type, which is defined in XSchema
path - of the table data path from root to leaf as a string array

TableDataPath

public TableDataPath(int level,
                     int type,
                     String dtype,
                     String[] path,
                     boolean row,
                     boolean col)
Create a table data path.

Parameters:
level - the specified table data path level
type - the specified table data path type
dtype - the specified data type, which is defined in XSchema
path - of the table data path from root to leaf as a string array
Method Detail

isRow

public boolean isRow()
Check if is a row table data path.

Returns:
true if is a row table data path, false otherwise.

isCol

public boolean isCol()
Check if is a col table data path.

Returns:
true if is a col table data path, false otherwise.

isCell

public boolean isCell()
Check if is a cell table data path.

Returns:
true if is a cell table data path, false otherwise.

isSpecial

public boolean isSpecial()
Check if this table data path is special.

Returns:
true if special, false otherwise.

getLevel

public int getLevel()
Get table data path level, which is useful for nested table.

Returns:
table data path level

getIndex

public int getIndex()
Get the row index of this data path.

Returns:
row index.

getColIndex

public int getColIndex()
Get the col index of this data path.

Returns:
col index.

setColIndex

public void setColIndex(int cidx)
Set the col index to this data path.

Parameters:
cidx - col index the specified column index.

getType

public int getType()
Get table data path type, which is one of the types defined in TableDataPath like HEADER, GROUP_TOTAL, etc.

Returns:
table data path type

getDataType

public String getDataType()
Get data type of the table data path.

Returns:
data type of the table data path

getPath

public String[] getPath()
Get path of the table data path.

Returns:
path of the table data path from root to leaf as a string array

writeData

public void writeData(DataOutputStream output)
               throws IOException
Write data to a DataOutputStream.

Specified by:
writeData in interface inetsoft.util.DataSerializable
Parameters:
output - the destination DataOutputStream.
Throws:
IOException

parseData

public boolean parseData(DataInputStream input)
Parse data from an InputStream.

Specified by:
parseData in interface inetsoft.util.DataSerializable
Parameters:
input - the source DataInputStream.
Returns:
true if successfully parsed, false otherwise.

writeXML

public void writeXML(PrintWriter writer)
Write the xml segment to print writer.

Specified by:
writeXML in interface inetsoft.util.XMLSerializable
Parameters:
writer - the destination print writer.

parseXML

public void parseXML(Element tag)
              throws Exception
Method to parse an xml segment.

Specified by:
parseXML in interface inetsoft.util.XMLSerializable
Parameters:
tag - the specified xml element
Throws:
Exception

equals

public boolean equals(Object obj)
Check if equals another object.

Overrides:
equals in class Object
Returns:
ture if equals, false otherwise

hashCode

public int hashCode()
Get hash code of the table data path for map.

Overrides:
hashCode in class Object
Returns:
hash code of the table data path

toString

public String toString()
Return the string representaion.

Overrides:
toString in class Object

clone

public Object clone()
Clone the table data path.

Overrides:
clone in class Object
Returns:
the cloned table data path

clone

public Object clone(String[] arr)
Clone the table data path.

Returns:
the cloned table data path

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.