mc.setValue(m.group(i));
}
}
// create a dataset from the extracted data
DataSet dataset = new DataSet();
for (MagicCookie mc : cookies) {
if(mc.getCookie().equals(COOKIE_ARTIST)) {
dataset.setArtist(mc.getValue());
} else if(mc.getCookie().equals(COOKIE_ARTIST_FC)) {
dataset.setArtist(mc.getValue());
} else if(mc.getCookie().equals(COOKIE_TRACK)) {
dataset.setTrack(mc.getValue());
} else if(mc.getCookie().equals(COOKIE_TITLE)) {
dataset.setTitle(mc.getValue());
} else if(mc.getCookie().equals(COOKIE_ALBUM)) {
dataset.setAlbum(mc.getValue());
} else if(mc.getCookie().equals(COOKIE_GENRE)) {
dataset.setGenre(mc.getValue());
} else if(mc.getCookie().equals(COOKIE_YEAR)) {
dataset.setYear(mc.getValue());
} else if(mc.getCookie().equals(COOKIE_ORIG_ARTIST)) {
dataset.setOrigArtist(mc.getValue());
} else if(mc.getCookie().equals(COOKIE_COPYRIGHT)) {
dataset.setCopyright(mc.getValue());
} else if(mc.getCookie().equals(COOKIE_COMPOSER)) {
dataset.setComposer(mc.getValue());
} else if(mc.getCookie().equals(COOKIE_ENCODED_BY)) {
dataset.setEncodedBy(mc.getValue());
} else if(mc.getCookie().equals(COOKIE_DISC_NO)) {
dataset.setPartOfSet(mc.getValue());
}
}
return dataset;
}