at.ac.tuwien.infosys.sm4all.copal.api.event.xml
Class XMLElement<T>

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.api.event.xml.XMLElement<T>
Type Parameters:
T - the type of element's value.
Direct Known Subclasses:
ConcreteElement, VirtualElement

public abstract class XMLElement<T>
extends Object

The abstract class for all COPAL elements.

Author:
sanjin

Constructor Summary
protected XMLElement(Class<?> type)
           
 
Method Summary
protected  XPathExpression getExpression()
           
 String getQualifiedName()
           
 Class<?> getXMLType()
           
abstract  String getXPath()
           
abstract  T retrieve(Document document)
          Retrieve the value of this element from specified Document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLElement

protected XMLElement(Class<?> type)
Parameters:
type - the XML type of this COPAL element returned by the XPath.
Method Detail

getXPath

public abstract String getXPath()
Returns:
the XPath which can be used to retrieve the value of this COPAL element from a Document.

retrieve

public abstract T retrieve(Document document)
                    throws FailedUnmarshallingException
Retrieve the value of this element from specified Document.

Parameters:
document - the Document.
Returns:
the value of this property.
Throws:
FailedUnmarshallingException - if retrieving was not successful.

getQualifiedName

public String getQualifiedName()
Returns:
the qualified name of this XML element.

getXMLType

public Class<?> getXMLType()
Returns:
the XML type of this COPAL element returned by the XPath.

getExpression

protected XPathExpression getExpression()
Returns:
the XPath expression created from the getXPath().


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