comparison artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifact.java @ 26:83a059c204f8

Connected /create with artifact db. artifacts/trunk@61 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 10 Sep 2009 12:29:57 +0000
parents d5dc2900392f
children c4d85a8532d1
comparison
equal deleted inserted replaced
25:ccc6aae25585 26:83a059c204f8
1 package de.intevation.artifactdatabase; 1 package de.intevation.artifactdatabase;
2 2
3 import org.w3c.dom.Document; 3 import org.w3c.dom.Document;
4
5 import javax.xml.parsers.DocumentBuilderFactory;
6 import javax.xml.parsers.ParserConfigurationException;
7 4
8 import de.intevation.artifacts.Artifact; 5 import de.intevation.artifacts.Artifact;
9 import de.intevation.artifacts.ArtifactFactory; 6 import de.intevation.artifacts.ArtifactFactory;
10 7
11 import org.apache.log4j.Logger; 8 import org.apache.log4j.Logger;
21 protected String identifier; 18 protected String identifier;
22 19
23 public DefaultArtifact() { 20 public DefaultArtifact() {
24 } 21 }
25 22
26 protected Document newDocument() {
27 try {
28 return DocumentBuilderFactory
29 .newInstance()
30 .newDocumentBuilder()
31 .newDocument();
32 }
33 catch (ParserConfigurationException pce) {
34 logger.error(pce.getLocalizedMessage(), pce);
35 }
36 return null;
37 }
38
39 public String identifier() { 23 public String identifier() {
40 return this.identifier; 24 return this.identifier;
41 } 25 }
42 26
43 public String hash() { 27 public String hash() {
44 return String.valueOf(hashCode()); 28 return String.valueOf(hashCode());
45 } 29 }
46 30
47 public Document describe(Object context) { 31 public Document describe(Object context) {
48 return newDocument(); 32 return XMLUtils.newDocument();
49 } 33 }
50 34
51 public Document advance(Document target, Object context) { 35 public Document advance(Document target, Object context) {
52 return newDocument(); 36 return XMLUtils.newDocument();
53 } 37 }
54 38
55 public Document feed(Document target, Object context) { 39 public Document feed(Document target, Object context) {
56 return newDocument(); 40 return XMLUtils.newDocument();
57 } 41 }
58 42
59 public byte [] out(Document format, Object context) { 43 public byte [] out(Document format, Object context) {
60 return new byte[0]; 44 return new byte[0];
61 } 45 }

http://dive4elements.wald.intevation.org