org.gcube.contentmanagement.contentmanager.oaiplugin.contexts
Class OAIPluginContext

java.lang.Object
  extended by PluginContext
      extended by org.gcube.contentmanagement.contentmanager.oaiplugin.contexts.OAIPluginContext

public class OAIPluginContext
extends PluginContext

The context of the plugin.

Author:
Lucio Lelii (CNR)

Field Summary
static java.lang.String NS
          The plugin's namespace.
 
Constructor Summary
OAIPluginContext()
          
 
Method Summary
static
<T extends OAICreateParameters>
T
fromElement(org.w3c.dom.Element e, java.lang.Class<T> type)
          Facility to transform a DOM element into an JAXB-annotated object
 java.util.List<org.w3c.dom.Element> getCreatePayloads()
          
 FactoryDelegate getFactory()
          
static org.w3c.dom.Element toElement(OAICreateParameters o)
          Facility to transform a JAXB-annotated object into a DOM element.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NS

public static final java.lang.String NS
The plugin's namespace.

See Also:
Constant Field Values
Constructor Detail

OAIPluginContext

public OAIPluginContext()
                 throws java.lang.Exception

Throws:
java.lang.Exception
Method Detail

getCreatePayloads

public java.util.List<org.w3c.dom.Element> getCreatePayloads()


getFactory

public FactoryDelegate getFactory()


toElement

public static org.w3c.dom.Element toElement(OAICreateParameters o)
                                     throws java.lang.Exception
Facility to transform a JAXB-annotated object into a DOM element.

Parameters:
o - the object.
Returns:
the element.
Throws:
java.lang.Exception - if the object could not be transformed.

fromElement

public static <T extends OAICreateParameters> T fromElement(org.w3c.dom.Element e,
                                                            java.lang.Class<T> type)
                                                 throws java.lang.Exception
Facility to transform a DOM element into an JAXB-annotated object

Type Parameters:
T - the type of the object.
Parameters:
e - the element.
type - the (runtime representation) of the type of the object.
Returns:
the object.
Throws:
java.lang.Exception - if the element could not be transformed.