|
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.newRepairer.RepairCandidate
public class RepairCandidate
Implementation of the Repair interface for the thesis algorithm. This class represents repair candidate.
Constructor Summary | |
---|---|
RepairCandidate(Pair<Tuple,Tuple> tuplePair)
Constructor of the repair candidate. |
|
RepairCandidate(Pair<Tuple,Tuple> tuplePair,
Node unreliableNode,
RXMLTree tree,
double coeffK,
String path)
This constructor creates a repair candidate which marks provided node as unreliable. |
|
RepairCandidate(Pair<Tuple,Tuple> tuplePair,
Node valueNode,
String changedValue,
RXMLTree tree,
double coeffK,
String path,
boolean isNewValue)
This constructor creates a repair candidate which modifies node value. |
Method Summary | |
---|---|
void |
addToRepairGroup(RepairGroup repairGroup)
Adds this candidate to the provided repair group. |
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. |
boolean |
equals(Object obj)
|
String |
getContentAfterRepair()
Get the string representation of the modified part of the tree by this repair. |
FD |
getFD()
Get functional dependency this candidate is repairing validation for. |
Collection<String> |
getNodePaths()
Get paths of all nodes that are modified by this candidate. |
int |
getNodeSize()
Get number of nodes this repair is modifying. |
Pair<Tuple,Tuple> |
getTuplePair()
Get tuple pair this candidate is defined for. |
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. |
Map<Node,NodeValue> |
getValueNodes()
Get map of all nodes and theirs new values that have been modified by this repair. |
double |
getWeight()
Get weight of the repair candidate. |
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/ |
void |
setWeight(double weight)
Set weight of the repair candidate. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RepairCandidate(Pair<Tuple,Tuple> tuplePair)
tuplePair
- Tuple pair for which is this candidate created.public RepairCandidate(Pair<Tuple,Tuple> tuplePair, Node unreliableNode, RXMLTree tree, double coeffK, String path)
tuplePair
- Tuple pair for which is this candidate created.unreliableNode
- Node to be marked as unreliable.tree
- Tree for which is candidate created.coeffK
- coefficient k from thesis algorithm.path
- Path of the modified node for user selection purpose.public RepairCandidate(Pair<Tuple,Tuple> tuplePair, Node valueNode, String changedValue, RXMLTree tree, double coeffK, String path, boolean isNewValue)
tuplePair
- Tuple pair for which is this candidate created.valueNode
- Node to be modified.changedValue
- New value of the modified node.tree
- Tree for which is candidate created.coeffK
- coefficient k from thesis algorithm.path
- Path of the modified node for user selection purpose.isNewValue
- flag indicating if the new value is 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 String toString()
toString
in class Object
public void setWeight(double weight)
weight
- Weight to be set.public double getWeight()
public void addToRepairGroup(RepairGroup repairGroup)
repairGroup
- Repair group to be added this candidate.public String getContentAfterRepair() throws InterruptedException
InterruptedException
public Collection<String> getNodePaths()
public FD getFD()
public int getNodeSize()
public boolean isNewValue(Node node)
Repair
isNewValue
in interface Repair
node
- Node to be checked if its new value is generated.
public Pair<Tuple,Tuple> getTuplePair()
|
jInfer | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |