at.ac.tuwien.infosys.sm4all.copal.api.xml
Class ElementUtil

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.api.xml.ElementUtil
Direct Known Subclasses:
ArrayMarshaller, SchemaURL, XMLContextProcessor, XMLContextPublisher, XMLContextQuery, XMLProcessorAction

public class ElementUtil
extends Object

Utility class for an Element.

Author:
sanjin

Constructor Summary
ElementUtil(Element element)
          Creates instance of Element utility class that works on specified Element.
 
Method Summary
static Element getChildElement(Element element, String namespaceURI, String localName)
          Returns first child Element of specified Element with specified local name and namespace URI.
protected  Element getChildElement(String namespaceURI, String localName)
          Returns first child Element of specified Element with specified local name and namespace URI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementUtil

public ElementUtil(Element element)
Creates instance of Element utility class that works on specified Element.

Parameters:
element - the Element.
Method Detail

getChildElement

protected Element getChildElement(String namespaceURI,
                                  String localName)
                           throws MissingFieldException
Returns first child Element of specified Element with specified local name and namespace URI.

Parameters:
localName - the local name of child Element.
namespaceURI - the namespace URI of child Element.
Returns:
first child Element.
Throws:
MissingFieldException - if there is no such child Element.
NullPointerException - if specified namespace URI or local name is null.

getChildElement

public static Element getChildElement(Element element,
                                      String namespaceURI,
                                      String localName)
                               throws MissingFieldException
Returns first child Element of specified Element with specified local name and namespace URI.

Parameters:
element - the parent Element.
localName - the local name of child Element.
namespaceURI - the namespace URI of child Element.
Returns:
first child Element.
Throws:
MissingFieldException - if there is no such child Element.
NullPointerException - if specified namespace URI or local name is null.


Copyright © 2010 Distributed Systems Group, Vienna University of Technology. All Rights Reserved.