/** * User action to import Features from a properties files. * * @param in inpustream from configuration file * @throws IOException Error raised if the configuration cannot be read */ private void opImportFile(FeatureStore store, InputStream in) throws IOException { Map<String, Feature> mapsOfFeat = new XmlParser().parseConfigurationFile(in).getFeatures(); for (Entry<String, Feature> feature : mapsOfFeat.entrySet()) { if (store.exist(feature.getKey())) { store.update(feature.getValue()); } else { store.create(feature.getValue()); } } log.info(mapsOfFeat.size() + " features have been imported."); }