Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSDBArtifact.java @ 2672:5afccab9aac1
Modified floodmap specific datacage configuration and improved WMS hws layer.
flys-artifacts/trunk@4361 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 08 May 2012 13:55:59 +0000 |
parents | 0da8874bd378 |
children | f5af3adb3b95 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSDBArtifact.java Tue May 08 12:14:55 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSDBArtifact.java Tue May 08 13:55:59 2012 +0000 @@ -105,10 +105,14 @@ protected FLYSArtifact artifact; + protected String name; + + public WMSDBState() {} public WMSDBState(FLYSArtifact artifact) { this.artifact = artifact; + this.name = null; } @Override @@ -223,6 +227,24 @@ return null; } + /** + * Returns the name of the WMS layer. This method extracts the name + * from 'ids' data string. It is expected, that the 'ids' string is + * seperated by ';' and that the name is placed at index 1. + * + * @return the name of the WMS layer. + */ + public String getName() { + if (name == null) { + String ids = artifact.getDataAsString("ids"); + + String parts[] = ids.split(";"); + name = parts[1]; + } + + return name; + } + protected abstract String getFacetType(); protected abstract String getTitle(CallMeta meta);