Esri Geoportal Server
1.2.9

com.esri.gpt.catalog.gxe
Class XmlElements

java.lang.Object
  extended by com.esri.gpt.catalog.gxe.XmlElements

public class XmlElements
extends Object

An XML element collection.


Constructor Summary
XmlElements()
          Default constructor.
XmlElements(XmlElements objectToDuplicate, XmlElement parent)
          Construct by duplicating an existing object.
 
Method Summary
 void add(XmlElement member)
          Adds a member to the collection.
 XmlElements duplicate(XmlElement parent)
          Produces a deep clone of the object.
 XmlElement findExtensible(XmlElement target)
          Finds an extensible element within the collection.
 XmlElement findMatchingElement(XmlElement target, String gxdAttributeName, String gxdAttributeValue)
          Finds a matching child element.
 XmlElement findOverridable(XmlElement target)
          Finds an overridable element within the collection.
 void replace(XmlElement elementToReplace, XmlElement newElement)
          Replaces an element within the collection.
 void resetParent(XmlElement parent)
          Resets the parent for all child elements..
 int size()
          Returns the size of the collection.
 List<XmlElement> values()
          Returns the list of values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlElements

public XmlElements()
Default constructor.


XmlElements

public XmlElements(XmlElements objectToDuplicate,
                   XmlElement parent)
Construct by duplicating an existing object.

Parameters:
objectToDuplicate - the object to duplicate
parent - the parent
Method Detail

add

public void add(XmlElement member)
Adds a member to the collection.

Parameters:
member - the member to add

duplicate

public XmlElements duplicate(XmlElement parent)
Produces a deep clone of the object.
The duplication constructor is invoked.
return new XmlElements(this,parent);

Parameters:
parent - the parent
Returns:
the duplicated object

findExtensible

public XmlElement findExtensible(XmlElement target)
Finds an extensible element within the collection.

Parameters:
target - the target to match (same element name and namespace;
Returns:
the extensible element (null if none)

findMatchingElement

public XmlElement findMatchingElement(XmlElement target,
                                      String gxdAttributeName,
                                      String gxdAttributeValue)
Finds a matching child element.

Parameters:
target - the target to match (same element name and namespace)
gxdAttributeName - a configured attribute name the the matching child must possess (within the GXD namespace, typically "overridable" or "extensible")
gxdAttributeValue - the attribute value that must match (typically "true")
Returns:
the matching element (null if none)

findOverridable

public XmlElement findOverridable(XmlElement target)
Finds an overridable element within the collection.

Parameters:
target - the target to match (same element name and namespace;
Returns:
the overridable element (null if none)

replace

public void replace(XmlElement elementToReplace,
                    XmlElement newElement)
Replaces an element within the collection.

Parameters:
elementToReplace - the element to be replaced
newElement - the new element

resetParent

public void resetParent(XmlElement parent)
Resets the parent for all child elements..

Parameters:
parent - the new parent

size

public int size()
Returns the size of the collection.

Returns:
the size

values

public List<XmlElement> values()
Returns the list of values.

Returns:
the values

Esri Geoportal Server
1.2.9

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.