001package org.hl7.fhir.r5.utils.validation.constants; 002 003public enum ReferenceValidationPolicy { 004 IGNORE, 005 CHECK_TYPE_IF_EXISTS, 006 CHECK_EXISTS, 007 CHECK_EXISTS_AND_TYPE, 008 CHECK_VALID; 009 010 public boolean ignore() { 011 return this == IGNORE; 012 } 013 014 public boolean checkExists() { 015 return this == CHECK_EXISTS_AND_TYPE || this == CHECK_EXISTS || this == CHECK_VALID || this == CHECK_TYPE_IF_EXISTS; 016 } 017 018 public boolean checkType() { 019 return this == CHECK_TYPE_IF_EXISTS || this == CHECK_EXISTS_AND_TYPE || this == CHECK_VALID; 020 } 021 022 public boolean checkValid() { 023 return this == CHECK_VALID; 024 } 025}