Package ru.ewc.decita.manual
Class ManualComputation
java.lang.Object
ru.ewc.decita.manual.ManualComputation
I am a unique instance of a
DecisionTable
computation.- Since:
- 0.2.2
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionConverts yaml data read from input stream to a correctInMemoryStorage
object.Computes the decision for a specified table.Creates a copy of this instance with a new path to state yaml.Creates a copy of this instance with a new path to tables folder.Reads all the tables from disk in a format suitable to constructComputationContext
.static URI
Converts a string representation of the file system path to a correct URI.
-
Constructor Details
-
ManualComputation
public ManualComputation()Default Ctor.
-
-
Method Details
-
uriFrom
Converts a string representation of the file system path to a correct URI.- Parameters:
path
- File system path as a String.- Returns:
- URI that corresponds to a given path.
-
tablesAsLocators
Reads all the tables from disk in a format suitable to constructComputationContext
.- Returns:
- A dictionary of
DecisionTable
s.
-
statePath
Creates a copy of this instance with a new path to state yaml.- Parameters:
path
- Path to a file that holds the current state's description.- Returns:
- A new instance of
ManualComputation
.
-
tablePath
Creates a copy of this instance with a new path to tables folder.- Parameters:
path
- Path to a folder containing all the decision tables.- Returns:
- A new instance of
ManualComputation
.
-
currentState
Converts yaml data read from input stream to a correctInMemoryStorage
object.- Returns:
- The collection of
InMemoryStorage
objects.
-
decideFor
Computes the decision for a specified table.- Parameters:
table
- Name of the tables to make a decision against.- Returns:
- The collection of outcomes from the specified table.
- Throws:
DecitaException
- If the table could not be found or computed.
-