Example #1
0
 public String getSongLyric() {
   String text = "";
   AbstractID3v2Frame frame = getFrame(TagFrameIdentifier.get("SYLT"));
   if (frame != null) {
     FrameBodySYLT body = (FrameBodySYLT) frame.getBody();
     text = body.getLyric();
   }
   if (text == "") {
     frame = getFrame(TagFrameIdentifier.get("USLT" + ((char) 0) + "eng" + ((char) 0) + ""));
     if (frame != null) {
       FrameBodyUSLT body = (FrameBodyUSLT) frame.getBody();
       text = body.getLyric();
     }
   }
   return text.trim();
 }
Example #2
0
/**
 * &nbsp;&nbsp; The 'Official audio source webpage' frame is a URL pointing at the<br>
 * &nbsp;&nbsp; official webpage for the source of the audio file, e.g. a movie.
 *
 * @author Eric Farng
 * @version $Revision: 1.4 $
 */
public class FrameBodyWOAS extends AbstractFrameBodyUrlLink {

  /** Creates a new FrameBodyWOAS object. */
  public FrameBodyWOAS() {
    super();
  }

  /** Creates a new FrameBodyWOAS object. */
  public FrameBodyWOAS(final String urlLink) {
    super(urlLink);
  }

  /** Creates a new FrameBodyWOAS object. */
  public FrameBodyWOAS(final FrameBodyWOAS body) {
    super(body);
  }

  /** Creates a new FrameBodyWOAS object. */
  public FrameBodyWOAS(final RandomAccessFile file, AbstractID3 parent)
      throws java.io.IOException, InvalidTagException {
    super(file, parent);
  }

  protected static final TagFrameIdentifier IDENTIFIER = TagFrameIdentifier.get("WOAS");

  public TagIdentifier getIdentifier() {
    return IDENTIFIER;
  }
}
Example #3
0
 public String getSongGenre() {
   String text = "";
   AbstractID3v2Frame frame = getFrame(TagFrameIdentifier.get("TCON"));
   if (frame != null) {
     FrameBodyTCON body = (FrameBodyTCON) frame.getBody();
     text = body.getText();
   }
   return text.trim();
 }
Example #4
0
 public String getYearReleased() {
   String text = "";
   AbstractID3v2Frame frame = getFrame(TagFrameIdentifier.get("TYER"));
   if (frame != null) {
     FrameBodyTYER body = (FrameBodyTYER) frame.getBody();
     text = body.getText();
   }
   return text.trim();
 }
Example #5
0
 public String getAlbumTitle() {
   String text = "";
   AbstractID3v2Frame frame = getFrame(TagFrameIdentifier.get("TALB"));
   if (frame != null) {
     FrameBodyTALB body = (FrameBodyTALB) frame.getBody();
     text = body.getText();
   }
   return text.trim();
 }
Example #6
0
 public String getLeadArtist() {
   String text = "";
   AbstractID3v2Frame frame = getFrame(TagFrameIdentifier.get("TPE1"));
   if (frame != null) {
     FrameBodyTPE1 body = (FrameBodyTPE1) frame.getBody();
     text = body.getText();
   }
   return text.trim();
 }
Example #7
0
 public String getTrackNumberOnAlbum() {
   String text = "";
   AbstractID3v2Frame frame = getFrame(TagFrameIdentifier.get("TRCK"));
   if (frame != null) {
     FrameBodyTRCK body = (FrameBodyTRCK) frame.getBody();
     text = body.getText();
   }
   return text.trim();
 }
Example #8
0
 public void setAuthorComposer(String authorComposer) {
   AbstractID3v2Frame field = getFrame(TagFrameIdentifier.get("TCOM"));
   if (field == null) {
     field = new ID3v2_3Frame(new FrameBodyTCOM((byte) 0, authorComposer.trim()));
     setFrame(field);
   } else {
     ((FrameBodyTCOM) field.getBody()).setText(authorComposer.trim());
   }
 }
Example #9
0
 public String getAuthorComposer() {
   String text = "";
   AbstractID3v2Frame frame = getFrame(TagFrameIdentifier.get("TCOM"));
   if (frame != null) {
     FrameBodyTCOM body = (FrameBodyTCOM) frame.getBody();
     text = body.getText();
   }
   return text.trim();
 }
Example #10
0
 public void setTrackNumberOnAlbum(String trackNumberOnAlbum) {
   AbstractID3v2Frame field = getFrame(TagFrameIdentifier.get("TRCK"));
   if (field == null) {
     field = new ID3v2_3Frame(new FrameBodyTRCK((byte) 0, trackNumberOnAlbum.trim()));
     setFrame(field);
   } else {
     ((FrameBodyTRCK) field.getBody()).setText(trackNumberOnAlbum.trim());
   }
 }
Example #11
0
 public void setSongLyric(String songLyrics) {
   AbstractID3v2Frame field = getFrame(TagFrameIdentifier.get("SYLT"));
   if (field == null) {
     field = new ID3v2_3Frame(new FrameBodyUSLT((byte) 0, "ENG", "", songLyrics.trim()));
     setFrame(field);
   } else {
     ((FrameBodyUSLT) field.getBody()).setLyric(songLyrics.trim());
   }
 }
Example #12
0
 public void setSongComment(String songComment) {
   AbstractID3v2Frame field = getFrame(TagFrameIdentifier.get("COMM"));
   if (field == null) {
     field = new ID3v2_3Frame(new FrameBodyCOMM((byte) 0, "ENG", "", songComment.trim()));
     setFrame(field);
   } else {
     ((FrameBodyCOMM) field.getBody()).setText(songComment.trim());
   }
 }
Example #13
0
 public void setSongGenre(String songGenre) {
   AbstractID3v2Frame field = getFrame(TagFrameIdentifier.get("TCON"));
   if (field == null) {
     field = new ID3v2_3Frame(new FrameBodyTCON((byte) 0, songGenre.trim()));
     setFrame(field);
   } else {
     ((FrameBodyTCON) field.getBody()).setText(songGenre.trim());
   }
 }
Example #14
0
 public void setYearReleased(String yearReleased) {
   AbstractID3v2Frame field = getFrame(TagFrameIdentifier.get("TYER"));
   if (field == null) {
     field = new ID3v2_3Frame(new FrameBodyTYER((byte) 0, yearReleased.trim()));
     setFrame(field);
   } else {
     ((FrameBodyTYER) field.getBody()).setText(yearReleased.trim());
   }
 }
Example #15
0
 public void setAlbumTitle(String albumTitle) {
   AbstractID3v2Frame field = getFrame(TagFrameIdentifier.get("TALB"));
   if (field == null) {
     field = new ID3v2_3Frame(new FrameBodyTALB((byte) 0, albumTitle.trim()));
     setFrame(field);
   } else {
     ((FrameBodyTALB) field.getBody()).setText(albumTitle.trim());
   }
 }
Example #16
0
 public void setLeadArtist(String leadArtist) {
   AbstractID3v2Frame field = getFrame(TagFrameIdentifier.get("TPE1"));
   if (field == null) {
     field = new ID3v2_3Frame(new FrameBodyTPE1((byte) 0, leadArtist.trim()));
     setFrame(field);
   } else {
     ((FrameBodyTPE1) field.getBody()).setText(leadArtist.trim());
   }
 }
Example #17
0
 public String getSongComment() {
   String text = "";
   AbstractID3v2Frame frame =
       getFrame(TagFrameIdentifier.get("COMM" + ((char) 0) + "eng" + ((char) 0) + ""));
   if (frame != null) {
     FrameBodyCOMM body = (FrameBodyCOMM) frame.getBody();
     text = body.getText();
   }
   return text.trim();
 }
Example #18
0
 public TagIdentifier getIdentifier() {
   return TagFrameIdentifier.get("ID3v2.30");
 }