public void setField(TagField field) { FieldKey genericKey = FieldKey.valueOf(field.getId()); switch (genericKey) { case ARTIST: setArtist(field.toString()); break; case ALBUM: setAlbum(field.toString()); break; case TITLE: setTitle(field.toString()); break; case GENRE: setGenre(field.toString()); break; case YEAR: setYear(field.toString()); break; case COMMENT: setComment(field.toString()); break; } }
public void setField(TagField field) { FieldKey genericKey = FieldKey.valueOf(field.getId()); if (genericKey == FieldKey.TRACK) { setTrack(field.toString()); } else { super.setField(field); } }
/** * Retrieve the first value that exists for this key id * * @param genericKey * @return */ public String getFirst(String genericKey) { FieldKey matchingKey = FieldKey.valueOf(genericKey); if (matchingKey != null) { return getFirst(matchingKey); } else { return ""; } }
public boolean hasField(String id) { try { FieldKey key = FieldKey.valueOf(id.toUpperCase()); return hasField(key); } catch (java.lang.IllegalArgumentException iae) { return false; } }
public void deleteField(String id) { FieldKey key = FieldKey.valueOf(id); if (key != null) { deleteField(key); } }