Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/exports/DefaultProfile.java @ 233:2ceb4bf51cba
Added DataCollector which collects data used for exports.
gnv-artifacts/trunk@301 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 09 Nov 2009 09:43:52 +0000 |
parents | f68ffbe974a0 |
children | 75da91eca29f |
comparison
equal
deleted
inserted
replaced
232:3d6d89bcbf42 | 233:2ceb4bf51cba |
---|---|
1 package de.intevation.gnv.exports; | 1 package de.intevation.gnv.exports; |
2 | |
3 import de.intevation.gnv.geobackend.base.Result; | |
4 | |
2 | 5 |
3 /** | 6 /** |
4 * @author Sascha L. Teichmann (sascha.teichmann@intevation.de) | 7 * @author Sascha L. Teichmann (sascha.teichmann@intevation.de) |
5 * @author Ingo Weinzierl (ingo.weinzierl@intevation.de) | 8 * @author Ingo Weinzierl (ingo.weinzierl@intevation.de) |
6 */ | 9 */ |
7 public class DefaultProfile | 10 public class DefaultProfile |
8 implements Export.Profile | 11 implements Export.Profile |
9 { | 12 { |
10 protected String [] names; | 13 protected Export.DataCollector collector; |
11 protected char separator; | 14 protected String [] names; |
12 protected char escapeCharacter; | 15 protected char separator; |
13 protected char quoteCharacter; | 16 protected char escapeCharacter; |
14 protected String type; | 17 protected char quoteCharacter; |
15 protected String encoding; | 18 protected String type; |
19 protected String encoding; | |
16 | 20 |
17 public DefaultProfile() { | 21 public DefaultProfile() { |
18 } | 22 } |
19 | 23 |
20 public DefaultProfile( | 24 public DefaultProfile( |
21 String [] names, | 25 char separator, |
22 char separator, | 26 char escapeCharacter, |
23 char escapeCharacter, | 27 char quoteCharacter, |
24 char quoteCharacter, | 28 String type, |
25 String type, | 29 String encoding |
26 String encoding | |
27 ) { | 30 ) { |
28 this.names = names; | |
29 this.separator = separator; | 31 this.separator = separator; |
30 this.escapeCharacter = escapeCharacter; | 32 this.escapeCharacter = escapeCharacter; |
31 this.quoteCharacter = quoteCharacter; | 33 this.quoteCharacter = quoteCharacter; |
32 this.type = type; | 34 this.type = type; |
33 this.encoding = encoding; | 35 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 } | 36 } |
43 | 37 |
44 public String toString(int index, String value) { | 38 public String toString(int index, String value) { |
45 return value; | 39 return value; |
46 } | 40 } |