/** * Returns an unmodifiable set containing all resource names known to this * context */ public Set<String> getResourceNames() { Set<String> resourceNames = new HashSet<>(); if (myNameToResourceDefinition.isEmpty()) { Properties props = new Properties(); try { props.load(myVersion.getFhirVersionPropertiesFile()); } catch (IOException theE) { throw new ConfigurationException("Failed to load version properties file"); } Enumeration<?> propNames = props.propertyNames(); while (propNames.hasMoreElements()) { String next = (String) propNames.nextElement(); if (next.startsWith("resource.")) { resourceNames.add(next.substring("resource.".length()).trim()); } } } for (RuntimeResourceDefinition next : myNameToResourceDefinition.values()) { resourceNames.add(next.getName()); } return Collections.unmodifiableSet(resourceNames); }
static Set<Class<? extends IBase>> scanVersionPropertyFile(Set<Class<? extends IBase>> theDatatypes, Map<String, Class<? extends IBaseResource>> theResourceTypes, FhirVersionEnum theVersion, Map<Class<? extends IBase>, BaseRuntimeElementDefinition<?>> theExistingElementDefinitions) { Set<Class<? extends IBase>> retVal = new HashSet<Class<? extends IBase>>(); try (InputStream str = theVersion.getVersionImplementation().getFhirVersionPropertiesFile()) { Properties prop = new Properties(); prop.load(str);
p.load(fhirContext.getVersion().getFhirVersionPropertiesFile()); } catch (IOException e) { throw new IllegalArgumentException("Failed to load version property file", e);
p.load(fhirContext.getVersion().getFhirVersionPropertiesFile()); } catch (IOException e) { throw new MojoFailureException("Failed to load version property file", e);
p.load(fhirContext.getVersion().getFhirVersionPropertiesFile()); } catch (IOException e) { throw new FailureException("Failed to load version property file", e);
/** * Returns an unmodifiable set containing all resource names known to this * context */ public Set<String> getResourceNames() { Set<String> resourceNames = new HashSet<>(); if (myNameToResourceDefinition.isEmpty()) { Properties props = new Properties(); try { props.load(myVersion.getFhirVersionPropertiesFile()); } catch (IOException theE) { throw new ConfigurationException("Failed to load version properties file"); } Enumeration<?> propNames = props.propertyNames(); while (propNames.hasMoreElements()) { String next = (String) propNames.nextElement(); if (next.startsWith("resource.")) { resourceNames.add(next.substring("resource.".length()).trim()); } } } for (RuntimeResourceDefinition next : myNameToResourceDefinition.values()) { resourceNames.add(next.getName()); } return Collections.unmodifiableSet(resourceNames); }
static Set<Class<? extends IBase>> scanVersionPropertyFile(Set<Class<? extends IBase>> theDatatypes, Map<String, Class<? extends IBaseResource>> theResourceTypes, FhirVersionEnum theVersion, Map<Class<? extends IBase>, BaseRuntimeElementDefinition<?>> theExistingElementDefinitions) { Set<Class<? extends IBase>> retVal = new HashSet<Class<? extends IBase>>(); try (InputStream str = theVersion.getVersionImplementation().getFhirVersionPropertiesFile()) { Properties prop = new Properties(); prop.load(str);