private void readConfiguration(InputStream ins, String format, IChemObjectBuilder builder) { IAtomTypeConfigurator atc = constructConfigurator(format); if (atc != null) { atc.setInputStream(ins); try { List<IAtomType> readAtomTypes = atc.readAtomTypes(builder); for (IAtomType type : readAtomTypes) { atomTypes.put(type.getAtomTypeName(), new ImmutableAtomType(type)); } } catch (Exception exc) { logger.error("Could not read AtomType's from file due to: ", exc.getMessage()); logger.debug(exc); } } else { logger.debug("AtomTypeConfigurator was null!"); atomTypes = new HashMap<String,IAtomType>(); } }
private void readConfiguration(InputStream ins, String format, IChemObjectBuilder builder) { IAtomTypeConfigurator atc = constructConfigurator(format); if (atc != null) { atc.setInputStream(ins); try { List<IAtomType> readAtomTypes = atc.readAtomTypes(builder); for (IAtomType type : readAtomTypes) { atomTypes.put(type.getAtomTypeName(), new ImmutableAtomType(type)); } } catch (Exception exc) { logger.error("Could not read AtomType's from file due to: ", exc.getMessage()); logger.debug(exc); } } else { logger.debug("AtomTypeConfigurator was null!"); atomTypes = new HashMap<String,IAtomType>(); } }