Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## be.ehealth.technicalconnector.utils
Class MarshallerHelper<X,Y>

    java.lang.Object
      be.ehealth.technicalconnector.utils.MarshallerHelper<X,Y>

Type Parameters:
  `X` - the generic type
  `Y` - the generic type

    public class MarshallerHelper<X,Y>

extends Object

The Class MarshallerHelper.

Field Summary
`static int` | `DEFAULT_XOP_THRESHOLD`

Constructor Summary
`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)`

Method Summary
`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.
`X` | `toObjectNoRootElementRequired(byte[] data)` Deprecated. replaced by `ConnectorXmlUtils`.toObject(byte[] data)
`String` | `toString(Y data)` returns marshalled data element.
`String` | `toStringNoRootElementRequired(Y data)` Deprecated. replaced by `MarshallerHelper`.toString(Y data)
`byte[]` | `toXMLByteArray(Y data)` To xml byte array.
`byte[]` | `toXMLByteArrayNoRootElementRequired(Y data)` Deprecated. replaced by `ConnectorXmlUtils`.toXMLByteArray(Y data)
`byte[]` | `toXMLByteArrayNoRootElementRequired(Y data, QName rootTag)` Deprecated.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_XOP_THRESHOLD

    public static final int DEFAULT_XOP_THRESHOLD

See Also:
  Constant Field Values

Constructor Detail

### MarshallerHelper

    public MarshallerHelper(Class<X> unmarshallClass,
                            Class<Y> marshallClass)

  Instantiates a new marshaller helper.

  Parameters:
    `unmarshallClass` - the unmarshall class
    `marshallClass` - the marshall class

### MarshallerHelper

    public MarshallerHelper(Class<X> unmarshallClass,
                            Class<Y> marshallClass,
                            boolean format)

  Instantiates a new marshaller helper.

  Parameters:
    `unmarshallClass` - the unmarshall class
    `marshallClass` - the marshall class
    `format` - property used to specify whether or not the marshalled XML data is formatted with linefeeds and indentation.

### MarshallerHelper

    public MarshallerHelper(Class<X> unmarshallClass,
                            Class<Y> marshallClass,
                            boolean format,
                            boolean xop)

  Instantiates a new marshaller helper.

  Parameters:
    `unmarshallClass` - the unmarshall class
    `marshallClass` - the marshall class
    `format` - property used to specify whether or not the marshalled XML data is formatted with linefeeds and indentation.
    `xop` -

### MarshallerHelper

    public MarshallerHelper(Class<X> unmarshallClass,
                            Class<Y> marshallClass,
                            boolean format,
                            boolean xop,
                            int threshold)

Method Detail

### addAttachmentPart

    public void addAttachmentPart(String id,
                                  AttachmentPart attachmentPart)

### clearAttachmentPartMap

    public void clearAttachmentPartMap()

### getDataHandlersMap

    public Map<String,DataHandler> getDataHandlersMap()

  Obtain the marshalled attachement as datahandler

### toDocument

    public Document toDocument(Y data)

### toObject

    public X toObject(byte[] data)

  To object.

  Parameters:
    `data` - the data
  Returns:
    the x

### toObject

    public X toObject(InputStream inputStream)
               throws TechnicalConnectorException

  To object.

  Parameters:
    `inputStream` - the input stream
  Returns:
    the x
  Throws:
    `TechnicalConnectorException`

### toObject

    public X toObject(Node source)

  To object.

  Parameters:
    `source` -
  Returns:

### toObject

    public X toObject(String data)

  To object.

  Parameters:
    `data` - the data
  Returns:
    the x

### toObjectNoRootElementRequired

    @Deprecated
    public X toObjectNoRootElementRequired(byte[] data)

  Deprecated. replaced by `ConnectorXmlUtils`.toObject(byte[] data)

  To object. Even if the JAXB class has no @XMLRootElement annotation.

  Parameters:
    `data` - the data
  Returns:
    the x

### toString

    public String toString(Y data)

  returns marshalled data element.

  Parameters:
    `data` - jaxbElement
  Returns:
    String

### toStringNoRootElementRequired

    @Deprecated
    public String toStringNoRootElementRequired(Y data)

  Deprecated. replaced by `MarshallerHelper`.toString(Y data)

  returns marshalled data element.

  Parameters:
    `data` - jaxbElement
  Returns:
    String

### toXMLByteArray

    public byte[] toXMLByteArray(Y data)

  To xml byte array.

  Parameters:
    `data` - the data
  Returns:
    the byte[]

### toXMLByteArrayNoRootElementRequired

    @Deprecated
    public byte[] toXMLByteArrayNoRootElementRequired(Y data)

  Deprecated. replaced by `ConnectorXmlUtils`.toXMLByteArray(Y data)

  To xml byte array.

  Parameters:
    `data` - the data
  Returns:
    the byte[]

### toXMLByteArrayNoRootElementRequired

    @Deprecated
    public byte[] toXMLByteArrayNoRootElementRequired(Y data,
                                                                 QName rootTag)

  Deprecated.

  To xml byte array.

  Parameters:
    `data` - the data
  Returns:
    the byte[]

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Connector Packaging PERSOCCUPATIONALTHERAPIST 3.13.1 API
Copyright © {inceptionYear}-2017 eHealth. All Rights Reserved.