Oxygen XML Editor 14.2 Author API

ro.sync.ecss.extensions.commons.table.support
Class CALSColSpec

java.lang.Object
  extended by ro.sync.ecss.extensions.commons.table.support.CALSColSpec

@API(type=INTERNAL,
     src=PUBLIC)
public class CALSColSpec
extends java.lang.Object

The column specification for a CALS table model (e.g. DocBook or DITA tables).


Constructor Summary
CALSColSpec(int indexInDocument, int colNumber, boolean colNumberSpecified, java.lang.String colName, java.lang.String colWidth)
          Constructor.
CALSColSpec(int indexInDocument, int colNumber, boolean colNumberSpecified, java.lang.String colName, WidthRepresentation colWidth)
          Constructor.
 
Method Summary
 java.lang.String createXMLFragment(java.lang.String ns)
          Creates the XML fragment corresponding to the column specification obtained from the colNumber, colName and colWidth fields.
 java.lang.String getColumnName()
           
 int getColumnNumber()
           
 WidthRepresentation getColWidth()
           
 int getIndexInDocument()
           
 boolean isColNumberSpecified()
           
 void setColWidth(WidthRepresentation colWidth)
          Set the new WidthRepresentation corresponding to the column specification.
 java.lang.String toString()
          Creates a String representation of the column specification.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CALSColSpec

public CALSColSpec(int indexInDocument,
                   int colNumber,
                   boolean colNumberSpecified,
                   java.lang.String colName,
                   java.lang.String colWidth)
Constructor.

Parameters:
indexInDocument - Index in colspec elements list.
colNumber - The number of the column. It is 1 based.
colNumberSpecified - true if the column number was specified as an attribute
colName - The name of the column.
colWidth - The string representation of the column width as described in the WidthRepresentation.

CALSColSpec

public CALSColSpec(int indexInDocument,
                   int colNumber,
                   boolean colNumberSpecified,
                   java.lang.String colName,
                   WidthRepresentation colWidth)
Constructor.

Parameters:
colNumber - The number of this column. It is 1 based.
colNumberSpecified - true if the column number was specified as an attribute
colName - The name of this column.
colWidth - The column width representation.
indexInDocument - Index in colspec elements list.
Method Detail

isColNumberSpecified

public boolean isColNumberSpecified()
Returns:
Returns the colNumberSpecified.

getIndexInDocument

public int getIndexInDocument()
Returns:
Returns the indexInDocument.

getColumnNumber

public int getColumnNumber()
Returns:
The column number. It is 1 based.

getColumnName

public java.lang.String getColumnName()
Returns:
The name of the column.

getColWidth

public WidthRepresentation getColWidth()
Returns:
Returns the column width representation.

toString

public java.lang.String toString()
Creates a String representation of the column specification.

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

createXMLFragment

public java.lang.String createXMLFragment(java.lang.String ns)
Creates the XML fragment corresponding to the column specification obtained from the colNumber, colName and colWidth fields.
The general format of the generated fragment is:

<colspec colnum="integer_value" colname="string_value" colwidth="string_value" xmlns="URI"/>

Parameters:
ns - The namespace URI of the table element. It can be null.
Returns:
The XML fragment corresponding to the column specification.

setColWidth

public void setColWidth(WidthRepresentation colWidth)
Set the new WidthRepresentation corresponding to the column specification.

Parameters:
colWidth - The column width to be set.

Oxygen XML Editor 14.2 Author API

© Copyright SyncRO Soft SRL 2002 - 2013. All rights reserved.