|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.UCL.xmiddle.lib.reconciliation.Resolutor
This defines an abstract class which Resolutor subclasses extend. Resolutors define which Resolutor types they can handle, and the priority of the handled types. For example, the Replace Resolutor can handle both 'keepSelf' and 'keepOther'. In the event of a conflict between resolutor types, the priorities of each can be checked, and the one with the greater priority kept.
Field Summary | |
protected java.lang.String |
NAME
|
protected double |
PRIORITY
|
protected java.util.Hashtable |
types
|
Constructor Summary | |
Resolutor()
Constructor. |
Method Summary | |
protected void |
addType(java.lang.String name)
|
int |
compareTo(Resolutor compare)
Compares the priority with a given one. |
int |
compareTypes(java.lang.String one,
java.lang.String two)
Compares the priorities of two given resolutors. |
java.lang.String |
getName()
Returns the name of this Resolutor. |
double |
getPriority()
Returns the relative priority of this Resolutor. |
java.util.Set |
getTypes()
Returns the types handled by this Resolutor. |
abstract java.lang.String |
reconcile(java.lang.String local,
java.lang.String remote,
java.lang.String common,
java.lang.String type)
Reconciles the differences between the first String and the second String, using the given type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String NAME
protected double PRIORITY
protected java.util.Hashtable types
Constructor Detail |
public Resolutor()
Method Detail |
public java.lang.String getName()
public double getPriority()
double
holding the priority.public java.util.Set getTypes()
public int compareTo(Resolutor compare)
compare
- The Resolutor against which to compare.
int
set to '-1' if this < other,
'0' if this == other, or '1' if this > other.public int compareTypes(java.lang.String one, java.lang.String two)
one
- The first resolutor type.two
- The second resolutor type.
int
set to '-1' if one < two,
'0' if one == two, or '1' if one > two.protected void addType(java.lang.String name)
public abstract java.lang.String reconcile(java.lang.String local, java.lang.String remote, java.lang.String common, java.lang.String type)
null
.
type
- The resolutor type to be applied.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |