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, COLUMNFields 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 booleanprotected intgetRowIndexForTableBody(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.booleanisCaretInColumn(AuthorAccess authorAccess, int columnNumber) Checks if the caret is in a cell which is in the given column.booleanisIgnored(AuthorNode node) Checks if a given node is ignored when sorting.abstract booleanisTable(AuthorElement element) Returnstrueif the given element is a table header element.abstract booleanisTableBody(AuthorElement element) Returnstrueif the given element is the table body element.abstract booleanisTableFoot(AuthorElement element) Returnstrueif the given element is a table footer element.abstract booleanisTableGroup(AuthorElement element) Returnstrueif the given element is a table header element.abstract booleanisTableHead(AuthorElement element) Returnstrueif the given element is a table header element.abstract booleanisTableRow(AuthorElement element) Returnstrueif the given element is a table row element.Methods inherited from class ro.sync.ecss.extensions.commons.sort.TableSortOperation
canBeSorted, getHelpPageIDMethods 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:SortOperationObtain the parent node of all the nodes which will be sorted.- Specified by:
getSortParentin 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:SortOperationChecks if a given node is ignored when sorting.- Specified by:
isIgnoredin classSortOperation- Parameters:
node- The node to be checked.- Returns:
trueif the given node is ignored when sorting.- See Also:
-
getSortKeysValues
public String[] getSortKeysValues(AuthorNode node, SortCriteriaInformation sortInfo) throws AuthorOperationException Description copied from class:SortOperationObtain the values of the keys that can be used for sorting.- Specified by:
getSortKeysValuesin 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:SortOperationObtain the sort criterion.- Specified by:
getSortCriteriain classSortOperation- Parameters:
parent- The parent node of the nodes which will be sorted.- Returns:
- A
SortCriteriaInformationcontaining theCriterionInformationobjects. - Throws:
AuthorOperationException- See Also:
-
forceSortAll
protected boolean forceSortAll()- Overrides:
forceSortAllin classSortOperation- Returns:
trueif 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:
trueif the given column has a cell which contains the caret.
-
getRowIndexForTableBody
Description copied from class:TableSortOperationReturns the visual row index of the actual table body if the table has separate head, foot element and table group elements.- Specified by:
getRowIndexForTableBodyin classTableSortOperation- See Also:
-
isTableBody
Returnstrueif the given element is the table body element.- Parameters:
element- The element to be checked.- Returns:
trueif the given element is the table body element.
-
isTableRow
Returnstrueif the given element is a table row element.- Parameters:
element- The element to be checked.- Returns:
trueif the given element is a table row element.
-
isTableHead
Returnstrueif the given element is a table header element.- Parameters:
element- The element to be checked.- Returns:
trueif the given element is a table header element.
-
isTableFoot
Returnstrueif the given element is a table footer element.- Parameters:
element- The element to be checked.- Returns:
trueif the given element is a table footer element.
-
isTable
Returnstrueif the given element is a table header element.- Parameters:
element- The element to be checked.- Returns:
trueif the given element is a table header element.
-
isTableGroup
Returnstrueif the given element is a table header element.- Parameters:
element- The element to be checked.- Returns:
trueif the given element is a table header element.
-