com.evolveum.midpoint.prism.xml
Class PrismJaxbProcessor

java.lang.Object
  extended by com.evolveum.midpoint.prism.xml.PrismJaxbProcessor

public class PrismJaxbProcessor
extends Object

Author:
semancik

Constructor Summary
PrismJaxbProcessor(PrismContext prismContext)
           
 
Method Summary
 boolean canConvert(Class<?> clazz)
           
 boolean canConvert(QName xsdType)
           
 boolean compareAny(List<Object> a, List<Object> b)
           
<T> T
fromElement(Object element, Class<T> type)
           
 Class<?> getCompileTimeClass(QName xsdType)
           
 JAXBContext getContext()
           
 PrismContext getPrismContext()
           
 void initialize()
           
 boolean isJaxbClass(Class<?> clazz)
           
 void marshalElementToDom(JAXBElement<?> jaxbElement, Node parentNode)
           
<T> Element
marshalElementToDom(JAXBElement<T> jaxbElement, Document doc)
           
 String marshalElementToString(JAXBElement<?> jaxbElement)
           
 String marshalElementToString(JAXBElement<?> jaxbElement, Map<String,Object> properties)
           
 String marshalElementToString(Object element)
           
 String marshalElementToString(Object element, Map<String,Object> properties)
          Serializes DOM or JAXB element to string
 String marshalElementToString(Object element, QName elementName)
          Serializes DOM or JAXB element to string, using specified elementName if needed.
<T> Element
marshalObjectToDom(T jaxbObject, QName elementQName, Document doc)
           
<T> void
marshalObjectToDom(T jaxbObject, QName elementQName, Element parentElement)
           
 void marshalToDom(Objectable objectable, Node parentNode)
           
 String marshalToString(Objectable objectable)
           
 String marshalToString(Objectable objectable, Map<String,Object> properties)
           
 void setContext(JAXBContext context)
           
 Object toAny(PrismValue value, Document document)
           
 Element toDomElement(Object element)
           
 Element toDomElement(Object jaxbElement, Document doc)
           
 Element toDomElement(Object jaxbElement, Document doc, boolean adopt, boolean clone, boolean deep)
           
<T> T
toJavaValue(Element element, Class<T> typeClass)
           
 Object toJavaValue(Element element, QName xsdType)
          Used to convert property values from DOM
<T> JAXBElement<T>
unmarshalElement(File file, Class<T> type)
           
<T> JAXBElement<T>
unmarshalElement(InputStream input, Class<T> type)
           
<T> JAXBElement<T>
unmarshalElement(Node node, Class<T> type)
           
<T> JAXBElement<T>
unmarshalElement(Reader reader, Class<T> type)
           
<T> JAXBElement<T>
unmarshalElement(String xmlString, Class<T> type)
           
<T> T
unmarshalObject(File file, Class<T> type)
           
<T> T
unmarshalObject(Object domOrJaxbElement, Class<T> type)
           
<T> T
unmarshalObject(String stringXml, Class<T> type)
           
<T> T
unmarshalRootObject(File file, Class<T> type)
           
<T> T
unmarshalToObject(Node node, Class<T> type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrismJaxbProcessor

public PrismJaxbProcessor(PrismContext prismContext)
Method Detail

getPrismContext

public PrismContext getPrismContext()

initialize

public void initialize()

getContext

public JAXBContext getContext()

setContext

public void setContext(JAXBContext context)

isJaxbClass

public boolean isJaxbClass(Class<?> clazz)

canConvert

public boolean canConvert(Class<?> clazz)

canConvert

public boolean canConvert(QName xsdType)

getCompileTimeClass

public Class<?> getCompileTimeClass(QName xsdType)

toJavaValue

public <T> T toJavaValue(Element element,
                         Class<T> typeClass)
              throws JAXBException
Throws:
JAXBException

toJavaValue

public Object toJavaValue(Element element,
                          QName xsdType)
                   throws JAXBException
Used to convert property values from DOM

Throws:
JAXBException

marshalToString

public String marshalToString(Objectable objectable)
                       throws JAXBException
Throws:
JAXBException

marshalToString

public String marshalToString(Objectable objectable,
                              Map<String,Object> properties)
                       throws JAXBException
Throws:
JAXBException

marshalElementToString

public String marshalElementToString(JAXBElement<?> jaxbElement)
                              throws JAXBException
Throws:
JAXBException

marshalElementToString

public String marshalElementToString(JAXBElement<?> jaxbElement,
                                     Map<String,Object> properties)
                              throws JAXBException
Throws:
JAXBException

marshalElementToString

public String marshalElementToString(Object element)
                              throws JAXBException
Throws:
JAXBException

marshalElementToString

public String marshalElementToString(Object element,
                                     Map<String,Object> properties)
                              throws JAXBException
Serializes DOM or JAXB element to string

Throws:
JAXBException

marshalElementToString

public String marshalElementToString(Object element,
                                     QName elementName)
                              throws JAXBException
Serializes DOM or JAXB element to string, using specified elementName if needed.

Throws:
JAXBException

marshalToDom

public void marshalToDom(Objectable objectable,
                         Node parentNode)
                  throws JAXBException
Throws:
JAXBException

marshalElementToDom

public void marshalElementToDom(JAXBElement<?> jaxbElement,
                                Node parentNode)
                         throws JAXBException
Throws:
JAXBException

marshalElementToDom

public <T> Element marshalElementToDom(JAXBElement<T> jaxbElement,
                                       Document doc)
                            throws JAXBException
Throws:
JAXBException

marshalObjectToDom

public <T> Element marshalObjectToDom(T jaxbObject,
                                      QName elementQName,
                                      Document doc)
                           throws JAXBException
Throws:
JAXBException

marshalObjectToDom

public <T> void marshalObjectToDom(T jaxbObject,
                                   QName elementQName,
                                   Element parentElement)
                        throws JAXBException
Throws:
JAXBException

toDomElement

public Element toDomElement(Object element)
                     throws JAXBException
Throws:
JAXBException

toDomElement

public Element toDomElement(Object jaxbElement,
                            Document doc)
                     throws JAXBException
Throws:
JAXBException

toDomElement

public Element toDomElement(Object jaxbElement,
                            Document doc,
                            boolean adopt,
                            boolean clone,
                            boolean deep)
                     throws JAXBException
Throws:
JAXBException

unmarshalElement

public <T> JAXBElement<T> unmarshalElement(String xmlString,
                                           Class<T> type)
                                throws JAXBException,
                                       SchemaException
Throws:
JAXBException
SchemaException

unmarshalElement

public <T> JAXBElement<T> unmarshalElement(InputStream input,
                                           Class<T> type)
                                throws JAXBException,
                                       SchemaException
Throws:
JAXBException
SchemaException

unmarshalElement

public <T> JAXBElement<T> unmarshalElement(Reader reader,
                                           Class<T> type)
                                throws JAXBException,
                                       SchemaException
Throws:
JAXBException
SchemaException

unmarshalToObject

public <T> T unmarshalToObject(Node node,
                               Class<T> type)
                    throws JAXBException,
                           SchemaException
Throws:
JAXBException
SchemaException

unmarshalElement

public <T> JAXBElement<T> unmarshalElement(Node node,
                                           Class<T> type)
                                throws JAXBException,
                                       SchemaException
Throws:
JAXBException
SchemaException

unmarshalObject

public <T> T unmarshalObject(File file,
                             Class<T> type)
                  throws JAXBException,
                         SchemaException,
                         FileNotFoundException
Throws:
JAXBException
SchemaException
FileNotFoundException

unmarshalObject

public <T> T unmarshalObject(String stringXml,
                             Class<T> type)
                  throws JAXBException,
                         SchemaException
Throws:
JAXBException
SchemaException

unmarshalObject

public <T> T unmarshalObject(Object domOrJaxbElement,
                             Class<T> type)
                  throws SchemaException
Throws:
SchemaException

unmarshalElement

public <T> JAXBElement<T> unmarshalElement(File file,
                                           Class<T> type)
                                throws SchemaException,
                                       FileNotFoundException,
                                       JAXBException
Throws:
SchemaException
FileNotFoundException
JAXBException

unmarshalRootObject

public <T> T unmarshalRootObject(File file,
                                 Class<T> type)
                      throws JAXBException,
                             FileNotFoundException,
                             SchemaException
Throws:
JAXBException
FileNotFoundException
SchemaException

compareAny

public boolean compareAny(List<Object> a,
                          List<Object> b)

fromElement

public <T> T fromElement(Object element,
                         Class<T> type)
              throws SchemaException
Throws:
SchemaException

toAny

public Object toAny(PrismValue value,
                    Document document)
             throws SchemaException
Throws:
SchemaException


Copyright © 2013 evolveum. All Rights Reserved.