comparison artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifact.java @ 24:d5dc2900392f

* Added callback parameter to Artifact.setup() * New namespace context for artifacts. artifacts/trunk@58 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 10 Sep 2009 08:57:09 +0000
parents 63a8aa276693
children 83a059c204f8
comparison
equal deleted inserted replaced
23:00596a591a2f 24:d5dc2900392f
4 4
5 import javax.xml.parsers.DocumentBuilderFactory; 5 import javax.xml.parsers.DocumentBuilderFactory;
6 import javax.xml.parsers.ParserConfigurationException; 6 import javax.xml.parsers.ParserConfigurationException;
7 7
8 import de.intevation.artifacts.Artifact; 8 import de.intevation.artifacts.Artifact;
9 import de.intevation.artifacts.ArtifactFactory;
9 10
10 import org.apache.log4j.Logger; 11 import org.apache.log4j.Logger;
11 12
12 /** 13 /**
13 * @author Sascha L. Teichmann (sascha.teichmann@intevation.de) 14 * @author Sascha L. Teichmann (sascha.teichmann@intevation.de)
15 public class DefaultArtifact 16 public class DefaultArtifact
16 implements Artifact 17 implements Artifact
17 { 18 {
18 private static Logger logger = Logger.getLogger(DefaultArtifact.class); 19 private static Logger logger = Logger.getLogger(DefaultArtifact.class);
19 20
20 /**
21 * The URI of the Namespace of the Artifacts
22 */
23 public final static String NAMESPACE_URI = "http://www.intevation.de/2009/artifacts";
24
25 /**
26 * The XML-Prefix for the Artifacts-Namespae
27 */
28 public final static String NAMESPACE_PREFIX = "art";
29
30 protected String identifier; 21 protected String identifier;
31 22
32 public DefaultArtifact() { 23 public DefaultArtifact() {
33 } 24 }
34 25
67 58
68 public byte [] out(Document format, Object context) { 59 public byte [] out(Document format, Object context) {
69 return new byte[0]; 60 return new byte[0];
70 } 61 }
71 62
72 public void setup(String identifier, Object context) { 63 public void setup(String identifier, ArtifactFactory factory, Object context) {
73 this.identifier = identifier; 64 this.identifier = identifier;
74 } 65 }
75 66
76 public void endOfLife(Object context) { 67 public void endOfLife(Object context) {
77 } 68 }

http://dive4elements.wald.intevation.org