Mercurial > dive4elements > framework
view artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifact.java @ 94:5332d956729c
Brought all line lengths of non Javadoc lines below 80.
artifacts/trunk@937 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sat, 17 Apr 2010 10:28:43 +0000 |
parents | 730ff077a58c |
children | 933bbc9fc11f |
line wrap: on
line source
package de.intevation.artifactdatabase; import de.intevation.artifacts.Artifact; import de.intevation.artifacts.ArtifactFactory; import de.intevation.artifacts.CallContext; import java.io.IOException; import java.io.OutputStream; import org.apache.log4j.Logger; import org.w3c.dom.Document; /** * Trivial implementation of an artifact. Useful to be subclassed. * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> */ public class DefaultArtifact implements Artifact { private static Logger logger = Logger.getLogger(DefaultArtifact.class); /** * The identifier of the artifact. */ protected String identifier; /** * Default constructor. */ public DefaultArtifact() { } public void setIdentifier(String identifier) { if (logger.isDebugEnabled()) { logger.debug("Change identifier: " + this.identifier + " -> " + identifier); } this.identifier = identifier; } public String identifier() { if (logger.isDebugEnabled()) { logger.debug("DefaultArtifact.identifier: " + identifier); } return this.identifier; } public String hash() { String hash = String.valueOf(hashCode()); if (logger.isDebugEnabled()) { logger.debug("DefaultArtifact.hashCode: " + identifier + " (" + hash + ")"); } return hash; } public Document describe(Document data, CallContext context) { if (logger.isDebugEnabled()) { logger.debug("DefaultArtifact.describe: " + identifier); } return XMLUtils.newDocument(); } public Document advance(Document target, CallContext context) { if (logger.isDebugEnabled()) { logger.debug("DefaultArtifact.advance: " + identifier); } return XMLUtils.newDocument(); } public Document feed(Document target, CallContext context) { if (logger.isDebugEnabled()) { logger.debug("DefaultArtifact.feed: " + identifier); } return XMLUtils.newDocument(); } public void out( Document format, OutputStream out, CallContext context ) throws IOException { if (logger.isDebugEnabled()) { logger.debug("DefaultArtifact.out: " + identifier); } } public void setup(String identifier, ArtifactFactory factory, Object context, Document data) { if (logger.isDebugEnabled()) { logger.debug("DefaultArtifact.setup: " + identifier); } this.identifier = identifier; } public void endOfLife(Object context) { if (logger.isDebugEnabled()) { logger.debug("DefaultArtifact.endOfLife: " + identifier); } } public void cleanup(Object context) { if (logger.isDebugEnabled()) { logger.debug("DefaultArtifact.cleanup: " + identifier); } } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :