annotate gnv-artifacts/src/main/java/de/intevation/gnv/exports/DefaultProfile.java @ 612:e86d37008fd1

Added new Transition and State for using the PreSettingsValue for the decision if a Transition could be used and the usage of PreSettings as InputValues. gnv-artifacts/trunk@678 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Fri, 12 Feb 2010 09:11:49 +0000
parents 3ea030aafe65
children a0e63136954e
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
230
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
4 /**
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
5 * @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
6 * @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
7 */
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
8 public class DefaultProfile
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9 implements Export.Profile
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10 {
233
2ceb4bf51cba Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 230
diff changeset
11 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
12 protected String [] header;
233
2ceb4bf51cba Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 230
diff changeset
13 protected String [] names;
2ceb4bf51cba Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 230
diff changeset
14 protected char separator;
2ceb4bf51cba Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 230
diff changeset
15 protected char escapeCharacter;
2ceb4bf51cba Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 230
diff changeset
16 protected char quoteCharacter;
2ceb4bf51cba Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 230
diff changeset
17 protected String type;
2ceb4bf51cba Added DataCollector which collects data used for exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 230
diff changeset
18 protected String encoding;
230
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
20 public DefaultProfile() {
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
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23 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
24 String [] header,
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 ) {
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
31 this.header = header;
230
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32 this.separator = separator;
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
33 this.escapeCharacter = escapeCharacter;
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
34 this.quoteCharacter = quoteCharacter;
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35 this.type = type;
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
36 this.encoding = encoding;
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
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
39 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
40 return value;
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
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
43 public char getSeparator() {
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
44 return separator;
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
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
47 public char getEscapeCharacter() {
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
48 return escapeCharacter;
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
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
51 public char getQuoteCharacter() {
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
52 return quoteCharacter;
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
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
55 public String getType() {
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
56 return type;
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
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
59 public String getEncoding() {
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
60 return encoding;
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
61 }
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
62
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
63 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
64 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
65 }
230
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
66 }

http://dive4elements.wald.intevation.org