Package org.apache.uima.cas.admin
Interface LinearTypeOrderBuilder
-
- All Known Implementing Classes:
LinearTypeOrderBuilderImpl
public interface LinearTypeOrderBuilder
Defines a pre-order on types. This pre-order is later embedded in a total order an can be used in index comparators.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(String[] types)
Add pairs types[i] < types[i+1], for each i < (types.length-1), to the partial sort order.LinearTypeOrder
getOrder()
Return a total order of the type names added earlier that is consistent with the pre-order defined through calls to add().
-
-
-
Method Detail
-
add
void add(String[] types) throws CASException
Add pairs types[i] < types[i+1], for each i < (types.length-1), to the partial sort order. This method can be called as often as desired. It will throw an exception if the pairs could not be successfully added to the relation. A pair can not be added if the resulting relation is no longer a partial order. If you need to know exactly which pair fails, always call add() with a two-element array.- Parameters:
types
- types to add- Throws:
CASException
- When adding pairs would make order inconsistent.
-
getOrder
LinearTypeOrder getOrder() throws CASException
Return a total order of the type names added earlier that is consistent with the pre-order defined through calls to add().- Returns:
- An array of Strings in ascending order.
- Throws:
CASException
- if any error
-
-