Package us.jyg.freshet.util

Examples of us.jyg.freshet.util.Miner


                    if (building) {
                        log.debug("Seeker waiting for db to finish building...");
                    } else {
                        log.debug("Seeker starting again...");
                        for(int i=0; i< paths.length; i++) {
                            Miner miner = new Miner(paths[i]);
                            log.debug("Seeker mining at: " + paths[i]);
                            File f;
                            while( (f=miner.next()) != null) {
                                if (f.getName().matches(".*[mM][pP]3")) {
                                    if (!finalSongManager.songIsInDb(f)) {
                                        try {
                                            SongData songData = new SongData(f);
                                            Song song = finalSongManager.saveSong(songData);
View Full Code Here


    private void build(String path) {
        build(path, 0);
    }

    private void build(String path, int delay) {
        Miner miner = new Miner(path);
    File f;
    while( (f=miner.next()) != null) {
      try {
        if (f.getName().matches(".*[mM][pP]3")) {
          SongData songData = new SongData(f);
          songManager.saveSong(songData);
//          log.debug("Saved: " + song.getName() + " ("+song.getId() +")"+
View Full Code Here

  public void onSetUpBeforeTransaction() {
    setDefaultRollback(new Boolean(false));
  }
   
    public void testSaveSong() { 
    Miner miner = new Miner("test/data");
    File f;
    while( (f=miner.next()) != null) {
      try {
        if (f.getName().matches(".*[mM][pP]3")) {
          SongData songData = new SongData(f);
          Song song = songManager.saveSong(songData);
          log.debug("Saved: " + song.getName() + " ("+song.getId() +")"+
View Full Code Here

public class SongDaoTest extends BaseDaoTest {

  static int testSongCount = 0;

  public void testSaveSong() {
    Miner miner = new Miner("test/data/mp3");
    File f;
    while( (f=miner.next()) != null) {
      try {
        if (f.getName().matches(".*[mM][pP]3")) {
          SongData songData = new SongData(f);
          Album album = albumDao.getAlbum(songData.getAlbum());
          Artist artist = artistDao.getArtist(songData.getArtist());
View Full Code Here

TOP

Related Classes of us.jyg.freshet.util.Miner

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.