/** * Initializes a new description repository from the given file. * * @param fileName * The name of the file to use. * @param projectContext * The project context to use. * @return The initialized description repository * * @throws IOException * If an I/O error occurs */ public static DescriptionRepository createFromFile(final String fileName, final IProjectContext projectContext) throws IOException { final Configuration configuration = new Configuration(); configuration.setProperty(CONFIG_PROPERTY_NAME_DESCRIPTION_FILE_NAME, fileName); return new DescriptionRepository(configuration, DescriptionRepository.readDataFromFile(fileName), projectContext); }
private static DescriptionRepository prepareDescriptionRepository(final AnalysisController analysisController) { final ConcurrentMap<String, String> descriptions = new ConcurrentHashMap<String, String>(); descriptions.put(EXPECTED_ALLOCATION_COMPONENT_NAME_1, DESCRIPTION_1); descriptions.put(EXPECTED_ALLOCATION_COMPONENT_NAME_2, DESCRIPTION_2); final DescriptionRepositoryData repositoryData = new DescriptionRepositoryData(descriptions); return new DescriptionRepository(new Configuration(), repositoryData, analysisController); }