@Test public void parsesFullConfigFile2() throws Exception { File configFile = getResourceFile("/config/sample-config-full2.xml"); Config config = ConfigReader.parseConfigXml(configFile); assertThat(config.getDataSources().size(), equalTo(2)); assertThat(config.getDataSources().get(0).getName(), nullValue()); assertThat(config.getDataSources().get(0).getType(), equalTo(EnumDataSourceType.SPARQL)); assertThat(config.getDataSources().get(0).getParams().get(ConfigParameters.DATA_SOURCE_SPARQL_RESULT_MAX_ROWS), equalTo("100000")); assertThat(config.getDataSources().get(1).getName(), nullValue()); assertThat(config.getDataSources().get(1).getType(), equalTo(EnumDataSourceType.SPARQL)); assertThat(config.getDataSources().get(1).getParams().get(ConfigParameters.DATA_SOURCE_SPARQL_RESULT_MAX_ROWS), equalTo("100000")); assertThat(config.getSameAsSources().size(), equalTo(1)); assertThat(config.getSameAsSources().get(0).getType(), equalTo(EnumDataSourceType.SPARQL)); assertThat(config.getSameAsSources().get(0).getName(), nullValue()); assertThat(config.getSameAsSources().get(0).getParams().get(ConfigParameters.DATA_SOURCE_SPARQL_ENDPOINT), equalTo("http: assertThat(config.getSameAsSources().get(0).getConstructQuery().trim(), equalTo("CONSTRUCT {?s owl:sameAs ?o} WHERE { ?s owl:sameAs ?o }")); assertThat(config.getRequiredClassOfProcessedResources(), nullValue()); assertThat(config.getDefaultResolutionStrategy(), notNullValue()); assertThat(config.getDefaultResolutionStrategy().getResolutionFunctionName(), equalTo("NONE")); assertThat(config.getDefaultResolutionStrategy().getAggregationErrorStrategy(), nullValue()); assertThat(config.getDefaultResolutionStrategy().getCardinality(), nullValue()); assertThat(config.getDefaultResolutionStrategy().getDependsOn(), nullValue()); assertThat(config.getDefaultResolutionStrategy().getParams(), equalTo((Map<String, String>) ImmutableMap.of("name", "value"))); assertThat(config.getOutputs().size(), equalTo(1)); assertThat(config.getOutputs().get(0).getName(), nullValue()); assertThat(config.getOutputs().get(0).getType(), equalTo(EnumOutputType.SPARQL)); assertThat(config.getOutputs().get(0).getMetadataContext(), nullValue()); assertThat(config.getOutputs().get(0).getDataContext(), nullValue()); assertThat(config.getOutputs().get(0).getParams().size(), equalTo(3)); }
public static Config parseConfigXml(File configFile) throws InvalidInputException { ConfigReader instance = new ConfigReader(); return instance.parseConfigXmlImpl(configFile); }
ConfigReader { public static Config parseConfigXml(File configFile) throws InvalidInputException { ConfigReader instance = new ConfigReader(); return instance.parseConfigXmlImpl(configFile); } }
ConfigReader { public static Config parseConfigXml(File configFile) throws InvalidInputException { ConfigReader instance = new ConfigReader(); return instance.parseConfigXmlImpl(configFile); } private  ConfigReader(); }
ConfigReader { public static Config parseConfigXml(File configFile) throws InvalidInputException { ConfigReader instance = new ConfigReader(); return instance.parseConfigXmlImpl(configFile); } private  ConfigReader(); static Config parseConfigXml(File configFile); }
ConfigReader { public static Config parseConfigXml(File configFile) throws InvalidInputException { ConfigReader instance = new ConfigReader(); return instance.parseConfigXmlImpl(configFile); } private  ConfigReader(); static Config parseConfigXml(File configFile);  }