Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/main/java/de/intevation/gnv/exports/DefaultProfile.java @ 255:5403452c06fc
Added proper values for calculating the Statistics of VerticalProfiles and HorizontalProfiles issue86
gnv-artifacts/trunk@330 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Thu, 12 Nov 2009 14:47:20 +0000 |
parents | 75da91eca29f |
children | 3ea030aafe65 |
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; |
239
75da91eca29f
Added possibility to print column labels in the first line of an export. Added labels for odv export as well.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
233
diff
changeset
|
14 protected String [] header; |
233
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
15 protected String [] names; |
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
16 protected char separator; |
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
17 protected char escapeCharacter; |
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
18 protected char quoteCharacter; |
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
19 protected String type; |
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
20 protected String encoding; |
230
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 public DefaultProfile() { |
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 |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 public DefaultProfile( |
239
75da91eca29f
Added possibility to print column labels in the first line of an export. Added labels for odv export as well.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
233
diff
changeset
|
26 String [] header, |
233
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
27 char separator, |
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
28 char escapeCharacter, |
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
29 char quoteCharacter, |
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
30 String type, |
2ceb4bf51cba
Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
230
diff
changeset
|
31 String encoding |
230
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 ) { |
239
75da91eca29f
Added possibility to print column labels in the first line of an export. Added labels for odv export as well.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
233
diff
changeset
|
33 this.header = header; |
230
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 this.separator = separator; |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 this.escapeCharacter = escapeCharacter; |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 this.quoteCharacter = quoteCharacter; |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 this.type = type; |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 this.encoding = encoding; |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 } |
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 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
|
42 return value; |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 } |
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 public char getSeparator() { |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 return separator; |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 } |
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 public char getEscapeCharacter() { |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 return escapeCharacter; |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 } |
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 public char getQuoteCharacter() { |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
54 return quoteCharacter; |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 } |
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 public String getType() { |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 return type; |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 } |
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 public String getEncoding() { |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 return encoding; |
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 } |
239
75da91eca29f
Added possibility to print column labels in the first line of an export. Added labels for odv export as well.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
233
diff
changeset
|
64 |
75da91eca29f
Added possibility to print column labels in the first line of an export. Added labels for odv export as well.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
233
diff
changeset
|
65 public String[] getHeader() { |
75da91eca29f
Added possibility to print column labels in the first line of an export. Added labels for odv export as well.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
233
diff
changeset
|
66 return header; |
75da91eca29f
Added possibility to print column labels in the first line of an export. Added labels for odv export as well.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
233
diff
changeset
|
67 } |
230
f68ffbe974a0
Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 } |