net.sf.doolin.oxml.adapter
Class AbstractSimpleOXMLAdapter<T>

java.lang.Object
  extended by net.sf.doolin.oxml.adapter.AbstractSimpleOXMLAdapter<T>
Type Parameters:
T - Expected returned type
All Implemented Interfaces:
OXMLAdapter
Direct Known Subclasses:
DefaultOXMLAdapter, DimensionOXMLAdapter, EnumOXMLAdapter

public abstract class AbstractSimpleOXMLAdapter<T>
extends Object
implements OXMLAdapter

Adapter that converts the string value to an object.

Author:
Damien Coraboeuf

Constructor Summary
AbstractSimpleOXMLAdapter()
           
 
Method Summary
 Object adapt(Node currentNode, String path, OXMLContext context)
          Adapts a value taken from the XML to a value suitable in the object model.
protected abstract  T adapt(String value, OXMLContext context)
          Adapts a simple string to an object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSimpleOXMLAdapter

public AbstractSimpleOXMLAdapter()
Method Detail

adapt

public Object adapt(Node currentNode,
                    String path,
                    OXMLContext context)
Description copied from interface: OXMLAdapter
Adapts a value taken from the XML to a value suitable in the object model.

Specified by:
adapt in interface OXMLAdapter
Parameters:
currentNode - Current node
path - XPath from the current node
context - Execution context
Returns:
Object value

adapt

protected abstract T adapt(String value,
                           OXMLContext context)
Adapts a simple string to an object.

Parameters:
value - String to adapt
context - Execution context
Returns:
Created instance


Copyright © 2011. All Rights Reserved.