001package org.hl7.fhir.r5.fhirpath;
002
003import org.hl7.fhir.utilities.Utilities;
004
005public class FHIRPathConstant {
006
007  public static boolean isFHIRPathConstant(String string) {
008    return !Utilities.noString(string) && ((string.charAt(0) == '\'' || string.charAt(0) == '"') || string.charAt(0) == '@' || string.charAt(0) == '%' ||
009      string.charAt(0) == '-' || string.charAt(0) == '+' || (string.charAt(0) >= '0' && string.charAt(0) <= '9') ||
010      string.equals("true") || string.equals("false") || string.equals("{}"));
011  }
012
013  public static boolean isFHIRPathFixedName(String string) {
014    return string != null && (string.charAt(0) == '`');
015  }
016
017  public static boolean isFHIRPathStringConstant(String string) {
018    return string.charAt(0) == '\'' || string.charAt(0) == '"' || string.charAt(0) == '`';
019  }
020}