Class SchemEditActionErrors.DocOrderComparator
- All Implemented Interfaces:
Comparator
- Enclosing class:
SchemEditActionErrors
"Page error" ActionMessages contain their xpath as the second item of their "values". NOTE: This is dependent on the message resource used to format the errors (see SchemEditValidator invalid input: '&' SchemEditErrors).
Algorithm: First compare segment by segment: - if there is indexing info at the given segment, then compare index numbers - if one elment runs out of indexing info before tie is broken, compare by schemaPaths
The SchemaNodeMap.DocOrderComparator can determine schema order of paths, which can be used to order instance document paths, as long as there are no indexes (since indexing information is removed from the schema paths).
If two paths are judged equal by schema order, then they can be simply compared as strings to bring the indexing information in and resolve the tie.
- Author:
- Jonathan Ostwald
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
DocOrderComparator
public DocOrderComparator()
-
-
Method Details
-
compare
sorts by order in which paths are processed by StructureWalker (and therefore are added to the SchemaNodeMap)- Specified by:
comparein interfaceComparator- Parameters:
o1- NOT YET DOCUMENTEDo2- NOT YET DOCUMENTED- Returns:
- NOT YET DOCUMENTED
-