org.gcube.dataaccess.spd.havingengine.exl
Class HavingContext<T>

java.lang.Object
  extended by org.gcube.dataaccess.spd.havingengine.exl.HavingContext<T>
All Implemented Interfaces:
org.apache.commons.jexl2.JexlContext

public class HavingContext<T>
extends Object
implements org.apache.commons.jexl2.JexlContext

Enhanced JexlContext that let retrieve XML version of the object and the original object.

Author:
"Federico De Faveri defaveri@isti.cnr.it"

Field Summary
protected static DocumentBuilder builder
           
protected  org.apache.commons.jexl2.JexlContext context
           
protected  Document doc
           
protected  org.apache.commons.jexl2.JexlEngine engine
           
protected static org.slf4j.Logger logger
           
protected  T wrapped
           
protected static com.thoughtworks.xstream.XStream XSTREAM
           
 
Constructor Summary
HavingContext(org.apache.commons.jexl2.JexlEngine engine, T wrapped)
           
 
Method Summary
protected  Document buildDocument()
          Build XML document and parse it.
 Object get(String name)
           
 Document getDocument()
           
 org.apache.commons.jexl2.JexlEngine getEngine()
           
 T getWrapped()
           
 boolean has(String name)
           
 void set(String name, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.slf4j.Logger logger

XSTREAM

protected static com.thoughtworks.xstream.XStream XSTREAM

builder

protected static DocumentBuilder builder

context

protected org.apache.commons.jexl2.JexlContext context

engine

protected org.apache.commons.jexl2.JexlEngine engine

wrapped

protected T wrapped

doc

protected Document doc
Constructor Detail

HavingContext

public HavingContext(org.apache.commons.jexl2.JexlEngine engine,
                     T wrapped)
Method Detail

getEngine

public org.apache.commons.jexl2.JexlEngine getEngine()
Returns:
the engine

getWrapped

public T getWrapped()
Returns:
the wrapped

getDocument

public Document getDocument()

buildDocument

protected Document buildDocument()
Build XML document and parse it.

Returns:

get

public Object get(String name)
Specified by:
get in interface org.apache.commons.jexl2.JexlContext
Parameters:
name -
Returns:
See Also:
ObjectContext.get(java.lang.String)

set

public void set(String name,
                Object value)
Specified by:
set in interface org.apache.commons.jexl2.JexlContext
Parameters:
name -
value -
See Also:
ObjectContext.set(java.lang.String, java.lang.Object)

has

public boolean has(String name)
Specified by:
has in interface org.apache.commons.jexl2.JexlContext
Parameters:
name -
Returns:
See Also:
ObjectContext.has(java.lang.String)


Copyright © 2014. All Rights Reserved.