annotate artifacts/src/main/java/org/dive4elements/river/artifacts/model/ManagedFacet.java @ 5863:4897a58c8746

River artifacts: Added new copyright headers.
author Sascha L. Teichmann <teichmann@intevation.de>
date Sun, 28 Apr 2013 14:40:59 +0200
parents 5aa05a7a34b7
children af13ceeba52a
rev   line source
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
2 * Software engineering by Intevation GmbH
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
3 *
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
6 * documentation coming with Dive4Elements River for details.
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
7 */
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
8
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4736
diff changeset
9 package org.dive4elements.river.artifacts.model;
346
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10
945
59ae2a823e73 Use the Facet.toXML() method to write facet elements into the DESCRIBE document of the Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 694
diff changeset
11 import org.w3c.dom.Document;
59ae2a823e73 Use the Facet.toXML() method to write facet elements into the DESCRIBE document of the Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 694
diff changeset
12 import org.w3c.dom.Element;
59ae2a823e73 Use the Facet.toXML() method to write facet elements into the DESCRIBE document of the Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 694
diff changeset
13 import org.w3c.dom.Node;
59ae2a823e73 Use the Facet.toXML() method to write facet elements into the DESCRIBE document of the Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 694
diff changeset
14
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4736
diff changeset
15 import org.dive4elements.artifactdatabase.state.DefaultFacet;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4736
diff changeset
16 import org.dive4elements.artifactdatabase.state.Facet;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4736
diff changeset
17 import org.dive4elements.artifacts.ArtifactNamespaceContext;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4736
diff changeset
18 import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator;
346
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19
1624
238145ef67da Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1061
diff changeset
20
238145ef67da Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1061
diff changeset
21 /**
238145ef67da Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1061
diff changeset
22 * Facet with user-supplied theme-control-information (pos in list,
238145ef67da Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1061
diff changeset
23 * active/disabled etc) attached.
238145ef67da Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1061
diff changeset
24 */
4255
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
25 public class ManagedFacet extends DefaultFacet implements Comparable {
346
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26
1624
238145ef67da Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1061
diff changeset
27 /** The uuid of the owner artifact. */
346
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
28 protected String uuid;
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29
1624
238145ef67da Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1061
diff changeset
30 /** A property that determines the position of this facet. */
346
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
31 protected int position;
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32
1624
238145ef67da Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1061
diff changeset
33 /** A property that determines if this facet is active or not. */
346
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
34 protected int active;
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35
1715
a70e0cbc5e02 Added support for removing themes from output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1624
diff changeset
36 /** A property that determines if this facet is visible or not. */
a70e0cbc5e02 Added support for removing themes from output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1624
diff changeset
37 protected int visible;
a70e0cbc5e02 Added support for removing themes from output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1624
diff changeset
38
1061
b1b0a0b61845 Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 949
diff changeset
39 public ManagedFacet() {
b1b0a0b61845 Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 949
diff changeset
40 }
346
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
41
4255
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
42 public ManagedFacet(String name, int index, String desc, String uuid,
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
43 int pos, int active, int visible) {
694
68c6c75a6f7c Add index and description of facets to collections describe document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 346
diff changeset
44 super(index, name, desc);
346
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
45
4255
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
46 this.uuid = uuid;
346
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
47 this.position = pos;
4255
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
48 this.active = active;
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
49 this.visible = visible;
346
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
50 }
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
51
1721
eb35570df0e8 Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1715
diff changeset
52 /**
eb35570df0e8 Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1715
diff changeset
53 * Sets position (will be merged to position in ThemeList).
eb35570df0e8 Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1715
diff changeset
54 */
346
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
55 public void setPosition(int pos) {
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
56 this.position = pos;
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
57 }
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
58
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
59 public int getPosition() {
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
60 return position;
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
61 }
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
62
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
63 public void setActive(int active) {
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
64 this.active = active;
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
65 }
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
66
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
67 public int getActive() {
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
68 return active;
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
69 }
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
70
1715
a70e0cbc5e02 Added support for removing themes from output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1624
diff changeset
71 public void setVisible(int visible) {
a70e0cbc5e02 Added support for removing themes from output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1624
diff changeset
72 this.visible = visible;
a70e0cbc5e02 Added support for removing themes from output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1624
diff changeset
73 }
a70e0cbc5e02 Added support for removing themes from output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1624
diff changeset
74
a70e0cbc5e02 Added support for removing themes from output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1624
diff changeset
75 public int getVisible() {
a70e0cbc5e02 Added support for removing themes from output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1624
diff changeset
76 return visible;
a70e0cbc5e02 Added support for removing themes from output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1624
diff changeset
77 }
a70e0cbc5e02 Added support for removing themes from output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1624
diff changeset
78
1721
eb35570df0e8 Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1715
diff changeset
79 /**
eb35570df0e8 Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1715
diff changeset
80 * Get uuid of related artifact.
4736
b195fede1c3b Remove trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4255
diff changeset
81 *
1721
eb35570df0e8 Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1715
diff changeset
82 * @return uuid of related artifact.
eb35570df0e8 Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1715
diff changeset
83 */
346
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
84 public String getArtifact() {
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
85 return uuid;
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
86 }
945
59ae2a823e73 Use the Facet.toXML() method to write facet elements into the DESCRIBE document of the Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 694
diff changeset
87
59ae2a823e73 Use the Facet.toXML() method to write facet elements into the DESCRIBE document of the Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 694
diff changeset
88 public Node toXML(Document doc) {
4255
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
89 ElementCreator ec = new ElementCreator(doc,
945
59ae2a823e73 Use the Facet.toXML() method to write facet elements into the DESCRIBE document of the Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 694
diff changeset
90 ArtifactNamespaceContext.NAMESPACE_URI,
59ae2a823e73 Use the Facet.toXML() method to write facet elements into the DESCRIBE document of the Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 694
diff changeset
91 ArtifactNamespaceContext.NAMESPACE_PREFIX);
59ae2a823e73 Use the Facet.toXML() method to write facet elements into the DESCRIBE document of the Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 694
diff changeset
92
59ae2a823e73 Use the Facet.toXML() method to write facet elements into the DESCRIBE document of the Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 694
diff changeset
93 Element facet = ec.create("theme");
59ae2a823e73 Use the Facet.toXML() method to write facet elements into the DESCRIBE document of the Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 694
diff changeset
94 ec.addAttr(facet, "artifact", getArtifact(), true);
59ae2a823e73 Use the Facet.toXML() method to write facet elements into the DESCRIBE document of the Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 694
diff changeset
95 ec.addAttr(facet, "facet", getName(), true);
59ae2a823e73 Use the Facet.toXML() method to write facet elements into the DESCRIBE document of the Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 694
diff changeset
96 ec.addAttr(facet, "pos", String.valueOf(getPosition()), true);
59ae2a823e73 Use the Facet.toXML() method to write facet elements into the DESCRIBE document of the Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 694
diff changeset
97 ec.addAttr(facet, "active", String.valueOf(getActive()), true);
59ae2a823e73 Use the Facet.toXML() method to write facet elements into the DESCRIBE document of the Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 694
diff changeset
98 ec.addAttr(facet, "index", String.valueOf(getIndex()), true);
59ae2a823e73 Use the Facet.toXML() method to write facet elements into the DESCRIBE document of the Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 694
diff changeset
99 ec.addAttr(facet, "description", getDescription(), true);
1715
a70e0cbc5e02 Added support for removing themes from output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1624
diff changeset
100 ec.addAttr(facet, "visible", String.valueOf(getVisible()), true);
945
59ae2a823e73 Use the Facet.toXML() method to write facet elements into the DESCRIBE document of the Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 694
diff changeset
101
59ae2a823e73 Use the Facet.toXML() method to write facet elements into the DESCRIBE document of the Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 694
diff changeset
102 return facet;
59ae2a823e73 Use the Facet.toXML() method to write facet elements into the DESCRIBE document of the Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 694
diff changeset
103 }
1061
b1b0a0b61845 Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 949
diff changeset
104
b1b0a0b61845 Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 949
diff changeset
105 public void set(ManagedFacet other) {
4255
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
106 uuid = other.uuid;
1061
b1b0a0b61845 Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 949
diff changeset
107 position = other.position;
4255
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
108 active = other.active;
1061
b1b0a0b61845 Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 949
diff changeset
109 }
b1b0a0b61845 Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 949
diff changeset
110
3076
5642a83420f2 FLYS artifacts: Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 1721
diff changeset
111 @Override
1061
b1b0a0b61845 Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 949
diff changeset
112 public Facet deepCopy() {
b1b0a0b61845 Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 949
diff changeset
113 ManagedFacet copy = new ManagedFacet();
4255
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
114 copy.set((DefaultFacet) this);
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
115 copy.set((ManagedFacet) this);
1061
b1b0a0b61845 Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 949
diff changeset
116 return copy;
b1b0a0b61845 Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 949
diff changeset
117 }
4255
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
118
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
119 @Override
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
120 public int compareTo(Object o) {
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
121 if (!(o instanceof ManagedFacet)) {
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
122 return -1;
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
123 }
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
124
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
125 ManagedFacet other = (ManagedFacet) o;
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
126
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
127 if (position < other.position) {
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
128 return -1;
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
129 }
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
130 else if (position > other.position) {
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
131 return 1;
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
132 }
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
133 else {
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
134 return 0;
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
135 }
670e98f5a441 Fixed leak while merging facets.
Ingo Weinzierl <weinzierl.ingo@googlemail.com>
parents: 4049
diff changeset
136 }
346
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
137 }
16161de47662 The Attributes of a collection are written into its DESCRIBE now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
138 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org