Oxygen XML Editor 14.2 Author API

ro.sync.ecss.extensions.tei
Class TEIDocumentTypeHelper

java.lang.Object
  extended by ro.sync.ecss.extensions.commons.AbstractDocumentTypeHelper
      extended by ro.sync.ecss.extensions.tei.TEIDocumentTypeHelper
All Implemented Interfaces:
AuthorTableHelper, TEIConstants

@API(type=INTERNAL,
     src=PUBLIC)
public class TEIDocumentTypeHelper
extends AbstractDocumentTypeHelper
implements TEIConstants

Implementation of the document type helper for TEI.


Field Summary
 
Fields inherited from interface ro.sync.ecss.extensions.tei.table.TEIConstants
ATTRIBUTE_NAME_COLS, ATTRIBUTE_NAME_ID, ATTRIBUTE_NAME_ROWS, ATTRIBUTE_NAME_XML_ID, ELEMENT_NAME_CELL, ELEMENT_NAME_ROW, ELEMENT_NAME_TABLE
 
Fields inherited from interface ro.sync.ecss.extensions.commons.table.operations.AuthorTableHelper
TYPE_CELL, TYPE_ROW, TYPE_TABLE
 
Constructor Summary
TEIDocumentTypeHelper()
           
 
Method Summary
 void checkTableColSpanIsDefined(AuthorAccess authorAccess, AuthorTableCellSpanProvider tableCellSpanProvider, AuthorElement cellElement)
          For TEI the column span is always defined.
 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 tableElement)
          Create the table cell span provider for a specific 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.
 void updateTableColSpan(AuthorAccess authorAccess, AuthorTableCellSpanProvider tableCellSpanProvider, AuthorElement cellElement, int startCol, int endCol)
          Update the 'cols' attribute.
 void updateTableColumnNumber(AuthorAccess authorAccess, AuthorElement tableElement, int colNumber)
          Updates the 'cols' attribute.
 void updateTableRowNumber(AuthorAccess authorAccess, AuthorElement tableElement, int relativeValue)
          Updates the 'rows' attribute.
 void updateTableRowSpan(AuthorAccess authorAccess, AuthorElement cellElement, int rowSpan)
          Update the 'rows' attribute.
 
Methods inherited from class ro.sync.ecss.extensions.commons.AbstractDocumentTypeHelper
isElement, isTable, isTableCell, isTableRow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TEIDocumentTypeHelper

public TEIDocumentTypeHelper()
Method Detail

checkTableColSpanIsDefined

public void checkTableColSpanIsDefined(AuthorAccess authorAccess,
                                       AuthorTableCellSpanProvider tableCellSpanProvider,
                                       AuthorElement cellElement)
                                throws AuthorOperationException
For TEI the column span is always 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.
tableCellSpanProvider - 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)

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()

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()

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()

getTableCellSpanProvider

public AuthorTableCellSpanProvider getTableCellSpanProvider(AuthorElement tableElement)
Description copied from interface: AuthorTableHelper
Create the table cell span provider for a specific table element.

Specified by:
getTableCellSpanProvider in interface AuthorTableHelper
Parameters:
tableElement - 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)

updateTableColSpan

public void updateTableColSpan(AuthorAccess authorAccess,
                               AuthorTableCellSpanProvider tableCellSpanProvider,
                               AuthorElement cellElement,
                               int startCol,
                               int endCol)
Update the 'cols' attribute.

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.
tableCellSpanProvider - The object responsible for providing information about the cell spanning.
cellElement - 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.
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)

updateTableRowSpan

public void updateTableRowSpan(AuthorAccess authorAccess,
                               AuthorElement cellElement,
                               int rowSpan)
Update the 'rows' attribute.

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.
cellElement - 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 colNumber)
Updates the 'cols' attribute.

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'.
colNumber - 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 relativeValue)
Updates the 'rows' attribute.

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'.
relativeValue - 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)

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()

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()

Oxygen XML Editor 14.2 Author API

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