public class Repair
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
isEvaluated
State of the fully intent repair evaluation.
|
protected NodeRepair |
nodeRepair
Reference to the node repair.
|
Modifier | Constructor and Description |
---|---|
|
Repair(Intent associatedIntent)
Creates a new instance of the intent repair structure.
|
|
Repair(Intent associatedIntent,
Graph correctionGraph)
Creates a new instance of the intent repair structure.
|
protected |
Repair(Intent associatedIntent,
NodeRepair nodeRepair,
SequenceRepair sequenceRepair)
Deprecated.
Only for testing purposes only!
|
Modifier and Type | Method and Description |
---|---|
boolean |
exportIntentFix(java.lang.String fileName)
Exports generated intent fix into an external file.
|
protected void |
gatherInvolvedRepairs(java.util.Map<java.lang.String,Repair> nestedRepairs)
Collects all nested intent repairs that are involved in shortest paths.
|
protected void |
gatherInvolvedRepairs(java.util.Map<java.lang.String,Repair> nestedRepairs,
java.util.List<java.util.List<Edge>> shortestPaths)
Collects all nested intent repairs that are involved in shortest paths.
|
Intent |
getCorrectionIntent()
Returns the reference to the associated correction intent.
|
java.util.List<java.util.List<Edit>> |
getIntentFix()
Returns the set of all found repairing edit sequences.
|
java.util.List<Mend> |
getIntentMends()
Returns the set of all mends for the intent repair.
|
NodeRepair |
getNodeRepair()
Returns the associated node repair.
|
SequenceRepair |
getSequenceRepair()
Returns the reference to the sequence repair.
|
int |
getTotalCost()
Returns the overall intent repair cost.
|
boolean |
isCompletelyEvaluated()
Returns the value of the flag of fully evaluated sequence repair.
|
void |
printDebugDump()
Prints the debugging dump of the repair intent structure.
|
void |
printDebugDump(java.lang.String indentPrefix)
Prints the debugging dump of the repair intent structure.
|
void |
printFixesDump()
Prints the dump of computed fixes, i.e.
|
protected void |
printPathsDump(java.lang.String indentPrefix)
Prints the list of all shortest paths of the given repair.
|
protected void |
printPathsDump(java.lang.String indentPrefix,
java.util.List<java.util.List<Edge>> shortestPaths)
Prints the list of all provided paths.
|
void |
registerSequenceRepair(Graph correctionGraph)
Registers the provided multigraph with this repair.
|
void |
setCompletenessFlag()
Sets the repair evaluation flag as activated (to
true ). |
protected final NodeRepair nodeRepair
protected boolean isEvaluated
true
.setCompletenessFlag()
public Repair(Intent associatedIntent, Graph correctionGraph)
false
.associatedIntent
- Reference to the associated intent.correctionGraph
- Reference to the prepared multigraph.public Repair(Intent associatedIntent)
false
.
The omitted sequence repair (multigraph) can be registered later on.associatedIntent
- Reference to the associated intent.protected Repair(Intent associatedIntent, NodeRepair nodeRepair, SequenceRepair sequenceRepair)
associatedIntent
- Reference to the associated intent.nodeRepair
- Reference to the prepared node repair.sequenceRepair
- Reference to the prepared sequence repair.public void registerSequenceRepair(Graph correctionGraph)
correctionGraph
- Reference to the prepared multigraph.public Intent getCorrectionIntent()
public NodeRepair getNodeRepair()
public SequenceRepair getSequenceRepair()
public boolean isCompletelyEvaluated()
public void setCompletenessFlag()
true
).public int getTotalCost()
0
is transparently returned.public java.util.List<java.util.List<Edit>> getIntentFix()
public java.util.List<Mend> getIntentMends()
public boolean exportIntentFix(java.lang.String fileName)
fileName
- Name of the output file to be generated.true
on success.public void printDebugDump()
printDebugDump(java.lang.String)
public void printDebugDump(java.lang.String indentPrefix)
indentPrefix
- Optional initial output indentation string.protected void gatherInvolvedRepairs(java.util.Map<java.lang.String,Repair> nestedRepairs)
nestedRepairs
- Output container for gathered nested repairs.protected void gatherInvolvedRepairs(java.util.Map<java.lang.String,Repair> nestedRepairs, java.util.List<java.util.List<Edge>> shortestPaths)
nestedRepairs
- Output container for active nested repairs.shortestPaths
- Shortest paths to be printed and processed.protected void printPathsDump(java.lang.String indentPrefix)
indentPrefix
- Output indentation string.protected void printPathsDump(java.lang.String indentPrefix, java.util.List<java.util.List<Edge>> shortestPaths)
indentPrefix
- Output indentation string.shortestPaths
- Shortest paths to be printed.public void printFixesDump()