|
jInfer | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.mff.ksi.jinfer.functionalDependencies.repairer.RepairImpl
public class RepairImpl
Implementation of the Repair interface for the original algorithm.
Field Summary | |
---|---|
static int |
COMPARE_EQUAL
|
static int |
COMPARE_GREATER
|
static int |
COMPARE_SMALLER
|
static int |
COMPARE_UNAVAILABLE
|
Constructor Summary | |
---|---|
RepairImpl()
Default constructor. |
|
RepairImpl(Node unreliableNode)
Constructor creating repair that mark node as unreliable. |
|
RepairImpl(Node valueNode,
String changedValue,
boolean isNewValue)
Constructor creating a repair that modifies node value. |
Method Summary | |
---|---|
void |
addUnreliableNode(Node node)
Add node that will be marked as unreliable by this repair. |
void |
addUnreliableNodes(Set<Node> nodes)
Add set of nodes that will be marked as unreliable by this repair. |
void |
addValueNode(Node node,
NodeValue value)
Add node and the new node value to this repair. |
int |
compareTo(RepairImpl repair)
Compare this Repair with repair in parameter and returns -1, 0, 1 or 2 if this repair is smaller, equal, greater or unable to comapre with another repair. |
boolean |
equals(Object obj)
|
Collection<Node> |
getFalseNodes()
Get all nodes that have been marked as unreliable. |
Collection<Node> |
getModifiedNodes()
Get all nodes that have been marked as unreliable and the value have been changed. |
Node |
getUnreliableNode()
Get the root node which was marked as unreliable by this repair. |
Set<Node> |
getUnreliableNodes()
Get set of all nodes marked as unreliable by this repair. |
Collection<Node> |
getUpdatedNodes()
Get all nodes that the value is changed. |
Map<Node,NodeValue> |
getValueNodes()
Get map of all nodes and theirs new values that have been modified by this repair. |
int |
hashCode()
|
boolean |
hasReliabilityRepair()
Check if this repair contains reliability modification of the XML tree node. |
boolean |
hasValueRepair()
Check ig this repair contains value modification of the XML tree node. |
boolean |
isNewValue(Node node)
Check if provided node value is modified to the newly generated one/ |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int COMPARE_SMALLER
public static final int COMPARE_EQUAL
public static final int COMPARE_GREATER
public static final int COMPARE_UNAVAILABLE
Constructor Detail |
---|
public RepairImpl()
public RepairImpl(Node unreliableNode)
unreliableNode
- Node to be marked as unreliable.public RepairImpl(Node valueNode, String changedValue, boolean isNewValue)
valueNode
- Node to be modified.changedValue
- New value of the node.isNewValue
- flag indicating that the value is newly generated.Method Detail |
---|
public boolean hasReliabilityRepair()
Repair
hasReliabilityRepair
in interface Repair
public Set<Node> getUnreliableNodes()
Repair
getUnreliableNodes
in interface Repair
public Node getUnreliableNode()
Repair
getUnreliableNode
in interface Repair
public Map<Node,NodeValue> getValueNodes()
Repair
getValueNodes
in interface Repair
public void addUnreliableNodes(Set<Node> nodes)
Repair
addUnreliableNodes
in interface Repair
nodes
- Set of nodes to be marked as unreliable.public boolean hasValueRepair()
Repair
hasValueRepair
in interface Repair
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void addUnreliableNode(Node node)
Repair
addUnreliableNode
in interface Repair
node
- Node to be marked as unreliable.public void addValueNode(Node node, NodeValue value)
Repair
addValueNode
in interface Repair
node
- Node to be changed by this repair.value
- New value of the changed node.public int compareTo(RepairImpl repair)
compareTo
in interface Comparable<RepairImpl>
repair
- The repair with compare to.
public Collection<Node> getUpdatedNodes()
public Collection<Node> getFalseNodes()
public Collection<Node> getModifiedNodes()
public String toString()
toString
in class Object
public boolean isNewValue(Node node)
Repair
isNewValue
in interface Repair
node
- Node to be checked if its new value is generated.
|
jInfer | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |