annotate src/main/java/de/intevation/lada/importer/laf/EntryFormat.java @ 711:3ec358698b4d

Code style and documentation.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 22 Jul 2015 16:03:03 +0200
parents 9e733f44d8b0
children
rev   line source
626
9e733f44d8b0 Code style and comments.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 610
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
9e733f44d8b0 Code style and comments.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 610
diff changeset
2 * Software engineering by Intevation GmbH
9e733f44d8b0 Code style and comments.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 610
diff changeset
3 *
9e733f44d8b0 Code style and comments.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 610
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
9e733f44d8b0 Code style and comments.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 610
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
9e733f44d8b0 Code style and comments.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 610
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
9e733f44d8b0 Code style and comments.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 610
diff changeset
7 */
610
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
8 package de.intevation.lada.importer.laf;
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
9
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
10 import java.util.regex.Pattern;
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
11
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
12 /**
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
13 * An EntryFormat describes the internal structure of LAF-based key-value pairs.
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
14 * The pattern is a regular expression used to match the value in the LAF
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
15 * importer.
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
16 * The entry formats are defined in a config file
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
17 * (see wiki-doc: https://bfs-intern.intevation.de/Server/Importer).
626
9e733f44d8b0 Code style and comments.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 610
diff changeset
18 *
610
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
19 * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a>
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
20 */
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
21 public class EntryFormat
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
22 {
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
23 private String key;
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
24 private Pattern pattern;
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
25 private Object defaultValue;
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
26
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
27 /**
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
28 * Default constructor to create a new EntryFormat object.
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
29 */
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
30 public EntryFormat() {
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
31 }
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
32
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
33 /**
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
34 * @return the key.
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
35 */
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
36 public String getKey() {
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
37 return key;
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
38 }
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
39
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
40 /**
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
41 * @param key The key to set.
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
42 */
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
43 public void setKey(String key) {
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
44 this.key = key;
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
45 }
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
46
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
47 /**
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
48 * @return the pattern
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
49 */
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
50 public Pattern getPattern() {
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
51 return pattern;
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
52 }
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
53
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
54 /**
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
55 * @param pattern The pattern to set.
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
56 */
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
57 public void setPattern(Pattern pattern) {
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
58 this.pattern = pattern;
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
59 }
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
60
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
61 /**
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
62 * @return the default value.
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
63 */
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
64 public Object getDefaultValue() {
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
65 return defaultValue;
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
66 }
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
67
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
68 /**
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
69 * @param defaultValue the default value to set.
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
70 */
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
71 public void setDefaultValue(Object defaultValue) {
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
72 this.defaultValue = defaultValue;
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
73 }
374a2e78cec5 Added importer impl for laf file format.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
74 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)