Class Plan
- java.lang.Object
-
- org.aksw.limes.core.execution.planning.plan.Plan
-
- Direct Known Subclasses:
NestedPlan
public class Plan extends Object implements IPlan
Implements the plan of a link specification. A plan consists of a set of instructions that are going to be executed sequentially or in parallel by an execution engine.- Version:
- 1.0
- Author:
- Axel-C. Ngonga Ngomo (ngonga@informatik.uni-leipzig.de), Kleanthi Georgala (georgala@informatik.uni-leipzig.de)
-
-
Field Summary
Fields Modifier and Type Field Description protected List<Instruction>instructionListThe list of instructions of the plan.protected doublemappingSizeThe size of returned mapping of the plan.protected doubleruntimeCostThe runtime of the plan.protected doubleselectivityThe selectivity of the plan.
-
Constructor Summary
Constructors Constructor Description Plan()Constructor of Plan class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddInstruction(Instruction instruction)Adds an instruction to the instructionList.Planclone()Returns a clone of the current plan.booleanequals(Object other)Checks if two plans are equal.List<Instruction>getInstructionList()Returns the list of instructions contained in a instructionList.doublegetMappingSize()Returns the mapping size of the plan.doublegetRuntimeCost()Returns the runtime cost of the current plan.doublegetSelectivity()Returns the selectivity of the plan.inthashCode()booleanisEmpty()Checks whether the instructionList of the current plan is empty.voidremoveInstruction(int index)Removes the i-th instruction from the instructionList.voidremoveInstruction(Instruction instruction)Removes an instruction from a instructionList.voidsetInstructionList(List<Instruction> instructionList)Sets the instructionList of the plan.voidsetMappingSize(double mappingSize)Sets the mapping size of the plan.voidsetRuntimeCost(double runtimeCost)Sets the runtime cost of the plan.voidsetSelectivity(double selectivity)Sets the selectivity of the plan.intsize()Returns the size of the current plan.
-
-
-
Field Detail
-
runtimeCost
protected double runtimeCost
The runtime of the plan.
-
mappingSize
protected double mappingSize
The size of returned mapping of the plan.
-
selectivity
protected double selectivity
The selectivity of the plan.
-
instructionList
protected List<Instruction> instructionList
The list of instructions of the plan.
-
-
Method Detail
-
addInstruction
public void addInstruction(Instruction instruction)
Adds an instruction to the instructionList. Each new instruction is added at the end of the list. If an instructions can not be added, a corresponding message is displayed.- Specified by:
addInstructionin interfaceIPlan- Parameters:
instruction- The Instruction to add
-
removeInstruction
public void removeInstruction(int index)
Removes the i-th instruction from the instructionList. If the index is lower than 0 or higher than the size of the current list, the removal fails and a corresponding message is displayed.- Specified by:
removeInstructionin interfaceIPlan- Parameters:
index- Index of instruction to remove
-
removeInstruction
public void removeInstruction(Instruction instruction)
Removes an instruction from a instructionList.- Specified by:
removeInstructionin interfaceIPlan- Parameters:
instruction- Instruction to remove
-
getInstructionList
public List<Instruction> getInstructionList()
Returns the list of instructions contained in a instructionList.- Specified by:
getInstructionListin interfaceIPlan- Returns:
- List of instructions
-
setInstructionList
public void setInstructionList(List<Instruction> instructionList)
Sets the instructionList of the plan.- Parameters:
instructionList- The instruction list to set
-
isEmpty
public boolean isEmpty()
Checks whether the instructionList of the current plan is empty.- Returns:
- true if it is empty or false otherwise
-
equals
public boolean equals(Object other)
Checks if two plans are equal. Two plans are equal if their instructions lists are the same.
-
clone
public Plan clone()
Returns a clone of the current plan. Each non-primitive field of the current plan is cloned by invoking the clone function of the corresponding class.
-
size
public int size()
Returns the size of the current plan. The size of a plan is equal to the size of its instruction list.- Returns:
- the size of the plan
-
getRuntimeCost
public double getRuntimeCost()
Returns the runtime cost of the current plan.- Returns:
- the runtime of the current plan
-
setRuntimeCost
public void setRuntimeCost(double runtimeCost)
Sets the runtime cost of the plan.- Parameters:
runtimeCost- The runtime cost to set
-
getMappingSize
public double getMappingSize()
Returns the mapping size of the plan.- Returns:
- the mapping size of the current plan
-
setMappingSize
public void setMappingSize(double mappingSize)
Sets the mapping size of the plan.- Parameters:
mappingSize- The mapping size to set
-
getSelectivity
public double getSelectivity()
Returns the selectivity of the plan.- Returns:
- the selectivity of the current plan
-
setSelectivity
public void setSelectivity(double selectivity)
Sets the selectivity of the plan.- Parameters:
selectivity- The selectivity value to set
-
-