|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dlese.dpc.schemedit.input.SchemEditActionErrors.DocOrderComparator
public class SchemEditActionErrors.DocOrderComparator
Compares two "page error" actionMessages wrt to instance document order so that editing errors can be presented in the same order in which they occur in the document being edited.
"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 Summary | |
---|---|
SchemEditActionErrors.DocOrderComparator()
|
Method Summary | |
---|---|
int |
compare(Object o1,
Object o2)
sorts by order in which paths are processed by StructureWalker (and therefore are added to the SchemaNodeMap) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
equals |
Constructor Detail |
---|
public SchemEditActionErrors.DocOrderComparator()
Method Detail |
---|
public int compare(Object o1, Object o2)
compare
in interface Comparator
o1
- NOT YET DOCUMENTEDo2
- NOT YET DOCUMENTED
|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |