@Test public void testGetPropertiesForScreen() { AudioOrnidroidFile audioFile = new AudioOrnidroidFile(); Map<String, String> audioProperties = new HashMap<String, String>(); audioProperties.put(OrnidroidFile.AUDIO_DURATION_PROPERTY, "duration"); audioProperties.put(OrnidroidFile.AUDIO_RECORDIST_PROPERTY, "recordist"); audioProperties.put(OrnidroidFile.AUDIO_REF_PROPERTY, "ref"); audioProperties.put(OrnidroidFile.AUDIO_REMARKS_PROPERTY, "remarks"); audioProperties .put(OrnidroidFile.AUDIO_TITLE_PROPERTY, "title"); audioFile.setProperties(audioProperties); Map<String, String> mapForScreen = audioFile.getPropertiesForScreen(); Assert.assertEquals("title duration", mapForScreen.get(AudioOrnidroidFile.LINE_1)); Assert.assertEquals("recordist ref remarks", mapForScreen.get(AudioOrnidroidFile.LINE_2)); }
public Map<String, String> getPropertiesForScreen() { Map<String, String> mapForScreen = new HashMap<String, String>(); StringBuffer line1 = new StringBuffer(); StringBuffer line2 = new StringBuffer(); final String space = " "; String title = getProperty(OrnidroidFile.AUDIO_TITLE_PROPERTY); String duration = getProperty(OrnidroidFile.AUDIO_DURATION_PROPERTY); String recordist = getProperty(OrnidroidFile.AUDIO_RECORDIST_PROPERTY); String ref = getProperty(OrnidroidFile.AUDIO_REF_PROPERTY); String remarks = getProperty(OrnidroidFile.AUDIO_REMARKS_PROPERTY); if (StringHelper.isBlank(title)) { title = extractFilenameFromPath(); } line1.append(title); line1.append(space); line1.append(duration); line2.append(recordist); line2.append(space); line2.append(ref); line2.append(space); line2.append(remarks); mapForScreen.put(LINE_1, line1.toString()); mapForScreen.put(LINE_2, line2.toString()); return mapForScreen; }
AudioOrnidroidFile extends OrnidroidFile { public Map<String, String> getPropertiesForScreen() { Map<String, String> mapForScreen = new HashMap<String, String>(); StringBuffer line1 = new StringBuffer(); StringBuffer line2 = new StringBuffer(); final String space = " "; String title = getProperty(OrnidroidFile.AUDIO_TITLE_PROPERTY); String duration = getProperty(OrnidroidFile.AUDIO_DURATION_PROPERTY); String recordist = getProperty(OrnidroidFile.AUDIO_RECORDIST_PROPERTY); String ref = getProperty(OrnidroidFile.AUDIO_REF_PROPERTY); String remarks = getProperty(OrnidroidFile.AUDIO_REMARKS_PROPERTY); if (StringHelper.isBlank(title)) { title = extractFilenameFromPath(); } line1.append(title); line1.append(space); line1.append(duration); line2.append(recordist); line2.append(space); line2.append(ref); line2.append(space); line2.append(remarks); mapForScreen.put(LINE_1, line1.toString()); mapForScreen.put(LINE_2, line2.toString()); return mapForScreen; } }
AudioOrnidroidFile extends OrnidroidFile { public Map<String, String> getPropertiesForScreen() { Map<String, String> mapForScreen = new HashMap<String, String>(); StringBuffer line1 = new StringBuffer(); StringBuffer line2 = new StringBuffer(); final String space = " "; String title = getProperty(OrnidroidFile.AUDIO_TITLE_PROPERTY); String duration = getProperty(OrnidroidFile.AUDIO_DURATION_PROPERTY); String recordist = getProperty(OrnidroidFile.AUDIO_RECORDIST_PROPERTY); String ref = getProperty(OrnidroidFile.AUDIO_REF_PROPERTY); String remarks = getProperty(OrnidroidFile.AUDIO_REMARKS_PROPERTY); if (StringHelper.isBlank(title)) { title = extractFilenameFromPath(); } line1.append(title); line1.append(space); line1.append(duration); line2.append(recordist); line2.append(space); line2.append(ref); line2.append(space); line2.append(remarks); mapForScreen.put(LINE_1, line1.toString()); mapForScreen.put(LINE_2, line2.toString()); return mapForScreen; }  }
AudioOrnidroidFile extends OrnidroidFile { public Map<String, String> getPropertiesForScreen() { Map<String, String> mapForScreen = new HashMap<String, String>(); StringBuffer line1 = new StringBuffer(); StringBuffer line2 = new StringBuffer(); final String space = " "; String title = getProperty(OrnidroidFile.AUDIO_TITLE_PROPERTY); String duration = getProperty(OrnidroidFile.AUDIO_DURATION_PROPERTY); String recordist = getProperty(OrnidroidFile.AUDIO_RECORDIST_PROPERTY); String ref = getProperty(OrnidroidFile.AUDIO_REF_PROPERTY); String remarks = getProperty(OrnidroidFile.AUDIO_REMARKS_PROPERTY); if (StringHelper.isBlank(title)) { title = extractFilenameFromPath(); } line1.append(title); line1.append(space); line1.append(duration); line2.append(recordist); line2.append(space); line2.append(ref); line2.append(space); line2.append(remarks); mapForScreen.put(LINE_1, line1.toString()); mapForScreen.put(LINE_2, line2.toString()); return mapForScreen; }  Map<String, String> getPropertiesForScreen(); }
AudioOrnidroidFile extends OrnidroidFile { public Map<String, String> getPropertiesForScreen() { Map<String, String> mapForScreen = new HashMap<String, String>(); StringBuffer line1 = new StringBuffer(); StringBuffer line2 = new StringBuffer(); final String space = " "; String title = getProperty(OrnidroidFile.AUDIO_TITLE_PROPERTY); String duration = getProperty(OrnidroidFile.AUDIO_DURATION_PROPERTY); String recordist = getProperty(OrnidroidFile.AUDIO_RECORDIST_PROPERTY); String ref = getProperty(OrnidroidFile.AUDIO_REF_PROPERTY); String remarks = getProperty(OrnidroidFile.AUDIO_REMARKS_PROPERTY); if (StringHelper.isBlank(title)) { title = extractFilenameFromPath(); } line1.append(title); line1.append(space); line1.append(duration); line2.append(recordist); line2.append(space); line2.append(ref); line2.append(space); line2.append(remarks); mapForScreen.put(LINE_1, line1.toString()); mapForScreen.put(LINE_2, line2.toString()); return mapForScreen; }  Map<String, String> getPropertiesForScreen(); final static String LINE_1; final static String LINE_2; }