com.evolveum.midpoint.prism.xml
Class PrismJaxbProcessor
java.lang.Object
com.evolveum.midpoint.prism.xml.PrismJaxbProcessor
public class PrismJaxbProcessor
- extends Object
- Author:
- semancik
Method Summary |
boolean |
canConvert(Class<?> clazz)
|
boolean |
canConvert(QName xsdType)
|
boolean |
compareAny(List<Object> a,
List<Object> b)
|
|
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)
|
|
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. |
|
marshalObjectToDom(T jaxbObject,
QName elementQName,
Document doc)
|
|
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)
|
|
toJavaValue(Element element,
Class<T> typeClass)
|
Object |
toJavaValue(Element element,
QName xsdType)
Used to convert property values from DOM |
|
unmarshalElement(File file,
Class<T> type)
|
|
unmarshalElement(InputStream input,
Class<T> type)
|
|
unmarshalElement(Node node,
Class<T> type)
|
|
unmarshalElement(Reader reader,
Class<T> type)
|
|
unmarshalElement(String xmlString,
Class<T> type)
|
|
unmarshalObject(File file,
Class<T> type)
|
|
unmarshalObject(Object domOrJaxbElement,
Class<T> type)
|
|
unmarshalObject(String stringXml,
Class<T> type)
|
|
unmarshalRootObject(File file,
Class<T> type)
|
|
unmarshalToObject(Node node,
Class<T> type)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PrismJaxbProcessor
public PrismJaxbProcessor(PrismContext prismContext)
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.