ingo@226: package de.intevation.artifactdatabase.state; ingo@226: ingo@280: import de.intevation.artifacts.Artifact; ingo@280: import de.intevation.artifacts.CallContext; ingo@280: ingo@226: ingo@226: /** ingo@226: * The default implementation of a Facet. ingo@226: * ingo@226: * @author Ingo Weinzierl ingo@226: */ ingo@226: public class DefaultFacet implements Facet { ingo@226: ingo@277: /** The index of this facet.*/ ingo@277: protected int index; ingo@277: ingo@226: /** The name of this facet.*/ ingo@226: protected String name; ingo@226: ingo@226: /** The description of this facet.*/ ingo@226: protected String description; ingo@226: ingo@226: ingo@226: /** ingo@226: * The default constructor to create new Facet objects. ingo@226: * ingo@226: * @param name The name of this new facet. ingo@226: * @param description The description of this new facet. ingo@226: */ ingo@226: public DefaultFacet(String name, String description) { ingo@277: this(0, name, description); ingo@277: } ingo@277: ingo@277: ingo@277: /** ingo@277: * The default constructor to create new Facet objects. ingo@277: * ingo@277: * @param index The index of this new facet. ingo@277: * @param name The name of this new facet. ingo@277: * @param description The description of this new facet. ingo@277: */ ingo@277: public DefaultFacet(int index, String name, String description) { ingo@277: this.index = index; ingo@226: this.name = name; ingo@226: this.description = description; ingo@226: } ingo@226: ingo@226: ingo@277: public int getIndex() { ingo@277: return index; ingo@277: } ingo@277: ingo@277: ingo@226: public String getName() { ingo@226: return name; ingo@226: } ingo@226: ingo@226: ingo@226: public String getDescription() { ingo@226: return description; ingo@226: } ingo@280: ingo@280: ingo@280: public Object getData(Artifact artifact, CallContext context) { ingo@280: return null; ingo@280: } sascha@283: sascha@283: public String toString() { sascha@283: return new StringBuilder("name = '") sascha@283: .append(name).append("', index = ") sascha@283: .append(index).append(", description = '") sascha@283: .append(description).append("'") sascha@283: .toString(); sascha@283: } ingo@226: } ingo@226: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :