Mercurial > dive4elements > river
changeset 1724:0349dd524f9c
Add convenience method to add default data as string.
flys-artifacts/trunk@3006 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 18 Oct 2011 13:26:15 +0000 (2011-10-18) |
parents | 690037105542 |
children | d9afb16d1fd4 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java |
diffstat | 2 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Tue Oct 18 12:56:12 2011 +0000 +++ b/flys-artifacts/ChangeLog Tue Oct 18 13:26:15 2011 +0000 @@ -1,3 +1,10 @@ +2011-10-18 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + Add convenience-method to add defaultdata (string). + + * src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java: + (addStringData): Add Default (String) Data . + 2011-10-18 Felix Wolfsteller <felix.wolfsteller@intevation.de> Add a new Artifact and Facet (StaticWKmsArtifact, WKmsFacet) to
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java Tue Oct 18 12:56:12 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java Tue Oct 18 13:26:15 2011 +0000 @@ -3,6 +3,7 @@ import de.intevation.artifactdatabase.ArtifactDatabaseImpl; import de.intevation.artifactdatabase.DefaultArtifact; +import de.intevation.artifactdatabase.data.DefaultStateData; import de.intevation.artifactdatabase.data.StateData; import de.intevation.artifactdatabase.state.DefaultFacet; @@ -520,6 +521,10 @@ return data != null ? (String) data.getValue() : null; } + public void addStringData(String name, String value) { + addData(name, new DefaultStateData(name, null, null, value)); + } + public Collection<StateData> getAllData() { return data.values(); }