001 package net.sourceforge.mp3dings.export;
002
003 /* Mp3dings - manage mp3 meta-information
004 * Copyright (C) 2003 Moritz Ringler
005 * $Id: Exporter.java 13 2007-07-27 09:52:39Z ringler $
006 *
007 * This program is free software; you can redistribute it and/or
008 * modify it under the terms of the GNU General Public License
009 * as published by the Free Software Foundation; either version 2
010 * of the License, or (at your option) any later version.
011 *
012 * This program is distributed in the hope that it will be useful,
013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
015 * GNU General Public License for more details.
016 *
017 * You should have received a copy of the GNU General Public License
018 * along with this program; if not, write to the Free Software
019 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
020 */
021
022 /**Exports data from mp3dings.
023 * @author Moritz Ringler
024 * @version $Revision: 13 $ ($Date: 2007-07-27 11:52:39 +0200 (Fr, 27 Jul 2007) $)
025 */
026 public interface Exporter{
027
028 /** Exports the data passed as the second argument.
029 * @param data <code>data[i][j]</code> is the value for
030 * <code>keys[j]</code> in the <code>i</code>th record
031 * @return the number of records that were successfully exported
032 * @see #getKeys()
033 */
034 public int export(Object[] keys, Object[][] data) throws ExportException;
035
036 /** Get the keys to use when passing data to a specific implementation of
037 * this class
038 */
039 public Object[] getKeys();
040
041 /**Sets the charset that will be used to encode the strings for exporting.
042 * @param enc The name of the charset; may be either a canonical name or an alias
043 */
044 public boolean setEncoding(String enc);
045
046 /** Returns whether the client should try to read
047 * data that is not found in the table directly from the mp3 file.
048 * Defaults to true.
049 * @return whether to read id3 tags as a fallback
050 */
051 public boolean getFileFallback();
052
053 /** Returns a string description of an exporter's target type.
054 * @return the name of an implementation's target type
055 */
056 public String getName();
057 }