Class CALSAndHTMLTableSortOperation
java.lang.Object
ro.sync.ecss.extensions.commons.sort.SortOperation
ro.sync.ecss.extensions.commons.sort.TableSortOperation
ro.sync.ecss.extensions.commons.table.operations.cals.CALSAndHTMLTableSortOperation
- All Implemented Interfaces:
AuthorOperation
,Extension
- Direct Known Subclasses:
DITACALSTableSortOperation
,DocbookCALSTableSortOperation
,XHTMLTableSortOperation
@API(type=INTERNAL,
src=PUBLIC)
public abstract class CALSAndHTMLTableSortOperation
extends TableSortOperation
Table sort operation base for CALS and HTML tables.
-
Field Summary
Fields inherited from class ro.sync.ecss.extensions.commons.sort.SortOperation
authorAccess, COLUMN
Fields inherited from interface ro.sync.ecss.extensions.api.AuthorOperation
NAMESPACE_ARGUMENT, NAMESPACE_ARGUMENT_DESCRIPTOR, SCHEMA_AWARE_ARGUMENT, SCHEMA_AWARE_ARGUMENT_DESCRIPTOR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
protected int
getRowIndexForTableBody
(AuthorNode parent) Returns the visual row index of the actual table body if the table has separate head, foot element and table group elements.getSortCriteria
(AuthorElement parent) Obtain the sort criterion.String[]
getSortKeysValues
(AuthorNode node, SortCriteriaInformation sortInfo) Obtain the values of the keys that can be used for sorting.getSortParent
(int offset, AuthorAccess authorAccess) Obtain the parent node of all the nodes which will be sorted.boolean
isCaretInColumn
(AuthorAccess authorAccess, int columnNumber) Checks if the caret is in a cell which is in the given column.boolean
isIgnored
(AuthorNode node) Checks if a given node is ignored when sorting.abstract boolean
isTable
(AuthorElement element) Returnstrue
if the given element is a table header element.abstract boolean
isTableBody
(AuthorElement element) Returnstrue
if the given element is the table body element.abstract boolean
isTableFoot
(AuthorElement element) Returnstrue
if the given element is a table footer element.abstract boolean
isTableGroup
(AuthorElement element) Returnstrue
if the given element is a table header element.abstract boolean
isTableHead
(AuthorElement element) Returnstrue
if the given element is a table header element.abstract boolean
isTableRow
(AuthorElement element) Returnstrue
if the given element is a table row element.Methods inherited from class ro.sync.ecss.extensions.commons.sort.TableSortOperation
canBeSorted, getHelpPageID
Methods inherited from class ro.sync.ecss.extensions.commons.sort.SortOperation
doOperation, getArguments, getDescription, getNonIgnoredChildren, getSelectedNonIgnoredChildrenInterval, getTextContentToSort
-
Constructor Details
-
CALSAndHTMLTableSortOperation
public CALSAndHTMLTableSortOperation()
-
-
Method Details
-
getSortParent
public AuthorElement getSortParent(int offset, AuthorAccess authorAccess) throws AuthorOperationException Description copied from class:SortOperation
Obtain the parent node of all the nodes which will be sorted.- Specified by:
getSortParent
in classSortOperation
- Parameters:
offset
- The offset where the operation was invoked.authorAccess
- TheAuthorAccess
.- Returns:
- The parent node of the nodes which will be sorted.
- Throws:
AuthorOperationException
- When the offset is negative or greater than the content length.- See Also:
-
isIgnored
Description copied from class:SortOperation
Checks if a given node is ignored when sorting.- Specified by:
isIgnored
in classSortOperation
- Parameters:
node
- The node to be checked.- Returns:
true
if the given node is ignored when sorting.- See Also:
-
getSortKeysValues
public String[] getSortKeysValues(AuthorNode node, SortCriteriaInformation sortInfo) throws AuthorOperationException Description copied from class:SortOperation
Obtain the values of the keys that can be used for sorting.- Specified by:
getSortKeysValues
in classSortOperation
- Parameters:
node
- The element which will be sorted.sortInfo
- The sort information corresponding to the user choice.- Returns:
- an array containing the values of the keys which can be used for sorting.
- Throws:
AuthorOperationException
- If the text content cannot be obtained.- See Also:
-
getSortCriteria
public List<CriterionInformation> getSortCriteria(AuthorElement parent) throws AuthorOperationException Description copied from class:SortOperation
Obtain the sort criterion.- Specified by:
getSortCriteria
in classSortOperation
- Parameters:
parent
- The parent node of the nodes which will be sorted.- Returns:
- A
SortCriteriaInformation
containing theCriterionInformation
objects. - Throws:
AuthorOperationException
- See Also:
-
forceSortAll
protected boolean forceSortAll()- Overrides:
forceSortAll
in classSortOperation
- Returns:
true
if the sort operation should not use the selected element and should always sort all elements.- See Also:
-
isCaretInColumn
Checks if the caret is in a cell which is in the given column.- Parameters:
authorAccess
- The author access.columnNumber
- The number of the column in which to check.- Returns:
true
if the given column has a cell which contains the caret.
-
getRowIndexForTableBody
Description copied from class:TableSortOperation
Returns the visual row index of the actual table body if the table has separate head, foot element and table group elements.- Specified by:
getRowIndexForTableBody
in classTableSortOperation
- See Also:
-
isTableBody
Returnstrue
if the given element is the table body element.- Parameters:
element
- The element to be checked.- Returns:
true
if the given element is the table body element.
-
isTableRow
Returnstrue
if the given element is a table row element.- Parameters:
element
- The element to be checked.- Returns:
true
if the given element is a table row element.
-
isTableHead
Returnstrue
if the given element is a table header element.- Parameters:
element
- The element to be checked.- Returns:
true
if the given element is a table header element.
-
isTableFoot
Returnstrue
if the given element is a table footer element.- Parameters:
element
- The element to be checked.- Returns:
true
if the given element is a table footer element.
-
isTable
Returnstrue
if the given element is a table header element.- Parameters:
element
- The element to be checked.- Returns:
true
if the given element is a table header element.
-
isTableGroup
Returnstrue
if the given element is a table header element.- Parameters:
element
- The element to be checked.- Returns:
true
if the given element is a table header element.
-