Esempio n. 1
0
  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;
    }
  }
Esempio n. 2
0
 public void setField(TagField field) {
   FieldKey genericKey = FieldKey.valueOf(field.getId());
   if (genericKey == FieldKey.TRACK) {
     setTrack(field.toString());
   } else {
     super.setField(field);
   }
 }
Esempio n. 3
0
 /**
  * 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 "";
   }
 }
Esempio n. 4
0
 public boolean hasField(String id) {
   try {
     FieldKey key = FieldKey.valueOf(id.toUpperCase());
     return hasField(key);
   } catch (java.lang.IllegalArgumentException iae) {
     return false;
   }
 }
Esempio n. 5
0
 public void deleteField(String id) {
   FieldKey key = FieldKey.valueOf(id);
   if (key != null) {
     deleteField(key);
   }
 }