ingo@230: package de.intevation.gnv.exports; ingo@230: ingo@230: /** ingo@230: * @author Sascha L. Teichmann (sascha.teichmann@intevation.de) ingo@230: * @author Ingo Weinzierl (ingo.weinzierl@intevation.de) ingo@230: */ ingo@230: public class DefaultProfile ingo@230: implements Export.Profile ingo@230: { ingo@230: protected String [] names; ingo@230: protected char separator; ingo@230: protected char escapeCharacter; ingo@230: protected char quoteCharacter; ingo@230: protected String type; ingo@230: protected String encoding; ingo@230: ingo@230: public DefaultProfile() { ingo@230: } ingo@230: ingo@230: public DefaultProfile( ingo@230: String [] names, ingo@230: char separator, ingo@230: char escapeCharacter, ingo@230: char quoteCharacter, ingo@230: String type, ingo@230: String encoding ingo@230: ) { ingo@230: this.names = names; ingo@230: this.separator = separator; ingo@230: this.escapeCharacter = escapeCharacter; ingo@230: this.quoteCharacter = quoteCharacter; ingo@230: this.type = type; ingo@230: this.encoding = encoding; ingo@230: } ingo@230: ingo@230: public int numberColumns() { ingo@230: return names.length; ingo@230: } ingo@230: ingo@230: public String getHeader(int index) { ingo@230: return names[index]; ingo@230: } ingo@230: ingo@230: public String toString(int index, String value) { ingo@230: return value; ingo@230: } ingo@230: ingo@230: public char getSeparator() { ingo@230: return separator; ingo@230: } ingo@230: ingo@230: public char getEscapeCharacter() { ingo@230: return escapeCharacter; ingo@230: } ingo@230: ingo@230: public char getQuoteCharacter() { ingo@230: return quoteCharacter; ingo@230: } ingo@230: ingo@230: public String getType() { ingo@230: return type; ingo@230: } ingo@230: ingo@230: public String getEncoding() { ingo@230: return encoding; ingo@230: } ingo@230: }