it.geosolutions.geoserver.rest.encoder.utils
Class ElementUtils
java.lang.Object
it.geosolutions.geoserver.rest.encoder.utils.ElementUtils
public abstract class ElementUtils
- extends java.lang.Object
- Author:
- Carlo Cancellieri - carlo.cancellieri@geo-solutions.it
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ElementUtils
public ElementUtils()
remove
public static boolean remove(Element root,
Element el)
throws java.lang.IllegalArgumentException
- Parameters:
root
- the root where to start searching to element to removeel
- the element to remove (will be set to null since this node is unusable after removal)
- Returns:
- true if the element EQUALS to the 'el' starting from root
(including) is found, false if object 'el' is not found
- Throws:
java.lang.IllegalArgumentException
search
public static java.util.List<Element> search(Element root,
Filter filter,
int depth)
throws java.lang.IllegalArgumentException
- Parameters:
root
- filter
- depth
- the max depth to search. Use contains(final Element
root, final Filter filter)
for an infinite depth search
- Returns:
-
- Throws:
java.lang.IllegalArgumentException
search
public static java.util.List<Element> search(Element root,
Filter filter)
contains
public static Element contains(Element root,
Filter filter)
throws java.lang.IllegalArgumentException
- Parameters:
root
- name
- val
-
- Returns:
- the FIRST element matching the passed filter or null
- Throws:
java.lang.IllegalArgumentException
contains
public static Element contains(Element root,
java.lang.String name,
java.lang.String val)
throws java.lang.IllegalArgumentException
- Parameters:
root
- name
- val
-
- Returns:
- the FIRST element EQUALS to a node with name and a text value
starting from root or null
- Throws:
java.lang.IllegalArgumentException
contains
public static Element contains(Element root,
java.lang.String name)
throws java.lang.IllegalArgumentException
- return the FIRST element with name equals to the passed key
- Parameters:
root
- name
-
- Returns:
-
- Throws:
java.lang.IllegalArgumentException
contains
public static Element contains(Element root,
Element el)
throws java.lang.IllegalArgumentException
- Parameters:
root
- el
-
- Returns:
- the FIRST element EQUALS to the 'el' starting from root or null
This tests for equality of this Content object to the supplied
object. Content items are considered equal only if they are
referentially equal (i.e. the same object).
- Throws:
java.lang.IllegalArgumentException
Copyright © 2007-2012 GeoSolutions. All Rights Reserved.