Oxygen XML Editor 16.1 Author API

ro.sync.ecss.extensions.dita.topic.table.simpletable
Class DITASimpleTableDocumentTypeHelper

java.lang.Object
  extended by ro.sync.ecss.extensions.commons.AbstractDocumentTypeHelper
      extended by ro.sync.ecss.extensions.dita.topic.table.simpletable.DITASimpleTableDocumentTypeHelper
All Implemented Interfaces:
AuthorTableHelper, SimpleTableConstants

@API(type=INTERNAL,
     src=PUBLIC)
public class DITASimpleTableDocumentTypeHelper
extends AbstractDocumentTypeHelper
implements SimpleTableConstants

Implementation of the document type helper for DITA simple table model


Field Summary
 
Fields inherited from interface ro.sync.ecss.extensions.dita.topic.table.simpletable.SimpleTableConstants
ATTRIBUTE_NAME_ID, ELEMENT_NAME_CHDESC_CHOICETABLE, ELEMENT_NAME_CHDESCHD_CHOICETABLE, ELEMENT_NAME_CHOICETABLE, ELEMENT_NAME_CHOPTION_CHOICETABLE, ELEMENT_NAME_CHOPTIONHD_CHOICETABLE, ELEMENT_NAME_ENTRY_SIMPLETABLE, ELEMENT_NAME_HEADER_CHOICETABLE, ELEMENT_NAME_HEADER_PROPERTIES, ELEMENT_NAME_HEADER_SIMPLETABLE, ELEMENT_NAME_PROPDESC_PROPERTIES, ELEMENT_NAME_PROPDESCHD_PROPERTIES, ELEMENT_NAME_PROPERTIES, ELEMENT_NAME_PROPTYPE_PROPERTIES, ELEMENT_NAME_PROPTYPEHD_PROPERTIES, ELEMENT_NAME_PROPVALUE_PROPERTIES, ELEMENT_NAME_PROPVALUEHD_PROPERTIES, ELEMENT_NAME_ROW_CHOICETABLE, ELEMENT_NAME_ROW_PROPERTIES, ELEMENT_NAME_ROW_SIMPLETABLE, ELEMENT_NAME_SIMPLETABLE
 
Fields inherited from interface ro.sync.ecss.extensions.commons.table.operations.AuthorTableHelper
TYPE_CELL, TYPE_ROW, TYPE_TABLE
 
Constructor Summary
DITASimpleTableDocumentTypeHelper()
           
 
Method Summary
 void checkTableColSpanIsDefined(AuthorAccess authorAccess, AuthorTableCellSpanProvider tableSpanSupport, AuthorElement cellElement)
          Check if the column span is defined for a table cell.
 java.lang.String[] getIgnoredCellIDAttributes()
          Gets the ID attribute names which should be skipped when inserting a new column or row and the attributes from source cell fragments must be copied.
 java.lang.String[] getIgnoredColumnAttributes()
          Gets the attributes which should be skipped when inserting a new column and the attributes from source cell fragments must be copied.
 java.lang.String[] getIgnoredRowAttributes()
          Gets the attributes which should be skipped when using the current row as template for insert operation.
 java.lang.String[] getTableCellElementNames()
          Returns the possible local names of the elements that represents a table cell.
 AuthorTableCellSpanProvider getTableCellSpanProvider(AuthorElement tgroupElement)
          Creates a SimpleTableCellSpanProvider over the table element.
 java.lang.String[] getTableElementLocalName()
          Returns the possible local names of the elements that represents a table.
 java.lang.String[] getTableRowElementNames()
          Return the possible local names of the elements that represent a table row.
 boolean isTable(AuthorNode node)
          Check if an AuthorNode is a table node.
 boolean isTableCell(AuthorNode node)
          Check if an AuthorNode is a table cell node.
 boolean isTableRow(AuthorNode node)
          Check if an AuthorNode is a table row node.
 void updateTableColSpan(AuthorAccess authorAccess, AuthorTableCellSpanProvider tableSupport, AuthorElement cellElem, int startCol, int endCol)
          Update the column span of the cell by modifying the indices of start and end column.
 void updateTableColumnNumber(AuthorAccess authorAccess, AuthorElement tableElement, int colsNumber)
          Update the table columns number.
 void updateTableRowNumber(AuthorAccess authorAccess, AuthorElement tableElement, int rowsNumber)
          Update the table rows number.
 void updateTableRowSpan(AuthorAccess authorAccess, AuthorElement cellElem, int rowSpan)
          Updates the cell row span to a specified value.
 
Methods inherited from class ro.sync.ecss.extensions.commons.AbstractDocumentTypeHelper
isElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DITASimpleTableDocumentTypeHelper

public DITASimpleTableDocumentTypeHelper()
Method Detail

getTableCellElementNames

public java.lang.String[] getTableCellElementNames()
Description copied from class: AbstractDocumentTypeHelper
Returns the possible local names of the elements that represents a table cell.

Specified by:
getTableCellElementNames in class AbstractDocumentTypeHelper
Returns:
The local names of the elements that represents a table cell. Not null.
See Also:
AbstractDocumentTypeHelper.getTableCellElementNames()

isTableCell

public boolean isTableCell(AuthorNode node)
Description copied from interface: AuthorTableHelper
Check if an AuthorNode is a table cell node.

Specified by:
isTableCell in interface AuthorTableHelper
Overrides:
isTableCell in class AbstractDocumentTypeHelper
Parameters:
node - The AuthorNode to be checked.
Returns:
true if the node is a table cell node, false otherwise.
See Also:
AbstractDocumentTypeHelper.isTableCell(ro.sync.ecss.extensions.api.node.AuthorNode)

getTableRowElementNames

public java.lang.String[] getTableRowElementNames()
Description copied from class: AbstractDocumentTypeHelper
Return the possible local names of the elements that represent a table row.

Specified by:
getTableRowElementNames in class AbstractDocumentTypeHelper
Returns:
The local names of the elements that represent a table row.
See Also:
AbstractDocumentTypeHelper.getTableRowElementNames()

isTableRow

public boolean isTableRow(AuthorNode node)
Description copied from interface: AuthorTableHelper
Check if an AuthorNode is a table row node.

Specified by:
isTableRow in interface AuthorTableHelper
Overrides:
isTableRow in class AbstractDocumentTypeHelper
Parameters:
node - The AuthorNode to be checked.
Returns:
true if the node is a table row node, false otherwise.
See Also:
AbstractDocumentTypeHelper.isTableRow(ro.sync.ecss.extensions.api.node.AuthorNode)

getTableElementLocalName

public java.lang.String[] getTableElementLocalName()
Description copied from class: AbstractDocumentTypeHelper
Returns the possible local names of the elements that represents a table.

Specified by:
getTableElementLocalName in class AbstractDocumentTypeHelper
Returns:
The local names of the elements that represents a table.
See Also:
AbstractDocumentTypeHelper.getTableElementLocalName()

isTable

public boolean isTable(AuthorNode node)
Description copied from interface: AuthorTableHelper
Check if an AuthorNode is a table node.

Specified by:
isTable in interface AuthorTableHelper
Overrides:
isTable in class AbstractDocumentTypeHelper
Parameters:
node - The AuthorNode to be checked.
Returns:
true if the node is a table node, false otherwise.
See Also:
AbstractDocumentTypeHelper.isTable(ro.sync.ecss.extensions.api.node.AuthorNode)

checkTableColSpanIsDefined

public void checkTableColSpanIsDefined(AuthorAccess authorAccess,
                                       AuthorTableCellSpanProvider tableSpanSupport,
                                       AuthorElement cellElement)
                                throws AuthorOperationException
Description copied from interface: AuthorTableHelper
Check if the column span is defined for a table cell.

I.E. for DocBook the column span is defined by the 'colspec' element. If it is missing then the column span is not defined.

Specified by:
checkTableColSpanIsDefined in interface AuthorTableHelper
Parameters:
authorAccess - The author access. Provides access to specific informations and actions for editor, document, workspace, tables, change tracking, utility a.s.o.
tableSpanSupport - The table cell span provider.
cellElement - The cell element to be tested.
Throws:
AuthorOperationException - When the column span is not defined for the table cell.
See Also:
AuthorTableHelper.checkTableColSpanIsDefined(ro.sync.ecss.extensions.api.AuthorAccess, ro.sync.ecss.extensions.api.AuthorTableCellSpanProvider, ro.sync.ecss.extensions.api.node.AuthorElement)

updateTableColSpan

public void updateTableColSpan(AuthorAccess authorAccess,
                               AuthorTableCellSpanProvider tableSupport,
                               AuthorElement cellElem,
                               int startCol,
                               int endCol)
                        throws AuthorOperationException
Description copied from interface: AuthorTableHelper
Update the column span of the cell by modifying the indices of start and end column. For example, for the DocBook CALS tables the namest and nameend attributes will be set according to the startCol and endCol supplied values.

Specified by:
updateTableColSpan in interface AuthorTableHelper
Parameters:
authorAccess - The author access. Provides access to specific informations and actions for editor, document, workspace, tables, change tracking, utility a.s.o.
tableSupport - The object responsible for providing information about the cell spanning.
cellElem - The cell element whose column span will be updated.
startCol - The new index of start column. It is 1 based and inclusive.
endCol - The new index of end column. It is 1 based and inclusive.
Throws:
AuthorOperationException - When the column specifications for start or end columns are missing.
See Also:
AuthorTableHelper.updateTableColSpan(ro.sync.ecss.extensions.api.AuthorAccess, ro.sync.ecss.extensions.api.AuthorTableCellSpanProvider, ro.sync.ecss.extensions.api.node.AuthorElement, int, int)

getTableCellSpanProvider

public AuthorTableCellSpanProvider getTableCellSpanProvider(AuthorElement tgroupElement)
Creates a SimpleTableCellSpanProvider over the table element.

Specified by:
getTableCellSpanProvider in interface AuthorTableHelper
Parameters:
tgroupElement - The element rendered as a table. Its 'display' CSS property is set to 'table'.
Returns:
The table cell span provider. Must not be null.
See Also:
AuthorTableHelper.getTableCellSpanProvider(ro.sync.ecss.extensions.api.node.AuthorElement)

updateTableRowSpan

public void updateTableRowSpan(AuthorAccess authorAccess,
                               AuthorElement cellElem,
                               int rowSpan)
Description copied from interface: AuthorTableHelper
Updates the cell row span to a specified value. For example, for the DocBook CALS tables the morerows attribute value will be updated.

Specified by:
updateTableRowSpan in interface AuthorTableHelper
Parameters:
authorAccess - The author access. Provides access to specific informations and actions for editor, document, workspace, tables, change tracking, utility a.s.o.
cellElem - The cell element whose row span will be updated.
rowSpan - The new row span value. It is 1 based.
See Also:
AuthorTableHelper.updateTableRowSpan(ro.sync.ecss.extensions.api.AuthorAccess, ro.sync.ecss.extensions.api.node.AuthorElement, int)

updateTableColumnNumber

public void updateTableColumnNumber(AuthorAccess authorAccess,
                                    AuthorElement tableElement,
                                    int colsNumber)
Description copied from interface: AuthorTableHelper
Update the table columns number. For example, for the DocBook CALS tables the cols attribute value will be updated.

Specified by:
updateTableColumnNumber in interface AuthorTableHelper
Parameters:
authorAccess - The author access. Provides access to specific informations and actions for editor, document, workspace, tables, change tracking, utility a.s.o.
tableElement - The element rendered as a table. Its 'display' CSS property is set to 'table'.
colsNumber - The updated number of columns.
See Also:
AuthorTableHelper.updateTableColumnNumber(ro.sync.ecss.extensions.api.AuthorAccess, ro.sync.ecss.extensions.api.node.AuthorElement, int)

updateTableRowNumber

public void updateTableRowNumber(AuthorAccess authorAccess,
                                 AuthorElement tableElement,
                                 int rowsNumber)
Description copied from interface: AuthorTableHelper
Update the table rows number.

Specified by:
updateTableRowNumber in interface AuthorTableHelper
Parameters:
authorAccess - The author access. Provides access to specific informations and actions for editor, document, workspace, tables, change tracking, utility a.s.o.
tableElement - The element rendered as a table. Its 'display' CSS property is set to 'table'.
rowsNumber - The number of rows to increase or decrease the current number of table rows. If the number of rows must be decreased then the argument must be negative.
See Also:
AuthorTableHelper.updateTableRowNumber(ro.sync.ecss.extensions.api.AuthorAccess, ro.sync.ecss.extensions.api.node.AuthorElement, int)

getIgnoredColumnAttributes

public java.lang.String[] getIgnoredColumnAttributes()
Description copied from interface: AuthorTableHelper
Gets the attributes which should be skipped when inserting a new column and the attributes from source cell fragments must be copied.

Specified by:
getIgnoredColumnAttributes in interface AuthorTableHelper
Returns:
The attributes which should be skipped.
See Also:
AuthorTableHelper.getIgnoredColumnAttributes()

getIgnoredRowAttributes

public java.lang.String[] getIgnoredRowAttributes()
Description copied from interface: AuthorTableHelper
Gets the attributes which should be skipped when using the current row as template for insert operation.

Specified by:
getIgnoredRowAttributes in interface AuthorTableHelper
Returns:
The attributes which should be skipped.
See Also:
AuthorTableHelper.getIgnoredRowAttributes()

getIgnoredCellIDAttributes

public java.lang.String[] getIgnoredCellIDAttributes()
Description copied from interface: AuthorTableHelper
Gets the ID attribute names which should be skipped when inserting a new column or row and the attributes from source cell fragments must be copied.

Specified by:
getIgnoredCellIDAttributes in interface AuthorTableHelper
Returns:
The ID attributes which should be skipped.
See Also:
AuthorTableHelper.getIgnoredCellIDAttributes()

Oxygen XML Editor 16.1 Author API

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