Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/access/BedDifferencesAccess.java @ 6241:db97448f21b7
Add method to get name pairs of differences
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Mon, 10 Jun 2013 13:04:48 +0200 |
parents | 165086b1e66d |
children | a1ceacf15d3a |
comparison
equal
deleted
inserted
replaced
6240:3e59b64a17c8 | 6241:db97448f21b7 |
---|---|
66 } | 66 } |
67 | 67 |
68 return differenceArtifactIds; | 68 return differenceArtifactIds; |
69 } | 69 } |
70 | 70 |
71 public String[] getDifferenceArtifactNamePairs() { | |
72 | |
73 String [] diffs = getDiffs(); | |
74 String [] result = new String[diffs.length/2]; | |
75 for (int i = 0; i < diffs.length/2; i++) { | |
76 String diff1 = StringUtil.unbracket(diffs[0 + 2*i]); | |
77 String diff2 = StringUtil.unbracket(diffs[1 + 2*i]); | |
78 String[] diff1parts = diff1.split(";"); | |
79 String[] diff2parts = diff2.split(";"); | |
80 result[i] = diff1parts[3] + " - " + diff2parts[3]; | |
81 } | |
82 | |
83 return result; | |
84 } | |
85 | |
71 public int [][] extractHeightIds(CallContext context) { | 86 public int [][] extractHeightIds(CallContext context) { |
72 String [][] artifactsIds = getDifferenceArtifactIds(); | 87 String [][] artifactsIds = getDifferenceArtifactIds(); |
73 int [][] ids = new int[artifactsIds.length][2]; | 88 int [][] ids = new int[artifactsIds.length][2]; |
74 for (int i = 0; i < artifactsIds.length; ++i) { | 89 for (int i = 0; i < artifactsIds.length; ++i) { |
75 D4EArtifact a1 = RiverUtils.getArtifact(artifactsIds[i][0], context); | 90 D4EArtifact a1 = RiverUtils.getArtifact(artifactsIds[i][0], context); |