comparison gnv-artifacts/src/main/java/de/intevation/gnv/exports/DefaultProfile.java @ 230:f68ffbe974a0

Implemented an exporter for odv and csv exports. gnv-artifacts/trunk@298 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 06 Nov 2009 10:56:18 +0000
parents
children 2ceb4bf51cba
comparison
equal deleted inserted replaced
229:a610c0a01afc 230:f68ffbe974a0
1 package de.intevation.gnv.exports;
2
3 /**
4 * @author Sascha L. Teichmann (sascha.teichmann@intevation.de)
5 * @author Ingo Weinzierl (ingo.weinzierl@intevation.de)
6 */
7 public class DefaultProfile
8 implements Export.Profile
9 {
10 protected String [] names;
11 protected char separator;
12 protected char escapeCharacter;
13 protected char quoteCharacter;
14 protected String type;
15 protected String encoding;
16
17 public DefaultProfile() {
18 }
19
20 public DefaultProfile(
21 String [] names,
22 char separator,
23 char escapeCharacter,
24 char quoteCharacter,
25 String type,
26 String encoding
27 ) {
28 this.names = names;
29 this.separator = separator;
30 this.escapeCharacter = escapeCharacter;
31 this.quoteCharacter = quoteCharacter;
32 this.type = type;
33 this.encoding = encoding;
34 }
35
36 public int numberColumns() {
37 return names.length;
38 }
39
40 public String getHeader(int index) {
41 return names[index];
42 }
43
44 public String toString(int index, String value) {
45 return value;
46 }
47
48 public char getSeparator() {
49 return separator;
50 }
51
52 public char getEscapeCharacter() {
53 return escapeCharacter;
54 }
55
56 public char getQuoteCharacter() {
57 return quoteCharacter;
58 }
59
60 public String getType() {
61 return type;
62 }
63
64 public String getEncoding() {
65 return encoding;
66 }
67 }

http://dive4elements.wald.intevation.org