org.openmrs.arden
Class Comparison

java.lang.Object
  extended by org.openmrs.arden.Comparison
All Implemented Interfaces:
ArdenBaseTreeParserTokenTypes

public class Comparison
extends java.lang.Object
implements ArdenBaseTreeParserTokenTypes

This class translates comparisons within MLM if statements into java


Field Summary
 
Fields inherited from interface org.openmrs.arden.ArdenBaseTreeParserTokenTypes
ACTION, ACTION_OP, AFTER, AGE_MAX, AGE_MIN, AGO, AMPERSAND, AND, ANY, APOSTROPHE, ARDEN_CURLY_BRACKETS, ARE, AT, AUTHOR, AVERAGE, AVG, BE, BECOMES, BEFORE, CALL, CITATIONS, COLON, COMMA, COMMENT, CONCLUDE, COUNT, DATA, DATE, DAY, DAYS, DIGIT, DIV, DOT, EARLIEST, ELSE, ELSEIF, ENDBLOCK, ENDIF, EOF, EQUAL, EQUALS, EVENT, EXIST, EXISTS, EXPLANATION, FALSE, FILENAME, FIRST, FROM, GREATER, GT, GTE, HTTP, ID, IF, IN, INSTITUTION, INTLIT, IS, IT, KEYWORDS, KNOWLEDGE, LAST, LATEST, LESS, LET, LIBRARY, LINKS, LITERAL_arden, LITERAL_BOOLEAN, LITERAL_CALL, LITERAL_DATA, LITERAL_data_driven, LITERAL_DURATION, LITERAL_end, LITERAL_EQ, LITERAL_evoke, LITERAL_expired, LITERAL_GE, LITERAL_GT, LITERAL_hour, LITERAL_hours, LITERAL_LE, LITERAL_LIST, LITERAL_LT, LITERAL_MERGE, LITERAL_minute, LITERAL_minutes, LITERAL_NE, LITERAL_NULL, LITERAL_NUMBER, LITERAL_OBJECT, LITERAL_Occur, LITERAL_OCCUR, LITERAL_Occurred, LITERAL_OCCURRED, LITERAL_occurs, LITERAL_Occurs, LITERAL_OCCURS, LITERAL_PRESENT, LITERAL_production, LITERAL_REFUTE, LITERAL_seconds, LITERAL_SEQTO, LITERAL_SORT, LITERAL_STRING, LITERAL_SUPPORT, LITERAL_testing, LITERAL_urgency, LITERAL_validation, LOGIC, LPAREN, LT, LTE, MAINTENANCE, MAX, MAXIMUM, MEDIAN, MIN, MINIMUM, MINUS, ML_COMMENT, MLMNAME, MONTH, MONTHS, NE, NOT, NOT_COMMENT, NOW, NULL, NULL_TREE_LOOKAHEAD, NUMBER, OCCUR, OF, OR, PAST, PERCENT, PLUS, POUND, PRESENT, PRIORITY, PURPOSE, READ, RESEARCH, RPAREN, SECOND, SEMI, SINGLE_QUOTE, SPECIALIST, STRING_LITERAL, SUM, TERM_LITERAL, THAN, THE, THEN, THEY, TIME, TIMES, TITLE, TO, TRUE, TYPE, UNDERSCORE, VERSION, WAS, WEEK, WEEKS, WEIRD_IDENT, WERE, WHERE, WITH, WITHIN, WRITE, YEAR, YEARS
 
Constructor Summary
Comparison(java.lang.String key, java.lang.Integer operator)
           
 
Method Summary
 void addAnswerToList(java.lang.Object answer)
           
 java.lang.Object getAnswer()
           
 java.util.ArrayList<java.lang.Object> getAnswerList()
           
 java.lang.String getCompOpCode(MLMObjectElement objElement, boolean isAnswerVar)
           
 void setAnswer(java.lang.Object answer)
           
 void setKey(java.lang.String key, java.lang.String keyList)
           
 void setOperator(java.lang.Integer operator)
           
 void write(java.io.Writer w, MLMObjectElement objElement, boolean isAnswerVar)
           
 void writeComparisonList(java.io.Writer w)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Comparison

public Comparison(java.lang.String key,
                  java.lang.Integer operator)
Method Detail

setAnswer

public void setAnswer(java.lang.Object answer)

getAnswer

public java.lang.Object getAnswer()

setKey

public void setKey(java.lang.String key,
                   java.lang.String keyList)

setOperator

public void setOperator(java.lang.Integer operator)

addAnswerToList

public void addAnswerToList(java.lang.Object answer)

getAnswerList

public java.util.ArrayList<java.lang.Object> getAnswerList()

getCompOpCode

public java.lang.String getCompOpCode(MLMObjectElement objElement,
                                      boolean isAnswerVar)
                               throws java.lang.Exception
Throws:
java.lang.Exception

write

public void write(java.io.Writer w,
                  MLMObjectElement objElement,
                  boolean isAnswerVar)

writeComparisonList

public void writeComparisonList(java.io.Writer w)

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change