Mercurial > dive4elements > framework
annotate artifacts/src/main/java/de/intevation/artifacts/ArtifactSerializer.java @ 202:c03d3a872cd2
Fixed a bug in the ElementCreator of the XMLUtils.
artifacts/trunk@1447 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 10 Mar 2011 08:25:30 +0000 |
parents | 933bbc9fc11f |
children |
rev | line source |
---|---|
100
933bbc9fc11f
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
85
diff
changeset
|
1 /* |
933bbc9fc11f
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
85
diff
changeset
|
2 * Copyright (c) 2010 by Intevation GmbH |
933bbc9fc11f
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
85
diff
changeset
|
3 * |
933bbc9fc11f
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
85
diff
changeset
|
4 * This program is free software under the LGPL (>=v2.1) |
933bbc9fc11f
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
85
diff
changeset
|
5 * Read the file LGPL.txt coming with the software for details |
933bbc9fc11f
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
85
diff
changeset
|
6 * or visit http://www.gnu.org/licenses/ if it does not exist. |
933bbc9fc11f
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
85
diff
changeset
|
7 */ |
933bbc9fc11f
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
85
diff
changeset
|
8 |
41
5e4bc24ea438
Made serilization more flexible. DB update required!!!
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
9 package de.intevation.artifacts; |
5e4bc24ea438
Made serilization more flexible. DB update required!!!
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
10 |
5e4bc24ea438
Made serilization more flexible. DB update required!!!
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
11 /** |
5e4bc24ea438
Made serilization more flexible. DB update required!!!
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
12 * Interface to make artifact persistent. |
5e4bc24ea438
Made serilization more flexible. DB update required!!!
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
13 * |
77
48d1a9a082c2
Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
41
diff
changeset
|
14 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> |
41
5e4bc24ea438
Made serilization more flexible. DB update required!!!
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
15 */ |
5e4bc24ea438
Made serilization more flexible. DB update required!!!
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
16 public interface ArtifactSerializer |
5e4bc24ea438
Made serilization more flexible. DB update required!!!
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
17 { |
78
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
77
diff
changeset
|
18 /** |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
77
diff
changeset
|
19 * Restores an artifact from an array of bytes. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
77
diff
changeset
|
20 * @param bytes the persistent representation of the artifact. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
77
diff
changeset
|
21 * @return The de-serialized artifact or null if there was an error. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
77
diff
changeset
|
22 */ |
41
5e4bc24ea438
Made serilization more flexible. DB update required!!!
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
23 Artifact fromBytes(byte [] bytes); |
78
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
77
diff
changeset
|
24 /** |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
77
diff
changeset
|
25 * Brings an artifact to a persistent form in form of a byte array. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
77
diff
changeset
|
26 * @param artifact The artifact to be serialized. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
77
diff
changeset
|
27 * @return the byte array representation of the artifact or null |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
77
diff
changeset
|
28 * if there was an error. |
55eefe63a777
Repaired the javadoc stuff for almost all artifact interfaces.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
77
diff
changeset
|
29 */ |
41
5e4bc24ea438
Made serilization more flexible. DB update required!!!
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
30 byte [] toBytes(Artifact artifact); |
5e4bc24ea438
Made serilization more flexible. DB update required!!!
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
31 } |
85
78263e910675
Completed Javadoc of sub module 'artifacts'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
78
diff
changeset
|
32 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |