Package ro.sync.ecss.extensions.commons
Class AbstractDocumentTypeHelper
java.lang.Object
ro.sync.ecss.extensions.commons.AbstractDocumentTypeHelper
- All Implemented Interfaces:
AuthorTableHelper
- Direct Known Subclasses:
CALSDocumentTypeHelper,DITARelTableDocumentTypeHelper,DITASimpleTableDocumentTypeHelper,TEIDocumentTypeHelper,XHTMLDocumentTypeHelper
@API(type=INTERNAL,
src=PUBLIC)
public abstract class AbstractDocumentTypeHelper
extends Object
implements AuthorTableHelper
Abstract implementation of the document type helper.
-
Field Summary
Fields inherited from interface ro.sync.ecss.extensions.commons.table.operations.AuthorTableHelper
TYPE_CELL, TYPE_ROW, TYPE_TABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]Get a list of allowed cell attributes to copy when creating a new row based on an older one.protected abstract String[]Returns the possible local names of the elements that represents a table cell.getTableElementForDeletion(AuthorNode element) When we delete all the rows or all the columns of a table, we also want to delete the entire table element.protected abstract String[]Returns the possible local names of the elements that represents a table.protected abstract String[]Return the possible local names of the elements that represent a table row.booleanisColspec(AuthorNode node) Check if a node is a colspec node.booleanisContentReference(AuthorNode node) Check if this node references another node which should replace it entirely.protected booleanisElement(AuthorNode node, String elemLocalName) Test if a given node is an element and has the a specific local name.booleanisTable(AuthorNode node) Check if anAuthorNodeis a table node.booleanisTableCell(AuthorNode node) Check if anAuthorNodeis a table cell node.booleanisTableRow(AuthorNode node) Check if anAuthorNodeis a table row node.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ro.sync.ecss.extensions.commons.table.operations.AuthorTableHelper
checkTableColSpanIsDefined, getIgnoredCellIDAttributes, getIgnoredColumnAttributes, getIgnoredRowAttributes, getTableCellSpanProvider, updateTableColSpan, updateTableColumnNumber, updateTableRowNumber, updateTableRowSpan
-
Constructor Details
-
AbstractDocumentTypeHelper
public AbstractDocumentTypeHelper()
-
-
Method Details
-
isElement
Test if a given node is an element and has the a specific local name.- Parameters:
node- TheAuthorNodeto be checked.elemLocalName- The local name of the element.- Returns:
trueif the givenAuthorNodeis an element and its local name matches the given string.
-
isTableCell
Description copied from interface:AuthorTableHelperCheck if anAuthorNodeis a table cell node.- Specified by:
isTableCellin interfaceAuthorTableHelper- Parameters:
node- TheAuthorNodeto be checked.- Returns:
trueif the node is a table cell node,falseotherwise.- See Also:
-
isTable
Description copied from interface:AuthorTableHelperCheck if anAuthorNodeis a table node.- Specified by:
isTablein interfaceAuthorTableHelper- Parameters:
node- TheAuthorNodeto be checked.- Returns:
trueif the node is a table node,falseotherwise.- See Also:
-
isTableRow
Description copied from interface:AuthorTableHelperCheck if anAuthorNodeis a table row node.- Specified by:
isTableRowin interfaceAuthorTableHelper- Parameters:
node- TheAuthorNodeto be checked.- Returns:
trueif the node is a table row node,falseotherwise.- See Also:
-
getTableElementForDeletion
Description copied from interface:AuthorTableHelperWhen we delete all the rows or all the columns of a table, we also want to delete the entire table element.
OBS: For CALS tables we don't want to delete only the "tgroup", but the parent table element itself.- Specified by:
getTableElementForDeletionin interfaceAuthorTableHelper- Parameters:
element- the node whose parent table we are looking for.- Returns:
- the table element to be deleted.
- See Also:
-
getTableCellElementNames
Returns the possible local names of the elements that represents a table cell.- Returns:
- The local names of the elements that represents a table cell.
Not
null.
-
getTableRowElementNames
Return the possible local names of the elements that represent a table row.- Returns:
- The local names of the elements that represent a table row.
-
getTableElementLocalName
Returns the possible local names of the elements that represents a table.- Returns:
- The local names of the elements that represents a table.
-
getAllowedCellAttributesToCopy
Get a list of allowed cell attributes to copy when creating a new row based on an older one.- Returns:
- a list of allowed cell attributes to copy when creating a new row.
If it returns
null, the list of ignored attributes will be used by default.
-
isContentReference
Check if this node references another node which should replace it entirely. This is used in the tables to replace conreffed table rows entirely- Parameters:
node- The node- Returns:
trueif this node references another node which should replace it entirely.
-
isColspec
Check if a node is a colspec node.- Specified by:
isColspecin interfaceAuthorTableHelper- Parameters:
node- The node.- Returns:
trueif a node is a colspec node.
-