001package org.hl7.fhir.dstu3.model.codesystems;
002
003
004
005
006/*
007  Copyright (c) 2011+, HL7, Inc.
008  All rights reserved.
009  
010  Redistribution and use in source and binary forms, with or without modification, 
011  are permitted provided that the following conditions are met:
012  
013   * Redistributions of source code must retain the above copyright notice, this 
014     list of conditions and the following disclaimer.
015   * Redistributions in binary form must reproduce the above copyright notice, 
016     this list of conditions and the following disclaimer in the documentation 
017     and/or other materials provided with the distribution.
018   * Neither the name of HL7 nor the names of its contributors may be used to 
019     endorse or promote products derived from this software without specific 
020     prior written permission.
021  
022  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
023  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
024  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
025  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
026  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
027  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
028  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
029  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
030  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
031  POSSIBILITY OF SUCH DAMAGE.
032  
033*/
034
035// Generated on Sat, Mar 25, 2017 21:03-0400 for FHIR v3.0.0
036
037
038import org.hl7.fhir.exceptions.FHIRException;
039
040public enum AssertOperatorCodes {
041
042        /**
043         * Default value. Equals comparison.
044         */
045        EQUALS, 
046        /**
047         * Not equals comparison.
048         */
049        NOTEQUALS, 
050        /**
051         * Compare value within a known set of values.
052         */
053        IN, 
054        /**
055         * Compare value not within a known set of values.
056         */
057        NOTIN, 
058        /**
059         * Compare value to be greater than a known value.
060         */
061        GREATERTHAN, 
062        /**
063         * Compare value to be less than a known value.
064         */
065        LESSTHAN, 
066        /**
067         * Compare value is empty.
068         */
069        EMPTY, 
070        /**
071         * Compare value is not empty.
072         */
073        NOTEMPTY, 
074        /**
075         * Compare value string contains a known value.
076         */
077        CONTAINS, 
078        /**
079         * Compare value string does not contain a known value.
080         */
081        NOTCONTAINS, 
082        /**
083         * Evaluate the fluentpath expression as a boolean condition.
084         */
085        EVAL, 
086        /**
087         * added to help the parsers
088         */
089        NULL;
090        public static AssertOperatorCodes fromCode(String codeString) throws FHIRException {
091            if (codeString == null || "".equals(codeString))
092                return null;
093        if ("equals".equals(codeString))
094          return EQUALS;
095        if ("notEquals".equals(codeString))
096          return NOTEQUALS;
097        if ("in".equals(codeString))
098          return IN;
099        if ("notIn".equals(codeString))
100          return NOTIN;
101        if ("greaterThan".equals(codeString))
102          return GREATERTHAN;
103        if ("lessThan".equals(codeString))
104          return LESSTHAN;
105        if ("empty".equals(codeString))
106          return EMPTY;
107        if ("notEmpty".equals(codeString))
108          return NOTEMPTY;
109        if ("contains".equals(codeString))
110          return CONTAINS;
111        if ("notContains".equals(codeString))
112          return NOTCONTAINS;
113        if ("eval".equals(codeString))
114          return EVAL;
115        throw new FHIRException("Unknown AssertOperatorCodes code '"+codeString+"'");
116        }
117        public String toCode() {
118          switch (this) {
119            case EQUALS: return "equals";
120            case NOTEQUALS: return "notEquals";
121            case IN: return "in";
122            case NOTIN: return "notIn";
123            case GREATERTHAN: return "greaterThan";
124            case LESSTHAN: return "lessThan";
125            case EMPTY: return "empty";
126            case NOTEMPTY: return "notEmpty";
127            case CONTAINS: return "contains";
128            case NOTCONTAINS: return "notContains";
129            case EVAL: return "eval";
130            case NULL: return null;
131            default: return "?";
132          }
133        }
134        public String getSystem() {
135          return "http://hl7.org/fhir/assert-operator-codes";
136        }
137        public String getDefinition() {
138          switch (this) {
139            case EQUALS: return "Default value. Equals comparison.";
140            case NOTEQUALS: return "Not equals comparison.";
141            case IN: return "Compare value within a known set of values.";
142            case NOTIN: return "Compare value not within a known set of values.";
143            case GREATERTHAN: return "Compare value to be greater than a known value.";
144            case LESSTHAN: return "Compare value to be less than a known value.";
145            case EMPTY: return "Compare value is empty.";
146            case NOTEMPTY: return "Compare value is not empty.";
147            case CONTAINS: return "Compare value string contains a known value.";
148            case NOTCONTAINS: return "Compare value string does not contain a known value.";
149            case EVAL: return "Evaluate the fluentpath expression as a boolean condition.";
150            case NULL: return null;
151            default: return "?";
152          }
153        }
154        public String getDisplay() {
155          switch (this) {
156            case EQUALS: return "equals";
157            case NOTEQUALS: return "notEquals";
158            case IN: return "in";
159            case NOTIN: return "notIn";
160            case GREATERTHAN: return "greaterThan";
161            case LESSTHAN: return "lessThan";
162            case EMPTY: return "empty";
163            case NOTEMPTY: return "notEmpty";
164            case CONTAINS: return "contains";
165            case NOTCONTAINS: return "notContains";
166            case EVAL: return "evaluate";
167            case NULL: return null;
168            default: return "?";
169          }
170    }
171
172
173}