org.apache.olingo.server.api

## Class OData

- java.lang.Object
- - org.apache.olingo.server.api.OData

- Direct Known Subclasses:
    ODataNetty

      public abstract class OData
      extends Object

  Root object for serving factory tasks and support loose coupling of implementation (core) from the API. This is not a singleton (static variables) to avoid issues with synchronization, OSGi, hot deployment and so on. Each thread (request) should keep its own instance.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `OData()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract DebugResponseHelper` | `createDebugResponseHelper(String debugFormat)` Creates a DebugResponseHelper for the given debugFormat.
    `abstract ODataDeserializer` | `createDeserializer(ContentType contentType)` Creates a new deserializer object for reading content in the specified format.
    `abstract ODataDeserializer` | `createDeserializer(ContentType contentType, List<String> versions)` Creates a new deserializer object for reading content in the specified format.
    `abstract ODataDeserializer` | `createDeserializer(ContentType contentType, ServiceMetadata metadata)` Creates a new deserializer object for reading content in the specified format.
    `abstract ODataDeserializer` | `createDeserializer(ContentType contentType, ServiceMetadata metadata, List<String> versions)` Creates a new deserializer object for reading content in the specified format.
    `abstract EdmAssistedSerializer` | `createEdmAssistedSerializer(ContentType contentType)` Creates a new serializer object capable of working without EDM information for rendering content in the specified format.
    `abstract EdmAssistedSerializer` | `createEdmAssistedSerializer(ContentType contentType, List<String> versions)` Creates a new serializer object capable of working without EDM information for rendering content in the specified format.
    `abstract EdmDeltaSerializer` | `createEdmDeltaSerializer(ContentType contentType, List<String> versions)` Creates a new serializer object capable of working without EDM information for rendering delta content in the specified format.
    `abstract ETagHelper` | `createETagHelper()` Creates a new ETag helper object for performing ETag-related tasks.
    `abstract FixedFormatDeserializer` | `createFixedFormatDeserializer()` Creates a new deserializer object for reading content in a fixed format, e.g., for binary input.
    `abstract FixedFormatSerializer` | `createFixedFormatSerializer()` Creates a new serializer object for rendering content in a fixed format, e.g., for binary output or multipart/mixed outpu.
    `abstract ODataHttpHandler` | `createHandler(ServiceMetadata serviceMetadata)` Creates a new ODataHttpHandler for handling OData requests in an HTTP context.
    `abstract Preferences` | `createPreferences(Collection<String> preferHeaders)` Creates a new Preferences object out of Prefer HTTP request headers.
    `abstract EdmPrimitiveType` | `createPrimitiveTypeInstance(EdmPrimitiveTypeKind kind)` Creates a primitive-type instance.
    `abstract ODataHandler` | `createRawHandler(ServiceMetadata serviceMetadata)` Creates a new ODataHandler for handling OData requests.
    `abstract ODataSerializer` | `createSerializer(ContentType contentType)` Creates a new serializer object for rendering content in the specified format.
    `abstract ODataSerializer` | `createSerializer(ContentType contentType, List<String> versions)` Creates a new serializer object for rendering content in the specified format.
    `abstract ServiceMetadata` | `createServiceMetadata(CsdlEdmProvider edmProvider, List<EdmxReference> references)` Creates a metadata object for this service.
    `abstract ServiceMetadata` | `createServiceMetadata(CsdlEdmProvider edmProvider, List<EdmxReference> references, ServiceMetadataETagSupport serviceMetadataETagSupport)` Creates a metadata object for this service.
    `abstract UriHelper` | `createUriHelper()` Creates a new URI helper object for performing URI-related tasks.
    `static OData` | `newInstance()` Use this method to create a new OData instance.

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

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

- - ### Constructor Detail

    - #### OData

          public OData()

  - ### Method Detail

    - #### newInstance

          public static OData newInstance()

      Use this method to create a new OData instance. Each thread/request should keep its own instance.
      Returns:
        a new OData instance

    - #### createSerializer

          public abstract ODataSerializer createSerializer(ContentType contentType)
                                                    throws SerializerException

      Creates a new serializer object for rendering content in the specified format. Serializers are used in Processor implementations.
      Parameters:
        `contentType` - any format supported by Olingo (XML, JSON ...)
      Throws:
        `SerializerException`

    - #### createSerializer

          public abstract ODataSerializer createSerializer(ContentType contentType,
                                                           List<String> versions)
                                                    throws SerializerException

      Creates a new serializer object for rendering content in the specified format. Serializers are used in Processor implementations.
      Parameters:
        `contentType` - any format supported by Olingo (XML, JSON ...)
        `versions` - any v4 version supported by Olingo (4.0, 4.01 ...)
      Throws:
        `SerializerException`

    - #### createFixedFormatSerializer

          public abstract FixedFormatSerializer createFixedFormatSerializer()

      Creates a new serializer object for rendering content in a fixed format, e.g., for binary output or multipart/mixed outpu. Serializers are used in Processor implementations.

    - #### createFixedFormatDeserializer

          public abstract FixedFormatDeserializer createFixedFormatDeserializer()

      Creates a new deserializer object for reading content in a fixed format, e.g., for binary input. Deserializers are used in Processor implementations.

    - #### createHandler

          public abstract ODataHttpHandler createHandler(ServiceMetadata serviceMetadata)

      Creates a new ODataHttpHandler for handling OData requests in an HTTP context.
      Parameters:
        `serviceMetadata` - - metadata object required to handle an OData request

    - #### createRawHandler

          public abstract ODataHandler createRawHandler(ServiceMetadata serviceMetadata)

      Creates a new ODataHandler for handling OData requests.
      Parameters:
        `serviceMetadata` - - metadata object required to handle an OData request

    - #### createServiceMetadata

          public abstract ServiceMetadata createServiceMetadata(CsdlEdmProvider edmProvider,
                                                                List<EdmxReference> references)

      Creates a metadata object for this service.
      Parameters:
        `edmProvider` - a custom or default implementation for creating metadata
        `references` - list of edmx references
      Returns:
        a service metadata implementation

    - #### createServiceMetadata

          public abstract ServiceMetadata createServiceMetadata(CsdlEdmProvider edmProvider,
                                                                List<EdmxReference> references,
                                                                ServiceMetadataETagSupport serviceMetadataETagSupport)

      Creates a metadata object for this service.
      Parameters:
        `edmProvider` - a custom or default implementation for creating metadata
        `references` - list of edmx references
        `serviceMetadataETagSupport` -
      Returns:
        a service metadata implementation

    - #### createUriHelper

          public abstract UriHelper createUriHelper()

      Creates a new URI helper object for performing URI-related tasks. It can be used in Processor implementations.

    - #### createDeserializer

          public abstract ODataDeserializer createDeserializer(ContentType contentType)
                                                        throws DeserializerException

      Creates a new deserializer object for reading content in the specified format. Deserializers are used in Processor implementations.
      Parameters:
        `contentType` - any content type supported by Olingo (XML, JSON ...)
      Throws:
        `DeserializerException`

    - #### createDeserializer

          public abstract ODataDeserializer createDeserializer(ContentType contentType,
                                                               ServiceMetadata metadata)
                                                        throws DeserializerException

      Creates a new deserializer object for reading content in the specified format. Deserializers are used in Processor implementations.
      Parameters:
        `contentType` - any content type supported by Olingo (XML, JSON ...)
        `metadata` - ServiceMetada of the service
      Throws:
        `DeserializerException`

    - #### createDeserializer

          public abstract ODataDeserializer createDeserializer(ContentType contentType,
                                                               List<String> versions)
                                                        throws DeserializerException

      Creates a new deserializer object for reading content in the specified format. Deserializers are used in Processor implementations.
      Parameters:
        `contentType` - any content type supported by Olingo (XML, JSON ...)
        `service` - version
      Throws:
        `DeserializerException`

    - #### createDeserializer

          public abstract ODataDeserializer createDeserializer(ContentType contentType,
                                                               ServiceMetadata metadata,
                                                               List<String> versions)
                                                        throws DeserializerException

      Creates a new deserializer object for reading content in the specified format. Deserializers are used in Processor implementations.
      Parameters:
        `contentType` - any content type supported by Olingo (XML, JSON ...)
        `metadata` - ServiceMetada of the service
        `service` - version
      Throws:
        `DeserializerException`

    - #### createPrimitiveTypeInstance

          public abstract EdmPrimitiveType createPrimitiveTypeInstance(EdmPrimitiveTypeKind kind)

      Creates a primitive-type instance.
      Parameters:
        `kind` - the kind of the primitive type
      Returns:
        an `EdmPrimitiveType` instance for the type kind

    - #### createETagHelper

          public abstract ETagHelper createETagHelper()

      Creates a new ETag helper object for performing ETag-related tasks. It can be used in Processor implementations.

    - #### createPreferences

          public abstract Preferences createPreferences(Collection<String> preferHeaders)

      Creates a new Preferences object out of Prefer HTTP request headers. It can be used in Processor implementations.

    - #### createDebugResponseHelper

          public abstract DebugResponseHelper createDebugResponseHelper(String debugFormat)

      Creates a DebugResponseHelper for the given debugFormat. If the format is not supported no exception is thrown. Instead we give back the implementation for the JSON format.
      Parameters:
        `debugFormat` - format to be used
      Returns:
        a debug-response helper

    - #### createEdmAssistedSerializer

          public abstract EdmAssistedSerializer createEdmAssistedSerializer(ContentType contentType)
                                                                     throws SerializerException

      Creates a new serializer object capable of working without EDM information for rendering content in the specified format.
      Parameters:
        `contentType` - a content type supported by Olingo
      Throws:
        `SerializerException`

    - #### createEdmAssistedSerializer

          public abstract EdmAssistedSerializer createEdmAssistedSerializer(ContentType contentType,
                                                                            List<String> versions)
                                                                     throws SerializerException

      Creates a new serializer object capable of working without EDM information for rendering content in the specified format.
      Parameters:
        `contentType` - a content type supported by Olingo
        `versions` - Odata Version v4 or v4.01
      Throws:
        `SerializerException`

    - #### createEdmDeltaSerializer

          public abstract EdmDeltaSerializer createEdmDeltaSerializer(ContentType contentType,
                                                                      List<String> versions)
                                                               throws SerializerException

      Creates a new serializer object capable of working without EDM information for rendering delta content in the specified format.
      Parameters:
        `contentType` - a content type supported by Olingo
        `version` - versions supported by Olingo
      Throws:
        `SerializerException`

Copyright © 2013–2020 The Apache Software Foundation. All rights reserved.