Merge pull request #112 from hapifhir/minor_polish
merged 2 if statement into 1
This commit is contained in:
commit
a6ccb8d835
|
@ -415,18 +415,18 @@ public abstract class BaseWorkerContext implements IWorkerContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ValueSetExpansionOutcome expandVS(ConceptSetComponent inc, boolean heirachical) throws TerminologyServiceException {
|
public ValueSetExpansionOutcome expandVS(ConceptSetComponent inc, boolean hierarchical) throws TerminologyServiceException {
|
||||||
ValueSet vs = new ValueSet();
|
ValueSet vs = new ValueSet();
|
||||||
vs.setCompose(new ValueSetComposeComponent());
|
vs.setCompose(new ValueSetComposeComponent());
|
||||||
vs.getCompose().getInclude().add(inc);
|
vs.getCompose().getInclude().add(inc);
|
||||||
CacheToken cacheToken = txCache.generateExpandToken(vs, heirachical);
|
CacheToken cacheToken = txCache.generateExpandToken(vs, hierarchical);
|
||||||
ValueSetExpansionOutcome res;
|
ValueSetExpansionOutcome res;
|
||||||
res = txCache.getExpansion(cacheToken);
|
res = txCache.getExpansion(cacheToken);
|
||||||
if (res != null)
|
if (res != null)
|
||||||
return res;
|
return res;
|
||||||
Parameters p = expParameters.copy();
|
Parameters p = expParameters.copy();
|
||||||
p.setParameter("includeDefinition", false);
|
p.setParameter("includeDefinition", false);
|
||||||
p.setParameter("excludeNested", !heirachical);
|
p.setParameter("excludeNested", !hierarchical);
|
||||||
|
|
||||||
if (noTerminologyServer)
|
if (noTerminologyServer)
|
||||||
return new ValueSetExpansionOutcome("Error expanding ValueSet: running without terminology services", TerminologyServiceErrorClass.NOSERVICE);
|
return new ValueSetExpansionOutcome("Error expanding ValueSet: running without terminology services", TerminologyServiceErrorClass.NOSERVICE);
|
||||||
|
|
|
@ -281,7 +281,7 @@ public interface IWorkerContext {
|
||||||
* @return
|
* @return
|
||||||
* @throws FHIRException
|
* @throws FHIRException
|
||||||
*/
|
*/
|
||||||
public ValueSetExpansionOutcome expandVS(ConceptSetComponent inc, boolean heirarchical) throws TerminologyServiceException;
|
public ValueSetExpansionOutcome expandVS(ConceptSetComponent inc, boolean hierarchical) throws TerminologyServiceException;
|
||||||
|
|
||||||
public class ValidationResult {
|
public class ValidationResult {
|
||||||
private ConceptDefinitionComponent definition;
|
private ConceptDefinitionComponent definition;
|
||||||
|
|
|
@ -595,8 +595,7 @@ public class ValidationEngine implements IValidatorResourceFetcher {
|
||||||
private Map<String, byte[]> scanDirectory(File f, boolean recursive) throws FileNotFoundException, IOException {
|
private Map<String, byte[]> scanDirectory(File f, boolean recursive) throws FileNotFoundException, IOException {
|
||||||
Map<String, byte[]> res = new HashMap<>();
|
Map<String, byte[]> res = new HashMap<>();
|
||||||
for (File ff : f.listFiles()) {
|
for (File ff : f.listFiles()) {
|
||||||
if (ff.isDirectory()){
|
if (ff.isDirectory() && recursive){
|
||||||
if (recursive)
|
|
||||||
res.putAll(scanDirectory(ff, true));
|
res.putAll(scanDirectory(ff, true));
|
||||||
}
|
}
|
||||||
else if (!isIgnoreFile(ff)) {
|
else if (!isIgnoreFile(ff)) {
|
||||||
|
|
Loading…
Reference in New Issue