teichmann@5831: package org.dive4elements.river.artifacts.model; felix@1723: teichmann@5831: import org.dive4elements.artifacts.Artifact; teichmann@5831: import org.dive4elements.artifacts.CallContext; felix@1723: teichmann@5831: import org.dive4elements.river.artifacts.StaticWKmsArtifact; felix@1723: felix@1723: /** felix@1723: * Facet to show W|km Values. felix@1723: */ felix@1723: public class WKmsFacet felix@2031: extends BlackboardDataFacet felix@1723: implements FacetTypes { felix@1723: felix@1723: /** Trivial Constructor. */ felix@1723: public WKmsFacet(String description) { felix@1815: this(STATIC_WKMS, description); felix@1815: } felix@1815: felix@1815: public WKmsFacet(String name, String description) { felix@1815: this.name = name; felix@1723: this.description = description; felix@1815: this.index = 0; felix@1723: } felix@1723: felix@1723: felix@1723: /** felix@1723: * Returns the data this facet requires. felix@1723: * felix@1723: * @param artifact the owner artifact. felix@1723: * @param context the CallContext (ignored). felix@1723: * felix@1723: * @return the data. felix@1723: */ felix@1723: @Override felix@1723: public Object getData(Artifact artifact, CallContext context) { felix@1723: StaticWKmsArtifact staticData = felix@1723: (StaticWKmsArtifact) artifact; felix@1723: return staticData.getWKms(0); felix@1723: } felix@1723: felix@1723: felix@1723: /** felix@1723: * Create a deep copy of this Facet. felix@1723: * @return a deep copy. felix@1723: */ felix@1723: @Override felix@1723: public WKmsFacet deepCopy() { felix@1723: WKmsFacet copy = new WKmsFacet(description); felix@1723: copy.set(this); felix@1723: return copy; felix@1723: } felix@1723: } felix@1723: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :