@Test public void testFileTypes() throws Exception { Map<String,Integer> fileNameToFileType = new LinkedHashMap<> (); fileNameToFileType.put( "commented-import-1.graph", FileDefinition.AGGREGATOR ); fileNameToFileType.put( "only-import-1.graph", FileDefinition.AGGREGATOR ); fileNameToFileType.put( "commented-import-3.graph", FileDefinition.AGGREGATOR ); fileNameToFileType.put( "only-component-3.graph", FileDefinition.GRAPH ); fileNameToFileType.put( "only-component-4.graph", FileDefinition.GRAPH ); fileNameToFileType.put( "real-lamp-all-in-one.graph", FileDefinition.GRAPH ); fileNameToFileType.put( "real-lamp-all-in-one-flex.graph", FileDefinition.GRAPH ); fileNameToFileType.put( "real-lamp-components.graph", FileDefinition.GRAPH ); fileNameToFileType.put( "commented-component-2.graph", FileDefinition.GRAPH ); fileNameToFileType.put( "instance-single.instances", FileDefinition.INSTANCE ); fileNameToFileType.put( "instance-multiple.instances", FileDefinition.INSTANCE ); fileNameToFileType.put( "instance-imbricated-3.instances", FileDefinition.INSTANCE ); for( Map.Entry<String,Integer> entry : fileNameToFileType.entrySet()) { File f = TestUtils.findTestFile( PATH + "/" + entry.getKey()); FileDefinition rel = ParsingModelIo.readConfigurationFile( f, false ); Assert.assertEquals( "Invalid file type for " + entry.getKey(), entry.getValue().intValue(), rel.getFileType()); Assert.assertEquals( entry.getKey(), 0, rel.getParsingErrors().size()); } }
public static FileDefinition readConfigurationFile( File relationsFile, boolean ignoreComments ) { FileDefinitionParser parser = new FileDefinitionParser( relationsFile, ignoreComments ); return parser.read(); }
ParsingModelIo { public static FileDefinition readConfigurationFile( File relationsFile, boolean ignoreComments ) { FileDefinitionParser parser = new FileDefinitionParser( relationsFile, ignoreComments ); return parser.read(); } }
ParsingModelIo { public static FileDefinition readConfigurationFile( File relationsFile, boolean ignoreComments ) { FileDefinitionParser parser = new FileDefinitionParser( relationsFile, ignoreComments ); return parser.read(); } private  ParsingModelIo(); }
ParsingModelIo { public static FileDefinition readConfigurationFile( File relationsFile, boolean ignoreComments ) { FileDefinitionParser parser = new FileDefinitionParser( relationsFile, ignoreComments ); return parser.read(); } private  ParsingModelIo(); static FileDefinition readConfigurationFile( File relationsFile, boolean ignoreComments ); static String writeConfigurationFile( FileDefinition relationsFile, boolean writeComments, String lineSeparator ); static void saveRelationsFile( FileDefinition relationsFile, boolean writeComments, String lineSeparator ); static void saveRelationsFileInto(
			File targetFile,
			FileDefinition relationsFile,
			boolean writeComments,
			String lineSeparator ); }
ParsingModelIo { public static FileDefinition readConfigurationFile( File relationsFile, boolean ignoreComments ) { FileDefinitionParser parser = new FileDefinitionParser( relationsFile, ignoreComments ); return parser.read(); } private  ParsingModelIo(); static FileDefinition readConfigurationFile( File relationsFile, boolean ignoreComments ); static String writeConfigurationFile( FileDefinition relationsFile, boolean writeComments, String lineSeparator ); static void saveRelationsFile( FileDefinition relationsFile, boolean writeComments, String lineSeparator ); static void saveRelationsFileInto(
			File targetFile,
			FileDefinition relationsFile,
			boolean writeComments,
			String lineSeparator );  }