Class DITATableDocumentTypeHelper
- java.lang.Object
-
- ro.sync.ecss.extensions.commons.AbstractDocumentTypeHelper
-
- ro.sync.ecss.extensions.commons.table.operations.cals.CALSDocumentTypeHelper
-
- ro.sync.ecss.extensions.dita.topic.table.DITATableDocumentTypeHelper
-
- All Implemented Interfaces:
AuthorTableHelper
,CALSConstants
@API(type=INTERNAL, src=PUBLIC) public class DITATableDocumentTypeHelper extends CALSDocumentTypeHelper
Implementation of the document type helper for DITA CALS table model. Looks at class attribute values.
-
-
Field Summary
-
Fields inherited from interface ro.sync.ecss.extensions.commons.table.operations.AuthorTableHelper
TYPE_CELL, TYPE_ROW, TYPE_TABLE
-
Fields inherited from interface ro.sync.ecss.extensions.commons.table.operations.cals.CALSConstants
ATTRIBUTE_NAME_ALIGN, ATTRIBUTE_NAME_COLNAME, ATTRIBUTE_NAME_COLNUM, ATTRIBUTE_NAME_COLS, ATTRIBUTE_NAME_COLSEP, ATTRIBUTE_NAME_COLWIDTH, ATTRIBUTE_NAME_ID, ATTRIBUTE_NAME_MOREROWS, ATTRIBUTE_NAME_NAMEEND, ATTRIBUTE_NAME_NAMEST, ATTRIBUTE_NAME_ROWSEP, ATTRIBUTE_NAME_SPANNAME, ATTRIBUTE_NAME_TABLE_WIDTH, ATTRIBUTE_NAME_XML_ID, ELEMENT_NAME_COLSPEC, ELEMENT_NAME_ENTRY, ELEMENT_NAME_INFORMALTABLE, ELEMENT_NAME_ROW, ELEMENT_NAME_SPANSPEC, ELEMENT_NAME_TABLE, ELEMENT_NAME_TGROUP
-
-
Constructor Summary
Constructors Constructor Description DITATableDocumentTypeHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]
getTableCellElementNames()
Returns the possible local names of the elements that represents a table cell.AuthorTableCellSpanProvider
getTableCellSpanProvider(AuthorElement tgroupElement)
Creates anAuthorTableCellSpanProvider
corresponding to 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.protected boolean
isActuallyTableAndNotTgroup(AuthorNode node)
Check if the given node is a DITA table (not a tgroup, but actually a table).boolean
isColspec(AuthorNode node)
Check if a node is a colspec node.boolean
isContentReference(AuthorNode node)
Check if this node references another node which should replace it entirely.boolean
isTable(AuthorNode node)
Check if anAuthorNode
is a table node.boolean
isTableCell(AuthorNode node)
Check if anAuthorNode
is a table cell node.boolean
isTableRow(AuthorNode node)
Check if anAuthorNode
is a table row node.-
Methods inherited from class ro.sync.ecss.extensions.commons.table.operations.cals.CALSDocumentTypeHelper
checkTableColSpanIsDefined, getAllowedCellAttributesToCopy, getIgnoredCellIDAttributes, getIgnoredColumnAttributes, getIgnoredRowAttributes, getTableElementForDeletion, limitRowSpan, updateTableColSpan, updateTableColumnNumber, updateTableRowNumber, updateTableRowSpan
-
Methods inherited from class ro.sync.ecss.extensions.commons.AbstractDocumentTypeHelper
isElement
-
-
-
-
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.- Overrides:
getTableCellElementNames
in classCALSDocumentTypeHelper
- 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 anAuthorNode
is a table cell node.- Specified by:
isTableCell
in interfaceAuthorTableHelper
- Overrides:
isTableCell
in classAbstractDocumentTypeHelper
- Parameters:
node
- TheAuthorNode
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)
-
isColspec
public boolean isColspec(AuthorNode node)
Description copied from class:AbstractDocumentTypeHelper
Check if a node is a colspec node.- Specified by:
isColspec
in interfaceAuthorTableHelper
- Overrides:
isColspec
in classAbstractDocumentTypeHelper
- Parameters:
node
- The node.- Returns:
true
if a node is a colspec node.- See Also:
AbstractDocumentTypeHelper.isColspec(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.- Overrides:
getTableRowElementNames
in classCALSDocumentTypeHelper
- 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 anAuthorNode
is a table row node.- Specified by:
isTableRow
in interfaceAuthorTableHelper
- Overrides:
isTableRow
in classAbstractDocumentTypeHelper
- Parameters:
node
- TheAuthorNode
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.- Overrides:
getTableElementLocalName
in classCALSDocumentTypeHelper
- 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 anAuthorNode
is a table node.- Specified by:
isTable
in interfaceAuthorTableHelper
- Overrides:
isTable
in classAbstractDocumentTypeHelper
- Parameters:
node
- TheAuthorNode
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)
-
isContentReference
public boolean isContentReference(AuthorNode node)
Description copied from class:AbstractDocumentTypeHelper
Check if this node references another node which should replace it entirely. This is used in the tables to replace conreffed table rows entirely- Overrides:
isContentReference
in classAbstractDocumentTypeHelper
- Parameters:
node
- The node- Returns:
true
if this node references another node which should replace it entirely.- See Also:
AbstractDocumentTypeHelper.isContentReference(ro.sync.ecss.extensions.api.node.AuthorNode)
-
isActuallyTableAndNotTgroup
protected boolean isActuallyTableAndNotTgroup(AuthorNode node)
Check if the given node is a DITA table (not a tgroup, but actually a table).- Overrides:
isActuallyTableAndNotTgroup
in classCALSDocumentTypeHelper
- Parameters:
node
- the node for which we perform the check.- Returns:
true
is the given node is a table element (with the class attribute containing topic/table).- See Also:
CALSDocumentTypeHelper.isActuallyTableAndNotTgroup(ro.sync.ecss.extensions.api.node.AuthorNode)
-
getTableCellSpanProvider
public AuthorTableCellSpanProvider getTableCellSpanProvider(AuthorElement tgroupElement)
Description copied from class:CALSDocumentTypeHelper
Creates anAuthorTableCellSpanProvider
corresponding to the table element.- Specified by:
getTableCellSpanProvider
in interfaceAuthorTableHelper
- Overrides:
getTableCellSpanProvider
in classCALSDocumentTypeHelper
- 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:
CALSDocumentTypeHelper.getTableCellSpanProvider(ro.sync.ecss.extensions.api.node.AuthorElement)
-
-