org.apache.olingo.odata2.client.core.ep

## Class AtomSerializerDeserializer

- java.lang.Object
- - org.apache.olingo.odata2.client.core.ep.AtomSerializerDeserializer

- All Implemented Interfaces:
    ContentTypeBasedDeserializer, ContentTypeBasedSerializer

      public class AtomSerializerDeserializer
      extends Object
      implements ContentTypeBasedSerializer, ContentTypeBasedDeserializer

  This class includes methods to serialize deserialize XML Content type

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AtomSerializerDeserializer()`
    `AtomSerializerDeserializer(org.apache.olingo.odata2.core.commons.ContentType.ODataFormat odataFormat)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `InputStream` | `readBatchRequest(List<BatchPart> batchParts, String boundary)` Reads Batch Request Parts and returns an input Stream
    `ODataEntry` | `readEntry(EdmEntitySet entitySet, EntityStream content)` Returns an ODataEntry
    `ODataErrorContext` | `readErrorDocument(InputStream errorDocument)` Read (de-serialize) data from error document as `InputStream` and provide according `ODataErrorContext`.
    `ODataFeed` | `readFeed(EdmEntitySet entitySet, EntityStream content)` Returns an ODataFeed
    `Object` | `readFunctionImport(EdmFunctionImport functionImport, EntityStream content)` Returns an object
    `ODataResponse` | `writeBatchResponse(List<BatchResponsePart> batchResponseParts)` Returns an ODataResponse
    `ODataResponse` | `writeEntry(EdmEntitySet entitySet, Entity data)` Returns an OData Response for a given entry
    `ODataResponse` | `writeFeed(EdmEntitySet entitySet, EntityCollection data)` Returns an OData Response for a given feed

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AtomSerializerDeserializer

          public AtomSerializerDeserializer()
                                     throws EntityProviderException

      Throws:
        `EntityProviderException`

    - #### AtomSerializerDeserializer

          public AtomSerializerDeserializer(org.apache.olingo.odata2.core.commons.ContentType.ODataFormat odataFormat)
                                     throws EntityProviderException

      Parameters:
        `odataFormat` -
      Throws:
        `EntityProviderException`

  - ### Method Detail

    - #### writeEntry

          public ODataResponse writeEntry(EdmEntitySet entitySet,
                                          Entity data)
                                   throws EntityProviderException

      Description copied from interface: `ContentTypeBasedSerializer`
      Returns an OData Response for a given entry
      Specified by:
        `writeEntry` in interface `ContentTypeBasedSerializer`
      Returns:
        ODataResponse
      Throws:
        `EntityProviderException`

    - #### readFeed

          public ODataFeed readFeed(EdmEntitySet entitySet,
                                    EntityStream content)
                             throws EntityProviderException

      Description copied from interface: `ContentTypeBasedDeserializer`
      Returns an ODataFeed
      Specified by:
        `readFeed` in interface `ContentTypeBasedDeserializer`
      Returns:
        ODataFeed
      Throws:
        `EntityProviderException`

    - #### readEntry

          public ODataEntry readEntry(EdmEntitySet entitySet,
                                      EntityStream content)
                               throws EntityProviderException

      Description copied from interface: `ContentTypeBasedDeserializer`
      Returns an ODataEntry
      Specified by:
        `readEntry` in interface `ContentTypeBasedDeserializer`
      Returns:
        ODataEntry
      Throws:
        `EntityProviderException`

    - #### readErrorDocument

          public ODataErrorContext readErrorDocument(InputStream errorDocument)
                                              throws EntityProviderException

      Description copied from interface: `ContentTypeBasedDeserializer`
      Read (de-serialize) data from error document as `InputStream` and provide according `ODataErrorContext`.
      Specified by:
        `readErrorDocument` in interface `ContentTypeBasedDeserializer`
      Parameters:
        `errorDocument` - error document which is read
      Returns:
        read error document
      Throws:
        `EntityProviderException` - if reading of data (de-serialization) fails

    - #### writeFeed

          public ODataResponse writeFeed(EdmEntitySet entitySet,
                                         EntityCollection data)
                                  throws EntityProviderException

      Description copied from interface: `ContentTypeBasedSerializer`
      Returns an OData Response for a given feed
      Specified by:
        `writeFeed` in interface `ContentTypeBasedSerializer`
      Returns:
        ODataResponse
      Throws:
        `EntityProviderException`

    - #### readBatchRequest

          public InputStream readBatchRequest(List<BatchPart> batchParts,
                                              String boundary)

      Description copied from interface: `ContentTypeBasedSerializer`
      Reads Batch Request Parts and returns an input Stream
      Specified by:
        `readBatchRequest` in interface `ContentTypeBasedSerializer`
      Returns:
        InputStream

    - #### writeBatchResponse

          public ODataResponse writeBatchResponse(List<BatchResponsePart> batchResponseParts)
                                           throws BatchException

      Description copied from interface: `ContentTypeBasedDeserializer`
      Returns an ODataResponse
      Specified by:
        `writeBatchResponse` in interface `ContentTypeBasedDeserializer`
      Returns:
        ODataResponse
      Throws:
        `BatchException`

    - #### readFunctionImport

          public Object readFunctionImport(EdmFunctionImport functionImport,
                                           EntityStream content)
                                    throws EntityProviderException

      Description copied from interface: `ContentTypeBasedDeserializer`
      Returns an object
      Specified by:
        `readFunctionImport` in interface `ContentTypeBasedDeserializer`
      Returns:
      Throws:
        `EntityProviderException`

Copyright © 2013-2023 The Apache Software Foundation. All Rights Reserved.