org.kuali.rice.krms.api.repository
Class Proposition

java.lang.Object
  extended by org.kuali.rice.krms.api.repository.Proposition
All Implemented Interfaces:
Serializable, org.kuali.rice.core.api.mo.ModelObjectBasic, org.kuali.rice.core.api.mo.ModelObjectComplete, PropositionContract

public final class Proposition
extends Object
implements PropositionContract, org.kuali.rice.core.api.mo.ModelObjectComplete

Concrete model object implementation of KRMS Proposition. Immutable. Instances of Proposition can be (un)marshalled to and from XML. There are three main types of Propositions: 1. Compound Propositions - a proposition consisting of other propositions and a boolean algebra operator (AND, OR) defining how to evaluate those propositions. 2. Parameterized Propositions - a proposition which is parameterized by some set of values, evaluation logic is implemented by hand and returns true or false 3. Simple Propositions - a proposition of the form lhs op rhs where lhs=left-hand side, rhs=right-hand side, and op=operator Propositions are reference by a rule or another proposition (in the case of compound propositions). Propositions are never re-used across multiple rules. Each proposition can have zero or more parameters. The proposition parameter is the primary data element used to define the proposition. (@see PropositionParameter)

See Also:
PropositonContract, PropositionParameterContract, Serialized Form

Nested Class Summary
static class Proposition.Builder
          This builder is used to construct instances of KRMS Proposition.
static class Proposition.Elements
          A private class which exposes constants which define the XML element names to use when this object is marshalled to XML.
static class Proposition.PropositionTypes
          This enumeration identifies the valid Proposition type codes The PropositionType enumeration lists the appropriate types of propositions The valid types are: Compound Propositions - a proposition consisting of other propositions and a boolean algebra operator (AND, OR) defining how to evaluate those propositions Parameterized Propositions - a proposition which is parameterized by some set of values, evaluation logic is implemented by hand and returns true or false Simple Propositions - a proposition of the form lhs op rhs where lhs=left-hand side, rhs=right-hand side, and op=operator
 
Method Summary
 boolean equals(Object obj)
           
 List<Proposition> getCompoundComponents()
          This method returns the propositions which are contained in a compound proposition.
 String getCompoundOpCode()
          This method returns the op code to be used when evaluating compound propositions.
 String getDescription()
          This is the description text for the KRMS proposition
 List<PropositionParameter> getParameters()
          This is the parameter list of the proposition.
 String getPropId()
          This is the ID for the KRMS proposition
 String getPropositionTypeCode()
           There are three main types of Propositions: Compound Propositions - a proposition consisting of other propositions and a boolean algebra operator (AND, OR) defining how to evaluate those propositions.
 String getTypeId()
          This is the id of Proposition KrmsType of the proposition.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getPropId

public String getPropId()
Description copied from interface: PropositionContract
This is the ID for the KRMS proposition

Specified by:
getPropId in interface PropositionContract
Returns:
ID for KRMS proposition.

getDescription

public String getDescription()
Description copied from interface: PropositionContract
This is the description text for the KRMS proposition

Specified by:
getDescription in interface PropositionContract
Returns:
description for KRMS type.

getTypeId

public String getTypeId()
Description copied from interface: PropositionContract
This is the id of Proposition KrmsType of the proposition. It provides some context to what type of object of the KRMS type.

Specified by:
getTypeId in interface PropositionContract
Returns:
the id of the KRMS type.

getPropositionTypeCode

public String getPropositionTypeCode()
Description copied from interface: PropositionContract

There are three main types of Propositions: Compound Propositions - a proposition consisting of other propositions and a boolean algebra operator (AND, OR) defining how to evaluate those propositions. Parameterized Propositions - a proposition which is parameterized by some set of values, evaluation logic is implemented by hand and returns true or false Simple Propositions - a proposition of the form lhs op rhs where lhs=left-hand side, rhs=right-hand side, and op=operator

Specified by:
getPropositionTypeCode in interface PropositionContract
Returns:
the proposition type code of the proposition

Valid values are C = compound, P = parameterized, S = simple


getParameters

public List<PropositionParameter> getParameters()
Description copied from interface: PropositionContract
This is the parameter list of the proposition. Parameters are listed in Reverse Polish Notation. Parameters may be constants, terms, or functions.

Compound Propositions will have an empty parameter list.

Specified by:
getParameters in interface PropositionContract
Returns:
the Parameters related to the proposition
See Also:
PropositionParameter

getCompoundOpCode

public String getCompoundOpCode()
Description copied from interface: PropositionContract
This method returns the op code to be used when evaluating compound propositions.

Specified by:
getCompoundOpCode in interface PropositionContract
Returns:
the compound op code. valid values are A = and, O = or

getCompoundComponents

public List<Proposition> getCompoundComponents()
Description copied from interface: PropositionContract
This method returns the propositions which are contained in a compound proposition.

Specified by:
getCompoundComponents in interface PropositionContract
Returns:

hashCode

public int hashCode()
Specified by:
hashCode in interface org.kuali.rice.core.api.mo.ModelObjectComplete
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Specified by:
equals in interface org.kuali.rice.core.api.mo.ModelObjectComplete
Overrides:
equals in class Object

toString

public String toString()
Specified by:
toString in interface org.kuali.rice.core.api.mo.ModelObjectBasic
Overrides:
toString in class Object


Copyright © 2007-2011 The Kuali Foundation. All Rights Reserved.