# HG changeset patch # User Ingo Weinzierl # Date 1308147364 0 # Node ID 0a579b71496b583c48f8f85b69d7bcf35ec4148b # Parent 8b58259d3dd3d34a59bc163609633f25fc94bf43 Facets have indices now. artifacts/trunk@2125 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 8b58259d3dd3 -r 0a579b71496b ChangeLog --- a/ChangeLog Thu Jun 09 09:33:29 2011 +0000 +++ b/ChangeLog Wed Jun 15 14:16:04 2011 +0000 @@ -1,3 +1,9 @@ +2011-06-15 Ingo Weinzierl + + * artifact-database/src/main/java/de/intevation/artifactdatabase/state/Facet.java, + artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultFacet.java: + Added an index to a facet. + 2011-06-08 Sascha L. Teichmann * artifacts-common/src/main/java/de/intevation/artifacts/common/utils/XMLUtils.java: diff -r 8b58259d3dd3 -r 0a579b71496b artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultFacet.java --- a/artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultFacet.java Thu Jun 09 09:33:29 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultFacet.java Wed Jun 15 14:16:04 2011 +0000 @@ -8,6 +8,9 @@ */ public class DefaultFacet implements Facet { + /** The index of this facet.*/ + protected int index; + /** The name of this facet.*/ protected String name; @@ -22,11 +25,29 @@ * @param description The description of this new facet. */ public DefaultFacet(String name, String description) { + this(0, name, description); + } + + + /** + * The default constructor to create new Facet objects. + * + * @param index The index of this new facet. + * @param name The name of this new facet. + * @param description The description of this new facet. + */ + public DefaultFacet(int index, String name, String description) { + this.index = index; this.name = name; this.description = description; } + public int getIndex() { + return index; + } + + public String getName() { return name; } diff -r 8b58259d3dd3 -r 0a579b71496b artifact-database/src/main/java/de/intevation/artifactdatabase/state/Facet.java --- a/artifact-database/src/main/java/de/intevation/artifactdatabase/state/Facet.java Thu Jun 09 09:33:29 2011 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/state/Facet.java Wed Jun 15 14:16:04 2011 +0000 @@ -7,6 +7,13 @@ public interface Facet { /** + * Returns the index of this facet. + * + * @return the index of this facet. + */ + int getIndex(); + + /** * Returns the name of this facet. * * @return the name of this facet.