| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| PropositionContract |
|
| 1.0;1 |
| 1 | package org.kuali.rice.krms.api.repository; | |
| 2 | ||
| 3 | import java.util.List; | |
| 4 | ||
| 5 | public interface PropositionContract { | |
| 6 | /** | |
| 7 | * This is the ID for the KRMS proposition | |
| 8 | * @return ID for KRMS proposition. | |
| 9 | */ | |
| 10 | public String getPropId(); | |
| 11 | ||
| 12 | /** | |
| 13 | * This is the description text for the KRMS proposition | |
| 14 | * @return description for KRMS type. | |
| 15 | */ | |
| 16 | public String getDescription(); | |
| 17 | ||
| 18 | /** | |
| 19 | * This is the id of Proposition KrmsType of the proposition. | |
| 20 | * It provides some context to what type of object of the KRMS type. | |
| 21 | * @return the id of the KRMS type. | |
| 22 | */ | |
| 23 | public String getTypeId(); | |
| 24 | ||
| 25 | /** | |
| 26 | * <p> | |
| 27 | * There are three main types of Propositions: | |
| 28 | * Compound Propositions - a proposition consisting of other propositions | |
| 29 | * and a boolean algebra operator (AND, OR) defining how to evaluate | |
| 30 | * those propositions. | |
| 31 | * Parameterized Propositions - a proposition which is parameterized by | |
| 32 | * some set of values, evaluation logic is implemented by hand and | |
| 33 | * returns true or false | |
| 34 | * Simple Propositions - a proposition of the form lhs op rhs where | |
| 35 | * lhs=left-hand side, rhs=right-hand side, and op=operator | |
| 36 | * </p> | |
| 37 | * @return the proposition type code of the proposition | |
| 38 | * <p> | |
| 39 | * Valid values are C = compound, P = parameterized, S = simple | |
| 40 | * </p> | |
| 41 | */ | |
| 42 | public String getPropositionTypeCode(); | |
| 43 | ||
| 44 | /** | |
| 45 | * This is the parameter list of the proposition. | |
| 46 | * Parameters are listed in Reverse Polish Notation. | |
| 47 | * Parameters may be constants, terms, or functions. | |
| 48 | * <p> | |
| 49 | * Compound Propositions will have an empty parameter list. | |
| 50 | * </p> | |
| 51 | * @see PropositionParameter | |
| 52 | * @return the Parameters related to the proposition | |
| 53 | */ | |
| 54 | public List<? extends PropositionParameterContract> getParameters(); | |
| 55 | ||
| 56 | /** | |
| 57 | * This method returns the op code to be used when evaluating compound | |
| 58 | * propositions. | |
| 59 | * | |
| 60 | * @return the compound op code. | |
| 61 | * valid values are A = and, O = or | |
| 62 | */ | |
| 63 | public String getCompoundOpCode(); | |
| 64 | ||
| 65 | /** | |
| 66 | * | |
| 67 | * This method returns the propositions which are contained in a | |
| 68 | * compound proposition. | |
| 69 | * | |
| 70 | * @return | |
| 71 | */ | |
| 72 | public List<? extends PropositionContract> getCompoundComponents(); | |
| 73 | } |