org.apache.olingo.odata2.client.core.uri

## Class EdmURIBuilderImpl

- java.lang.Object
- - org.apache.olingo.odata2.client.core.uri.EdmURIBuilderImpl

- All Implemented Interfaces:
    EdmURIBuilder

      public class EdmURIBuilderImpl
      extends Object
      implements EdmURIBuilder

  This is a builder class that constructs URI with edm validations

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Map<String,String>` | `customQueryOptions` Insertion-order map of custom query options.
    `protected Map<String,Object>` | `functionImportParameters` Insertion-order map of function import parameters.
    `protected Map<String,String>` | `queryOptions` Insertion-order map of query options.
    `protected List<Segment>` | `segments`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EdmURIBuilderImpl(String serviceRoot)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `EdmURIBuilder` | `addCustomQueryOption(String paramName, Object paramValue)` Adds custom query option
    `EdmURIBuilder` | `addQueryOption(QueryOption option, String value)` Adds the specified query option to the URI.
    `EdmURIBuilder` | `addQueryOption(String option, String value, boolean replace)`
    `EdmURIBuilder` | `appendCountSegment()` Appends count segment to the URI.
    `EdmURIBuilder` | `appendEntitySetSegment(EdmEntitySet entitySet)` Appends EntitySet segment to the URI.
    `EdmURIBuilder` | `appendFunctionImportParameters(Map<EdmParameter,Object> functionImportParams)` Appends function import parameters
    `EdmURIBuilder` | `appendFunctionImportSegment(EdmFunctionImport functionImport)` Appends Function import to the uri
    `EdmURIBuilder` | `appendKeySegment(EdmProperty property, Object value)` Appends key segment to the URI.
    `EdmURIBuilder` | `appendKeySegment(Map<EdmProperty,Object> segmentValues)` Appends key segment to the URI, for multiple keys.
    `EdmURIBuilder` | `appendMetadataSegment()` Appends metadata segment to the URI.
    `EdmURIBuilder` | `appendNavigationSegment(EdmNavigationProperty property)` Appends navigation segment to the URI.
    `EdmURIBuilder` | `appendPropertySegment(EdmProperty property, String segmentValue)` Appends property segment to the URI.
    `EdmURIBuilder` | `appendValueSegment()` Appends value segment to the URI.
    `URI` | `build()` Build OData URI.
    `protected String` | `buildMultiKeySegment(Map<EdmProperty,Object> segmentValues, char separator)`
    `EdmURIBuilder` | `expand(String... expandItems)` Adds expand query option.
    `EdmURIBuilder` | `filter(String filter)` Adds filter query option.
    `EdmURIBuilder` | `format(String format)` Adds format query option.
    `EdmURIBuilder` | `orderBy(String property)` Adds orderby query option.
    `EdmURIBuilder` | `replaceQueryOption(QueryOption option, String value)`
    `EdmURIBuilder` | `select(String... selectItems)` Adds select query option.
    `EdmURIBuilder` | `skip(int skip)` Adds skip query option.
    `EdmURIBuilder` | `top(int top)` Adds top query option.

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

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

- - ### Field Detail

    - #### segments

          protected final List<Segment> segments

    - #### queryOptions

          protected final Map<String,String> queryOptions

      Insertion-order map of query options.

    - #### customQueryOptions

          protected final Map<String,String> customQueryOptions

      Insertion-order map of custom query options.

    - #### functionImportParameters

          protected final Map<String,Object> functionImportParameters

      Insertion-order map of function import parameters.

  - ### Constructor Detail

    - #### EdmURIBuilderImpl

          public EdmURIBuilderImpl(String serviceRoot)

      Constructor.
      Parameters:
        `serviceRoot` - absolute URL (schema, host and port included) representing the location of the root of the data service.

  - ### Method Detail

    - #### appendCountSegment

          public EdmURIBuilder appendCountSegment()

      Description copied from interface: `EdmURIBuilder`
      Appends count segment to the URI.
      Specified by:
        `appendCountSegment` in interface `EdmURIBuilder`
      Returns:
        current EdmURIBuilder instance

    - #### appendValueSegment

          public EdmURIBuilder appendValueSegment()

      Description copied from interface: `EdmURIBuilder`
      Appends value segment to the URI.
      Specified by:
        `appendValueSegment` in interface `EdmURIBuilder`
      Returns:
        current EdmURIBuilder instance

    - #### appendMetadataSegment

          public EdmURIBuilder appendMetadataSegment()

      Description copied from interface: `EdmURIBuilder`
      Appends metadata segment to the URI.
      Specified by:
        `appendMetadataSegment` in interface `EdmURIBuilder`
      Returns:
        current EdmURIBuilder instance

    - #### format

          public EdmURIBuilder format(String format)

      Description copied from interface: `EdmURIBuilder`
      Adds format query option.
      Specified by:
        `format` in interface `EdmURIBuilder`
      Parameters:
        `format` - media type acceptable in a response.
      Returns:
        current EdmURIBuilder instance
      See Also:
        `QueryOption.FORMAT`

    - #### appendEntitySetSegment

          public EdmURIBuilder appendEntitySetSegment(EdmEntitySet entitySet)

      Description copied from interface: `EdmURIBuilder`
      Appends EntitySet segment to the URI.
      Specified by:
        `appendEntitySetSegment` in interface `EdmURIBuilder`
      Parameters:
        `entitySet` - Edm entity set.
      Returns:
        current EdmURIBuilder instance

    - #### appendNavigationSegment

          public EdmURIBuilder appendNavigationSegment(EdmNavigationProperty property)

      Description copied from interface: `EdmURIBuilder`
      Appends navigation segment to the URI.
      Specified by:
        `appendNavigationSegment` in interface `EdmURIBuilder`
      Parameters:
        `property` - navigation property.
      Returns:
        current EdmURIBuilder instance

    - #### appendKeySegment

          public EdmURIBuilder appendKeySegment(EdmProperty property,
                                                Object value)

      Description copied from interface: `EdmURIBuilder`
      Appends key segment to the URI.
      Specified by:
        `appendKeySegment` in interface `EdmURIBuilder`
      Parameters:
        `property` - edm property
        `value` - key value
      Returns:
        current EdmURIBuilder instance

    - #### appendKeySegment

          public EdmURIBuilder appendKeySegment(Map<EdmProperty,Object> segmentValues)

      Description copied from interface: `EdmURIBuilder`
      Appends key segment to the URI, for multiple keys.
      Specified by:
        `appendKeySegment` in interface `EdmURIBuilder`
      Parameters:
        `segmentValues` - segment values.
      Returns:
        current EdmURIBuilder instance

    - #### buildMultiKeySegment

          protected String buildMultiKeySegment(Map<EdmProperty,Object> segmentValues,
                                                char separator)
                                         throws EdmException

      Throws:
        `EdmException`

    - #### filter

          public EdmURIBuilder filter(String filter)

      Description copied from interface: `EdmURIBuilder`
      Adds filter query option.
      Specified by:
        `filter` in interface `EdmURIBuilder`
      Parameters:
        `filter` - filter string.
      Returns:
        current EdmURIBuilder instance
      See Also:
        `QueryOption.FILTER`

    - #### select

          public EdmURIBuilder select(String... selectItems)

      Description copied from interface: `EdmURIBuilder`
      Adds select query option.
      Specified by:
        `select` in interface `EdmURIBuilder`
      Parameters:
        `selectItems` - select items
      Returns:
        current EdmURIBuilder instance
      See Also:
        `QueryOption.SELECT`

    - #### orderBy

          public EdmURIBuilder orderBy(String property)

      Description copied from interface: `EdmURIBuilder`
      Adds orderby query option.
      Specified by:
        `orderBy` in interface `EdmURIBuilder`
      Parameters:
        `property` - property string.
      Returns:
        current EdmURIBuilder instance
      See Also:
        `QueryOption.ORDERBY`

    - #### top

          public EdmURIBuilder top(int top)

      Description copied from interface: `EdmURIBuilder`
      Adds top query option.
      Specified by:
        `top` in interface `EdmURIBuilder`
      Parameters:
        `top` - maximum number of entities to be returned.
      Returns:
        current EdmURIBuilder instance
      See Also:
        `QueryOption.TOP`

    - #### skip

          public EdmURIBuilder skip(int skip)

      Description copied from interface: `EdmURIBuilder`
      Adds skip query option.
      Specified by:
        `skip` in interface `EdmURIBuilder`
      Parameters:
        `skip` - number of entities to be skipped into the response.
      Returns:
        current EdmURIBuilder instance
      See Also:
        `QueryOption.SKIP`

    - #### build

          public URI build()

      Description copied from interface: `EdmURIBuilder`
      Build OData URI.
      Specified by:
        `build` in interface `EdmURIBuilder`
      Returns:
        OData URI.

    - #### addQueryOption

          public EdmURIBuilder addQueryOption(QueryOption option,
                                              String value)

      Description copied from interface: `EdmURIBuilder`
      Adds the specified query option to the URI.
      Concatenates value if the specified query option already exists.
      Specified by:
        `addQueryOption` in interface `EdmURIBuilder`
      Parameters:
        `option` - query option.
        `value` - query option value.
      Returns:
        current EdmURIBuilder instance

    - #### replaceQueryOption

          public EdmURIBuilder replaceQueryOption(QueryOption option,
                                                  String value)

    - #### addQueryOption

          public EdmURIBuilder addQueryOption(String option,
                                              String value,
                                              boolean replace)

    - #### appendPropertySegment

          public EdmURIBuilder appendPropertySegment(EdmProperty property,
                                                     String segmentValue)

      Description copied from interface: `EdmURIBuilder`
      Appends property segment to the URI.
      Specified by:
        `appendPropertySegment` in interface `EdmURIBuilder`
      Parameters:
        `property` - edmProperty
        `segmentValue` - segment value.
      Returns:
        current EdmURIBuilder instance

    - #### expand

          public EdmURIBuilder expand(String... expandItems)

      Description copied from interface: `EdmURIBuilder`
      Adds expand query option.
      Specified by:
        `expand` in interface `EdmURIBuilder`
      Parameters:
        `expandItems` - items to be expanded in-line
      Returns:
        current EdmURIBuilder instance
      See Also:
        `QueryOption.EXPAND`

    - #### addCustomQueryOption

          public EdmURIBuilder addCustomQueryOption(String paramName,
                                                    Object paramValue)

      Description copied from interface: `EdmURIBuilder`
      Adds custom query option
      Specified by:
        `addCustomQueryOption` in interface `EdmURIBuilder`
      Parameters:
        `paramName` - parameter name
        `paramValue` - parameter value
      Returns:
        current EdmURIBuilder instance

    - #### appendFunctionImportSegment

          public EdmURIBuilder appendFunctionImportSegment(EdmFunctionImport functionImport)

      Description copied from interface: `EdmURIBuilder`
      Appends Function import to the uri
      Specified by:
        `appendFunctionImportSegment` in interface `EdmURIBuilder`
      Returns:
        current EdmURIBuilder instance

    - #### appendFunctionImportParameters

          public EdmURIBuilder appendFunctionImportParameters(Map<EdmParameter,Object> functionImportParams)

      Description copied from interface: `EdmURIBuilder`
      Appends function import parameters
      Specified by:
        `appendFunctionImportParameters` in interface `EdmURIBuilder`
      Returns:
        current EdmURIBuilder instance

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