org.apache.olingo.odata2.client.api

## Class ODataClient

- java.lang.Object
- - org.apache.olingo.odata2.client.api.ODataClient

- Direct Known Subclasses:
    ODataClientImpl

      public abstract class ODataClient
      extends Object

  This class provides an instance of odata Client

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ODataClient()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract ContentTypeBasedDeserializer` | `createDeserializer(String contentType)` Creates a new deserializer object for reading content in the specified format.
    `abstract ContentTypeBasedSerializer` | `createSerializer(String contentType)` Creates a new serializer object for rendering content in the specified format.
    `abstract EdmURIBuilder` | `edmUriBuilder(String serviceRoot)` Constructs the edm uri based on segments appended
    `static ODataClient` | `newInstance()` Use this method to create a new OData instance.
    `abstract UriInfo` | `parseUri(Edm edm, List<PathSegment> pathSegments, Map<String,List<String>> queryParameters)` Parses the uri and returns UriInfo
    `abstract UriInfo` | `parseUri(Edm edm, String uri)` Parses the uri and returns UriInfo
    `abstract EdmDataServices` | `readMetadata(InputStream content, boolean validate)` Reads the metadata file and validates it if validate parameter is set to true
    `abstract URIBuilder` | `uriBuilder(String serviceRoot)` Constructs the uri based on segments appended

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

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

- - ### Constructor Detail

    - #### ODataClient

          public ODataClient()

  - ### Method Detail

    - #### newInstance

          public static ODataClient 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 ContentTypeBasedSerializer createSerializer(String contentType)
                                                               throws EntityProviderException

      Creates a new serializer object for rendering content in the specified format.
      Parameters:
        `contentType` - any format supported by Olingo (XML, JSON ...)
      Returns:
        ContentTypeBasedSerializer
      Throws:
        `EntityProviderException`

    - #### createDeserializer

          public abstract ContentTypeBasedDeserializer createDeserializer(String contentType)
                                                                   throws EntityProviderException

      Creates a new deserializer object for reading content in the specified format.
      Parameters:
        `contentType` - any content type supported by Olingo (XML, JSON ...)
      Returns:
        ContentTypeBasedDeserializer
      Throws:
        `EntityProviderException`

    - #### readMetadata

          public abstract EdmDataServices readMetadata(InputStream content,
                                                       boolean validate)
                                                throws EntityProviderException,
                                                       EdmException

      Reads the metadata file and validates it if validate parameter is set to true
      Parameters:
        `content` - inputStream
        `validate` -
      Returns:
        EdmDataServices
      Throws:
        `EntityProviderException`
        `EdmException`

    - #### parseUri

          public abstract UriInfo parseUri(Edm edm,
                                           List<PathSegment> pathSegments,
                                           Map<String,List<String>> queryParameters)
                                    throws UriSyntaxException,
                                           UriNotMatchingException,
                                           EdmException

      Parses the uri and returns UriInfo
      Parameters:
        `edm` -
        `pathSegments` -
        `queryParameters` -
      Returns:
        UriInfo
      Throws:
        `EntityProviderException`
        `EdmException`
        `UriSyntaxException`
        `UriNotMatchingException`

    - #### parseUri

          public abstract UriInfo parseUri(Edm edm,
                                           String uri)
                                    throws UriSyntaxException,
                                           UriNotMatchingException,
                                           EdmException

      Parses the uri and returns UriInfo
      Parameters:
        `edm` -
        `uri` -
      Returns:
        UriInfo
      Throws:
        `UriSyntaxException`
        `UriNotMatchingException`
        `EdmException`

    - #### edmUriBuilder

          public abstract EdmURIBuilder edmUriBuilder(String serviceRoot)

      Constructs the edm uri based on segments appended
      Parameters:
        `serviceRoot` -
      Returns:
        EdmURIBuilder

    - #### uriBuilder

          public abstract URIBuilder uriBuilder(String serviceRoot)

      Constructs the uri based on segments appended
      Parameters:
        `serviceRoot` -
      Returns:
        URIBuilder

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