use of org.magic.api.beans.MagicCardStock in project MtgDesktopCompanion by nicho92.
the class CSVExport method exportStock.
@Override
public void exportStock(List<MagicCardStock> stock, File f) throws IOException {
try (BufferedWriter bw = new BufferedWriter(new FileWriter(f))) {
bw.write("id;Card Name;Edition;Language;Qte;Condition;Foil;Altered;Signed;Collection;Price;Comment\n");
for (MagicCardStock mcs : stock) {
bw.write(mcs.getIdstock() + ";");
bw.write(mcs.getMagicCard().getName() + ";");
bw.write(mcs.getMagicCard().getEditions().get(0) + ";");
bw.write(mcs.getLanguage() + ";");
bw.write(mcs.getQte() + ";");
bw.write(mcs.getCondition() + ";");
bw.write(mcs.isFoil() + ";");
bw.write(mcs.isAltered() + ";");
bw.write(mcs.isSigned() + ";");
bw.write(mcs.getMagicCollection() + ";");
bw.write(mcs.getPrice() + ";");
bw.write(mcs.getComment() + ";");
bw.write("\n");
}
}
}
use of org.magic.api.beans.MagicCardStock in project MtgDesktopCompanion by nicho92.
the class CocatriceDeckExport method exportStock.
@Override
public void exportStock(List<MagicCardStock> stock, File f) throws IOException {
MagicDeck d = new MagicDeck();
d.setName(f.getName());
for (MagicCardStock mcs : stock) {
d.getMap().put(mcs.getMagicCard(), mcs.getQte());
}
export(d, f);
}
use of org.magic.api.beans.MagicCardStock in project MtgDesktopCompanion by nicho92.
the class DCIDeckSheetExport method exportStock.
@Override
public void exportStock(List<MagicCardStock> stock, File f) throws IOException {
MagicDeck d = new MagicDeck();
d.setName(f.getName());
for (MagicCardStock mcs : stock) {
d.getMap().put(mcs.getMagicCard(), mcs.getQte());
}
export(d, f);
}
use of org.magic.api.beans.MagicCardStock in project MtgDesktopCompanion by nicho92.
the class MKMFileWantListExport method exportStock.
@Override
public void exportStock(List<MagicCardStock> stock, File f) throws IOException {
MagicDeck d = new MagicDeck();
d.setName(f.getName());
for (MagicCardStock mcs : stock) {
d.getMap().put(mcs.getMagicCard(), mcs.getQte());
}
export(d, f);
}
use of org.magic.api.beans.MagicCardStock in project MtgDesktopCompanion by nicho92.
the class MTGDesktopCompanionExport method exportStock.
@Override
public void exportStock(List<MagicCardStock> stock, File f) throws IOException {
MagicDeck d = new MagicDeck();
d.setName(f.getName());
for (MagicCardStock mcs : stock) {
d.getMap().put(mcs.getMagicCard(), mcs.getQte());
}
export(d, f);
}
Aggregations