Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/main/java/de/intevation/gnv/utils/MetaWriter.java @ 724:9ba6bb85d6dd
Integrate lookup for MapFileTemplate for the different Layer.
gnv-artifacts/trunk@754 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Tue, 09 Mar 2010 12:54:05 +0000 |
parents | 6eccb68a8b99 |
children | 452fad121560 |
rev | line source |
---|---|
647
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.gnv.utils; |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 import java.io.File; |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 import java.io.FileNotFoundException; |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 import java.io.FileOutputStream; |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 import java.io.IOException; |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 import java.io.OutputStream; |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 import org.apache.log4j.Logger; |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 import org.w3c.dom.Document; |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 import org.w3c.dom.Element; |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 |
655
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
13 import de.intevation.artifactdatabase.XMLUtils; |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
14 import de.intevation.artifacts.ArtifactNamespaceContext; |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
15 import de.intevation.artifacts.CallContext; |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
16 import de.intevation.gnv.artifacts.context.GNVArtifactContext; |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
17 import de.intevation.gnv.wms.LayerInfo; |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
18 |
647
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 /** |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 * @author Ingo Weinzierl (ingo.weinzierl@intevation.de) |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 */ |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 public class MetaWriter { |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 private static Logger logger = Logger.getLogger(MetaWriter.class); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 public static final String NODE_MAPSERVER = "mapserver"; |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 public static final String NODE_SERVER = "server"; |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 public static final String NODE_MAP = "map"; |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 public static final String META_FILE_NAME = "meta.xml"; |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 public static final String ISOLINES_NAME = "isolines.shp"; |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 public static final String POLYGON_NAME = "polygons.shp"; |
655
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
33 public static final String LAYER_DATA_NAME = "data.shp"; |
647
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 private MetaWriter() { |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 } |
655
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
37 |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
38 public static Document writeLayerMeta(CallContext context, |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
39 String uuid, |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
40 String path, |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
41 String paramType, |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
42 String layerType){ |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
43 Document meta = XMLUtils.newDocument(); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
44 XMLUtils.ElementCreator creator = new XMLUtils.ElementCreator( |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
45 meta, |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
46 ArtifactNamespaceContext.NAMESPACE_URI, |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
47 ArtifactNamespaceContext.NAMESPACE_PREFIX); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
48 Element root = creator.create("meta"); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
49 meta.appendChild(root); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
50 |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
51 writeAbstractMeta(context, meta, root); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
52 writeLayerMeta(context, meta, root, uuid, paramType,layerType); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
53 boolean success = writeMetaFile(path, meta); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
54 |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
55 if (success){ |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
56 return meta; |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
57 }else{ |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
58 return null; |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
59 } |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
60 } |
647
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 public static Document writeHorizontalcrosssectionMeta( |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 CallContext context, |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 String uuid, |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
65 String path, |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 String paramType) |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
67 { |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 Document meta = XMLUtils.newDocument(); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
69 XMLUtils.ElementCreator creator = new XMLUtils.ElementCreator( |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
70 meta, |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
71 ArtifactNamespaceContext.NAMESPACE_URI, |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
72 ArtifactNamespaceContext.NAMESPACE_PREFIX); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
73 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
74 Element root = creator.create("meta"); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
75 meta.appendChild(root); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
76 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
77 writeAbstractMeta(context, meta, root); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
78 writePolygonMeta(context, meta, root, uuid, path, paramType); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
79 writeIsolineMeta(context, meta, root, uuid, path, paramType); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
80 |
655
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
81 boolean success = writeMetaFile(path, meta); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
82 |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
83 if (success){ |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
84 return meta; |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
85 }else{ |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
86 return null; |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
87 } |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
88 } |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
89 |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
90 /** |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
91 * @param path |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
92 * @param meta |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
93 */ |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
94 private static boolean writeMetaFile(String path, Document meta) { |
647
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
95 try { |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
96 File metaFile = new File(path, META_FILE_NAME); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
97 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
98 if (!metaFile.createNewFile() || !metaFile.canWrite()) { |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
99 logger.error("Error while writing meta file: "+metaFile.toString()); |
655
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
100 return false; |
647
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
101 } |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
102 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
103 OutputStream out = null; |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
104 boolean success = false; |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
105 try { |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
106 out = new FileOutputStream(metaFile); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
107 success = XMLUtils.toStream(meta, out); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
108 } |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
109 finally { |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
110 if (out != null) { |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
111 try { out.close(); } |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
112 catch (IOException ioe) {} |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
113 } |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
114 } |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
115 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
116 if (!success && metaFile.exists()) { |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
117 metaFile.delete(); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
118 } |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
119 |
655
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
120 return success; |
647
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
121 } |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
122 catch (FileNotFoundException fnfe) { |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
123 logger.error(fnfe); |
655
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
124 return false; |
647
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
125 } |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
126 catch (IOException ioe) { |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
127 logger.error(ioe, ioe); |
655
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
128 return false; |
647
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
129 } |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
130 } |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
131 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
132 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
133 public static void writeAbstractMeta( |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
134 CallContext callContext, |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
135 Document document, |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
136 Element meta |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
137 ) { |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
138 XMLUtils.ElementCreator creator = new XMLUtils.ElementCreator( |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
139 document, |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
140 ArtifactNamespaceContext.NAMESPACE_URI, |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
141 ArtifactNamespaceContext.NAMESPACE_PREFIX); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
142 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
143 GNVArtifactContext context = |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
144 (GNVArtifactContext) callContext.globalContext(); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
145 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
146 String server = (String) |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
147 context.get(GNVArtifactContext.MAPSERVER_SERVER_PATH_KEY); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
148 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
149 String map = (String) |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
150 context.get(GNVArtifactContext.MAPSERVER_MAP_PATH_KEY); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
151 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
152 logger.debug("MAPSERVER PATH: " + server); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
153 logger.debug("MAP PATH: " + map); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
154 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
155 Element mapserver = creator.create(NODE_MAPSERVER); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
156 Element serverPath = creator.create(NODE_SERVER); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
157 Element mapPath = creator.create(NODE_MAP); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
158 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
159 mapPath.setTextContent(map); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
160 serverPath.setTextContent(server); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
161 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
162 mapserver.appendChild(serverPath); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
163 mapserver.appendChild(mapPath); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
164 meta.appendChild(mapserver); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
165 } |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
166 |
655
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
167 protected static void writeLayerMeta( |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
168 CallContext context, |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
169 Document document, |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
170 Element meta, |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
171 String uuid, |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
172 String paramType, |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
173 String layerType |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
174 ) { |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
175 XMLUtils.ElementCreator creator = new XMLUtils.ElementCreator( |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
176 document, |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
177 ArtifactNamespaceContext.NAMESPACE_URI, |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
178 ArtifactNamespaceContext.NAMESPACE_PREFIX); |
647
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
179 |
655
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
180 Element layer = creator.create(LayerInfo.LAYER); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
181 Element model = creator.create(LayerInfo.LAYER_MODEL); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
182 Element name = creator.create(LayerInfo.LAYER_NAME); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
183 Element type = creator.create(LayerInfo.LAYER_TYPE); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
184 Element status = creator.create(LayerInfo.LAYER_STATUS); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
185 Element data = creator.create(LayerInfo.LAYER_DATA); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
186 |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
187 model.setTextContent(paramType); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
188 name.setTextContent(uuid); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
189 type.setTextContent(layerType); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
190 status.setTextContent("OFF"); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
191 data.setTextContent(LAYER_DATA_NAME); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
192 |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
193 layer.appendChild(model); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
194 layer.appendChild(name); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
195 layer.appendChild(type); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
196 layer.appendChild(status); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
197 layer.appendChild(data); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
198 |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
199 meta.appendChild(layer); |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
200 } |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
201 |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
202 |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
203 |
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
204 |
647
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
205 public static void writePolygonMeta( |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
206 CallContext context, |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
207 Document document, |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
208 Element meta, |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
209 String uuid, |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
210 String path, |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
211 String paramType |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
212 ) { |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
213 XMLUtils.ElementCreator creator = new XMLUtils.ElementCreator( |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
214 document, |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
215 ArtifactNamespaceContext.NAMESPACE_URI, |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
216 ArtifactNamespaceContext.NAMESPACE_PREFIX); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
217 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
218 Element layer = creator.create(LayerInfo.LAYER); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
219 Element model = creator.create(LayerInfo.LAYER_MODEL); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
220 Element name = creator.create(LayerInfo.LAYER_NAME); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
221 Element type = creator.create(LayerInfo.LAYER_TYPE); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
222 Element status = creator.create(LayerInfo.LAYER_STATUS); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
223 Element data = creator.create(LayerInfo.LAYER_DATA); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
224 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
225 model.setTextContent(paramType); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
226 name.setTextContent(uuid); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
227 type.setTextContent("POLYGON"); |
655
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
228 status.setTextContent("OFF"); |
647
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
229 data.setTextContent(POLYGON_NAME); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
230 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
231 layer.appendChild(model); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
232 layer.appendChild(name); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
233 layer.appendChild(type); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
234 layer.appendChild(status); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
235 layer.appendChild(data); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
236 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
237 meta.appendChild(layer); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
238 } |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
239 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
240 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
241 public static void writeIsolineMeta( |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
242 CallContext context, |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
243 Document document, |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
244 Element meta, |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
245 String uuid, |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
246 String path, |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
247 String paramType |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
248 ) { |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
249 XMLUtils.ElementCreator creator = new XMLUtils.ElementCreator( |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
250 document, |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
251 ArtifactNamespaceContext.NAMESPACE_URI, |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
252 ArtifactNamespaceContext.NAMESPACE_PREFIX); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
253 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
254 Element layer = creator.create(LayerInfo.LAYER); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
255 Element model = creator.create(LayerInfo.LAYER_MODEL); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
256 Element name = creator.create(LayerInfo.LAYER_NAME); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
257 Element type = creator.create(LayerInfo.LAYER_TYPE); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
258 Element status = creator.create(LayerInfo.LAYER_STATUS); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
259 Element data = creator.create(LayerInfo.LAYER_DATA); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
260 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
261 model.setTextContent(paramType+"_isolines"); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
262 name.setTextContent(uuid); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
263 type.setTextContent("LINE"); |
655
6eccb68a8b99
Added WMS-Publishing to Product Layer
Tim Englich <tim.englich@intevation.de>
parents:
647
diff
changeset
|
264 status.setTextContent("OFF"); |
647
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
265 data.setTextContent(ISOLINES_NAME); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
266 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
267 layer.appendChild(model); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
268 layer.appendChild(name); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
269 layer.appendChild(type); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
270 layer.appendChild(status); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
271 layer.appendChild(data); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
272 |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
273 meta.appendChild(layer); |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
274 } |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
275 } |
bb0aa1f81280
Added missing class MetaWriter from last commit.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
276 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |