annotate gnv-artifacts/src/main/java/de/intevation/gnv/exports/DefaultProfile.java @ 231:74255064a4c5

Added the Region-Filter to the Workflow of the Artifacttescases to be able to test it automatically. Checkin laer because of trouble with checksum of these file gnv-artifacts/trunk@299 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Fri, 06 Nov 2009 11:12:45 +0000
parents f68ffbe974a0
children 2ceb4bf51cba
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
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
3 /**
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
4 * @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
5 * @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
6 */
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
7 public class DefaultProfile
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
8 implements Export.Profile
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 protected String [] names;
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11 protected char separator;
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12 protected char escapeCharacter;
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13 protected char quoteCharacter;
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14 protected String type;
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15 protected String encoding;
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17 public DefaultProfile() {
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
18 }
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 String [] names,
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22 char separator,
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23 char escapeCharacter,
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24 char quoteCharacter,
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25 String type,
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26 String encoding
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
27 ) {
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
28 this.names = names;
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29 this.separator = separator;
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30 this.escapeCharacter = escapeCharacter;
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
31 this.quoteCharacter = quoteCharacter;
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32 this.type = type;
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
33 this.encoding = encoding;
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
34 }
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
36 public int numberColumns() {
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
37 return names.length;
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
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
40 public String getHeader(int index) {
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
41 return names[index];
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
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
44 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
45 return value;
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
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
48 public char getSeparator() {
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
49 return separator;
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
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
52 public char getEscapeCharacter() {
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
53 return escapeCharacter;
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
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
56 public char getQuoteCharacter() {
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
57 return quoteCharacter;
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
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
60 public String getType() {
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
61 return type;
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
62 }
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
63
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
64 public String getEncoding() {
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
65 return encoding;
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
66 }
f68ffbe974a0 Implemented an exporter for odv and csv exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
67 }

http://dive4elements.wald.intevation.org