comparison flys-backend/src/main/java/de/intevation/flys/importer/ImportAnnotation.java @ 186:cf8cbcb6a10d

Added parser to read *.KM files. flys-backend/trunk@1506 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 17 Mar 2011 17:43:57 +0000
parents a60edcfe5f53
children 003ac16812dd
comparison
equal deleted inserted replaced
185:a60edcfe5f53 186:cf8cbcb6a10d
1 package de.intevation.flys.importer; 1 package de.intevation.flys.importer;
2 2
3 public class ImportAnnotation 3 public class ImportAnnotation
4 implements Comparable<ImportAnnotation>
4 { 5 {
5 protected ImportAttribute attribute; 6 protected ImportAttribute attribute;
6 protected ImportPosition position; 7 protected ImportPosition position;
7 protected ImportRange range; 8 protected ImportRange range;
8 9
9 public ImportAnnotation() { 10 public ImportAnnotation() {
11 }
12
13 public ImportAnnotation(
14 ImportAttribute attribute,
15 ImportPosition position,
16 ImportRange range
17 ) {
18 this.attribute = attribute;
19 this.position = position;
20 this.range = range;
21 }
22
23 public int compareTo(ImportAnnotation other) {
24 int d = attribute.compareTo(other.attribute);
25 if (d != 0) {
26 return d;
27 }
28
29 if ((d = position.compareTo(other.position)) != 0) {
30 return d;
31 }
32
33 if ((d = range.compareTo(other.range)) != 0) {
34 return d;
35 }
36
37 return 0;
10 } 38 }
11 39
12 public ImportAttribute getAttribute() { 40 public ImportAttribute getAttribute() {
13 return attribute; 41 return attribute;
14 } 42 }

http://dive4elements.wald.intevation.org