Esri Geoportal Server
1.2.9

com.esri.gpt.catalog.gxe
Class XmlElement

java.lang.Object
  extended by com.esri.gpt.catalog.gxe.XmlNode
      extended by com.esri.gpt.catalog.gxe.XmlElement

public class XmlElement
extends XmlNode

Represents an XML element.


Constructor Summary
XmlElement()
          Default constructor
XmlElement(XmlElement objectToDuplicate, XmlElement parent)
          Construct by duplicating an existing object.
 
Method Summary
 void appendChildren(XmlElements elements)
          Appends child elements.
 XmlElement duplicate(XmlElement parent)
          Produces a deep clone of the object.
 XmlAttributes ensureAttributes()
          Ensures that the attribute collection is not null and returns the collection.
 XmlElements ensureChildren()
          Ensures that the child collection is not null and returns the collection.
 XmlAttributes getAttributes()
          Gets the attributes.
 String getAttributeValue(String namespaceURI, String name)
          Gets a child attribute value
 XmlElements getChildren()
          Gets the children.
 void importAttributes(XmlAttributes base, boolean preserveLocals)
          Imports attributes from a base collection into the local collection.
 void importChildren(XmlElements base)
          Imports elements from a base collection into the local collection.
 void setAttributes(XmlAttributes attributes)
          Sets the attributes.
 void setChildren(XmlElements children)
          Sets the children.
 
Methods inherited from class com.esri.gpt.catalog.gxe.XmlNode
ensureNodeInfo, getNodeInfo, getParent, setNodeInfo, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlElement

public XmlElement()
Default constructor


XmlElement

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

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

getAttributes

public XmlAttributes getAttributes()
Gets the attributes.

Returns:
the attributes

setAttributes

public void setAttributes(XmlAttributes attributes)
Sets the attributes.

Parameters:
attributes - the attributes

getChildren

public XmlElements getChildren()
Gets the children.

Returns:
the children

setChildren

public void setChildren(XmlElements children)
Sets the children.

Parameters:
children - the children

appendChildren

public void appendChildren(XmlElements elements)
Appends child elements.

Parameters:
elements - the elements to append

duplicate

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

Overrides:
duplicate in class XmlNode
Parameters:
parent - the parent
Returns:
the duplicated object

ensureAttributes

public XmlAttributes ensureAttributes()
Ensures that the attribute collection is not null and returns the collection.

Returns:
the attributes

ensureChildren

public XmlElements ensureChildren()
Ensures that the child collection is not null and returns the collection.

Returns:
the children

getAttributeValue

public String getAttributeValue(String namespaceURI,
                                String name)
Gets a child attribute value

Parameters:
namespaceURI - the namespace URI
name - the attribute name
Returns:
the associated value (can be null);

importAttributes

public void importAttributes(XmlAttributes base,
                             boolean preserveLocals)
Imports attributes from a base collection into the local collection.
When preserveLocals=true, the local attributes take precedence (i.e. an attribute that is in both collections will not be overriden locally).

Parameters:
base - the base collection
preserveLocals - true if local attributes should be preserved

importChildren

public void importChildren(XmlElements base)
Imports elements from a base collection into the local collection.

Parameters:
base - the base collection

Esri Geoportal Server
1.2.9

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