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

## Class URIBuilderImpl

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

- All Implemented Interfaces:
    URIBuilder

      public class URIBuilderImpl
      extends Object
      implements URIBuilder

  This is a builder class that constructs URI without 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
    `URIBuilderImpl(String serviceRoot)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `URIBuilder` | `addCustomQueryOption(String paramName, Object paramValue)` Adds custom query option
    `URIBuilder` | `addQueryOption(QueryOption option, String value)` Adds the specified query option to the URI.
    `URIBuilder` | `appendCountSegment()` Appends count segment to the URI.
    `URIBuilder` | `appendEntitySetSegment(String entitySet)` Appends EntitySet segment to the URI.
    `URIBuilder` | `appendFunctionImportParameters(Map<String,Object> functionImportParams)` Appends function import parameters to the uri
    `URIBuilder` | `appendFunctionImportSegment(String functionImport)` Appends function import to the uri
    `URIBuilder` | `appendKeySegment(Map<String,Object> segmentValues)` Appends key segment to the URI, for multiple keys.
    `URIBuilder` | `appendKeySegment(Object value)` Appends key segment to the URI.
    `URIBuilder` | `appendMetadataSegment()` Appends metadata segment to the URI.
    `URIBuilder` | `appendNavigationSegment(String navigationProperty)` Appends navigation segment to the URI.
    `URIBuilder` | `appendPropertySegment(String segmentValue)` Appends property segment to the URI.
    `URIBuilder` | `appendValueSegment()` Appends value segment to the URI.
    `URI` | `build()` Build OData URI.
    `URIBuilder` | `expand(String... expandItems)` Adds expand query option.
    `URIBuilder` | `filter(String filter)` Adds filter query option.
    `URIBuilder` | `format(String format)` Adds format query option.
    `URIBuilder` | `orderBy(String order)` Adds orderby query option.
    `URIBuilder` | `replaceQueryOption(QueryOption option, String value)`
    `URIBuilder` | `select(String... selectItems)` Adds select query option.
    `URIBuilder` | `skip(int skip)` Adds skip query option.
    `URIBuilder` | `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

    - #### URIBuilderImpl

          public URIBuilderImpl(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 URIBuilder appendCountSegment()

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

    - #### appendMetadataSegment

          public URIBuilder appendMetadataSegment()

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

    - #### format

          public URIBuilder format(String format)

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

    - #### appendValueSegment

          public URIBuilder appendValueSegment()

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

    - #### addQueryOption

          public URIBuilder addQueryOption(QueryOption option,
                                           String value)

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

    - #### filter

          public URIBuilder filter(String filter)

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

    - #### top

          public URIBuilder top(int top)

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

    - #### skip

          public URIBuilder skip(int skip)

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

    - #### addCustomQueryOption

          public URIBuilder addCustomQueryOption(String paramName,
                                                 Object paramValue)

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

    - #### build

          public URI build()

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

    - #### appendEntitySetSegment

          public URIBuilder appendEntitySetSegment(String entitySet)

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

    - #### appendNavigationSegment

          public URIBuilder appendNavigationSegment(String navigationProperty)

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

    - #### appendKeySegment

          public URIBuilder appendKeySegment(Object value)

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

    - #### appendKeySegment

          public URIBuilder appendKeySegment(Map<String,Object> segmentValues)

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

    - #### appendPropertySegment

          public URIBuilder appendPropertySegment(String segmentValue)

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

    - #### expand

          public URIBuilder expand(String... expandItems)

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

    - #### select

          public URIBuilder select(String... selectItems)

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

    - #### orderBy

          public URIBuilder orderBy(String order)

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

    - #### replaceQueryOption

          public URIBuilder replaceQueryOption(QueryOption option,
                                               String value)

      Parameters:
        `option` -
        `value` -
      Returns:
        URIBuilder

    - #### appendFunctionImportSegment

          public URIBuilder appendFunctionImportSegment(String functionImport)

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

    - #### appendFunctionImportParameters

          public URIBuilder appendFunctionImportParameters(Map<String,Object> functionImportParams)

      Description copied from interface: `URIBuilder`
      Appends function import parameters to the uri
      Specified by:
        `appendFunctionImportParameters` in interface `URIBuilder`
      Returns:
        current URIBuilder instance

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