teichmann@5863: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde teichmann@5863: * Software engineering by Intevation GmbH teichmann@5863: * teichmann@5994: * This file is Free Software under the GNU AGPL (>=v3) teichmann@5863: * and comes with ABSOLUTELY NO WARRANTY! Check out the teichmann@5994: * documentation coming with Dive4Elements River for details. teichmann@5863: */ teichmann@5863: teichmann@5831: package org.dive4elements.river.artifacts.model; felix@2172: felix@2172: import org.apache.log4j.Logger; felix@2172: teichmann@5831: import org.dive4elements.artifacts.Artifact; teichmann@5831: import org.dive4elements.artifacts.CallContext; felix@2172: teichmann@5831: import org.dive4elements.river.artifacts.ManualPointsArtifact; felix@2172: teichmann@5831: import org.dive4elements.artifactdatabase.state.DefaultFacet; teichmann@5831: import org.dive4elements.artifactdatabase.state.Facet; felix@2172: felix@2172: felix@2172: /** felix@2172: * Facet to access ManualPoints that where added by user. felix@2172: */ felix@2172: public class ManualPointsFacet felix@2172: extends DefaultFacet felix@2172: { felix@2172: /** Logger for this class. */ tom@8856: private static final Logger log = Logger.getLogger( tom@8856: ManualPointsFacet.class); felix@2172: felix@2172: felix@2172: /** felix@2172: * Trivial Constructor. felix@2172: */ felix@2172: public ManualPointsFacet() { felix@2172: } felix@2172: felix@2172: felix@2172: /** felix@2172: * Trivial Constructor for a ManualPointsFacet. felix@2172: * felix@2172: * @param index Database-Index to use. felix@2172: * @param name Name (~type) of Facet. felix@2172: * @param description Description of Facet. felix@2172: */ felix@2172: public ManualPointsFacet(int index, String name, String description) { felix@2172: super(index, name, description); felix@2172: } felix@2172: felix@2172: felix@2172: /** felix@3225: * Get List of ManualPoints for river from Artifact. felix@2172: * tom@8856: * @param artifact (ManualPoints-)Artifact to query tom@8856: * for list of ManualPoints. felix@2172: * @param context Ignored. felix@2172: */ felix@2172: @Override felix@2172: public Object getData(Artifact artifact, CallContext context) { felix@2172: ManualPointsArtifact pointsArtifact = (ManualPointsArtifact) artifact; felix@2206: return pointsArtifact.getPointsData(this.name); felix@2172: } felix@2172: felix@2172: felix@2172: /** Do a deep copy. */ felix@2172: @Override felix@2172: public Facet deepCopy() { felix@2172: ManualPointsFacet copy = new ManualPointsFacet(); felix@2172: copy.set(this); felix@2172: return copy; felix@2172: } felix@2172: } felix@2172: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :