X - the generic typeY - the generic typepublic class MarshallerHelper<X,Y> extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_XOP_THRESHOLD |
| Constructor and Description |
|---|
MarshallerHelper(Class<X> unmarshallClass,
Class<Y> marshallClass)
Instantiates a new marshaller helper.
|
MarshallerHelper(Class<X> unmarshallClass,
Class<Y> marshallClass,
boolean format)
Instantiates a new marshaller helper.
|
MarshallerHelper(Class<X> unmarshallClass,
Class<Y> marshallClass,
boolean format,
boolean xop)
Instantiates a new marshaller helper.
|
MarshallerHelper(Class<X> unmarshallClass,
Class<Y> marshallClass,
boolean format,
boolean xop,
int threshold) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttachmentPart(String id,
AttachmentPart attachmentPart) |
void |
clearAttachmentPartMap() |
Map<String,DataHandler> |
getDataHandlersMap()
Obtain the marshalled attachement as datahandler
|
Document |
toDocument(Y data) |
X |
toObject(byte[] data)
To object.
|
X |
toObject(InputStream inputStream)
To object.
|
X |
toObject(Node source)
To object.
|
X |
toObject(String data)
To object.
|
String |
toString(Y data)
returns marshalled data element.
|
byte[] |
toXMLByteArray(Y data)
To xml byte array.
|
public static final int DEFAULT_XOP_THRESHOLD
public MarshallerHelper(Class<X> unmarshallClass, Class<Y> marshallClass)
unmarshallClass - the unmarshall classmarshallClass - the marshall classpublic MarshallerHelper(Class<X> unmarshallClass, Class<Y> marshallClass, boolean format)
unmarshallClass - the unmarshall classmarshallClass - the marshall classformat - property used to specify whether or not the marshalled XML data is formatted with linefeeds and indentation.public MarshallerHelper(Class<X> unmarshallClass, Class<Y> marshallClass, boolean format, boolean xop)
unmarshallClass - the unmarshall classmarshallClass - the marshall classformat - property used to specify whether or not the marshalled XML data is formatted with linefeeds and indentation.xop - public void addAttachmentPart(String id, AttachmentPart attachmentPart)
public void clearAttachmentPartMap()
public Map<String,DataHandler> getDataHandlersMap()
public X toObject(byte[] data)
data - the datapublic X toObject(InputStream inputStream)
inputStream - the input streamTechnicalConnectorExceptionpublic String toString(Y data)
data - jaxbElementpublic byte[] toXMLByteArray(Y data)
data - the data
Connector Packaging generic 4.2.0 API
Copyright © {inceptionYear}-2022 eHealth. All Rights Reserved.