
001package org.hl7.fhir.r5.context; 002 003import lombok.Getter; 004import lombok.Setter; 005import lombok.With; 006 007public class ExpansionOptions { 008 @Getter @Setter @With 009 private boolean cacheOk; 010 011 @Getter @Setter @With 012 private boolean hierarchical; 013 014 /** 015 * the number of concepts to return. 016 * 017 * -1 means no limit 018 * 019 * (0 means, check that the value set expands(/exists) but don't return any concepts) 020 * 021 */ 022 @Getter @Setter @With 023 private int maxCount; 024 025 @Getter @Setter @With 026 private boolean incompleteOk; 027 028 @Getter @Setter @With 029 private String language; 030 031 public boolean hasLanguage() { 032 return language != null; 033 } 034 035 public ExpansionOptions() { 036 } 037 038 public ExpansionOptions(boolean cacheOk, boolean heiarchical, int maxCount, boolean incompleteOk, String language) { 039 this.cacheOk = cacheOk; 040 this.hierarchical = heiarchical; 041 this.maxCount = maxCount; 042 this.incompleteOk = incompleteOk; 043 this.language = language; 044 } 045 046 public static ExpansionOptions cacheNoHeirarchy() { 047 return new ExpansionOptions().withCacheOk(true).withHierarchical(true); 048 } 049}