it.geosolutions.geoserver.rest.encoder.utils
Class NestedElementEncoder

java.lang.Object
  extended by it.geosolutions.geoserver.rest.encoder.utils.XmlElement
      extended by it.geosolutions.geoserver.rest.encoder.utils.NestedElementEncoder

public class NestedElementEncoder
extends XmlElement

Encodes lists of entries with key attribute.
e.g.:

 <listName>
   <entry key="k1">val1</entry>
   <entry key="k2">val2</entry>
   <entry key="k3">val3</entry>
 </listName>
 
 
 
 This can be also add compounded Elements 
e.g.:
 <listName>
  <entry key="time">
   	<dimensionInfo>
 			<enabled>false</enabled>
 		</dimensionInfo>
 	</entry>
 	<entry key="elevation">
 		<dimensionInfo>
 			<enabled>true</enabled>
 			<attribute>ele</attribute>
 			<presentation>LIST</presentation>
 		</dimensionInfo>
 	</entry>
 </listName>
 
 This can be also add list of compounded Elements 
AllowMultithreading false true ele LIST }

Author:
ETj (etj at geo-solutions.it), Carlo Cancellieri - carlo.cancellieri@geo-solutions.it

Field Summary
static String ENTRY
           
static String KEY
           
 
Constructor Summary
NestedElementEncoder(String listName)
           
 
Method Summary
 void add(String key, org.jdom.Element value)
           
 void add(String key, List<org.jdom.Element> list)
           
 void add(String key, String value)
           
 boolean remove(String key)
           
 void set(String key, org.jdom.Element value)
           
 void set(String key, List<org.jdom.Element> value)
           
 void set(String key, String value)
           
 
Methods inherited from class it.geosolutions.geoserver.rest.encoder.utils.XmlElement
add, addContent, getRoot, isEmpty, set, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ENTRY

public static final String ENTRY
See Also:
Constant Field Values

KEY

public static final String KEY
See Also:
Constant Field Values
Constructor Detail

NestedElementEncoder

public NestedElementEncoder(String listName)
Method Detail

set

public void set(String key,
                String value)
Overrides:
set in class XmlElement

set

public void set(String key,
                org.jdom.Element value)

add

public void add(String key,
                org.jdom.Element value)

add

public void add(String key,
                String value)
Overrides:
add in class XmlElement

add

public void add(String key,
                List<org.jdom.Element> list)

set

public void set(String key,
                List<org.jdom.Element> value)

remove

public boolean remove(String key)
Overrides:
remove in class XmlElement


Copyright © 2007-2013 GeoSolutions. All Rights Reserved.