public class SchemEditActionErrors.DocOrderComparator
extends java.lang.Object
implements java.util.Comparator
"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 & 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.
Constructor and Description |
---|
DocOrderComparator() |
Modifier and Type | Method and Description |
---|---|
int |
compare(java.lang.Object o1,
java.lang.Object o2)
sorts by order in which paths are processed by StructureWalker (and
therefore are added to the SchemaNodeMap)
|
public int compare(java.lang.Object o1, java.lang.Object o2)
compare
in interface java.util.Comparator
o1
- NOT YET DOCUMENTEDo2
- NOT YET DOCUMENTED