Mercurial > dive4elements > gnv-client
annotate 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 |
rev | line source |
---|---|
230
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.gnv.exports; |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
233
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
3 import de.intevation.gnv.geobackend.base.Result; |
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
4 |
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
5 |
230
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 /** |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 * @author Sascha L. Teichmann (sascha.teichmann@intevation.de) |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 * @author Ingo Weinzierl (ingo.weinzierl@intevation.de) |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 */ |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 public class DefaultProfile |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 implements Export.Profile |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 { |
233
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
13 protected Export.DataCollector collector; |
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
14 protected String [] names; |
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
15 protected char separator; |
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
16 protected char escapeCharacter; |
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
17 protected char quoteCharacter; |
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
18 protected String type; |
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
19 protected String encoding; |
230
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 public DefaultProfile() { |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 } |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 public DefaultProfile( |
233
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
25 char separator, |
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
26 char escapeCharacter, |
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
27 char quoteCharacter, |
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
28 String type, |
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
29 String encoding |
230
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 ) { |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 this.separator = separator; |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 this.escapeCharacter = escapeCharacter; |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 this.quoteCharacter = quoteCharacter; |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 this.type = type; |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 this.encoding = encoding; |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 } |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 public String toString(int index, String value) { |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 return value; |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 } |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 public char getSeparator() { |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 return separator; |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
44 } |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 public char getEscapeCharacter() { |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 return escapeCharacter; |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 } |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 public char getQuoteCharacter() { |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 return quoteCharacter; |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
52 } |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
53 |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
54 public String getType() { |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 return type; |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 } |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 public String getEncoding() { |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 return encoding; |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 } |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 } |