Class URIBuilderImpl
java.lang.Object
org.apache.olingo.client.core.uri.URIBuilderImpl
- All Implemented Interfaces:
URIBuilder
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionInsertion-order map of custom query options.protected static final org.slf4j.LoggerLogger.Insertion-order map of parameter aliases.Insertion-order map of query options.protected final List<URIBuilderImpl.Segment> -
Constructor Summary
ConstructorsConstructorDescriptionURIBuilderImpl(Configuration configuration, String serviceRoot) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionaddCustomQueryOption(String customName, String customValue) Adds/Replaces the specified custom query option to the URI.addParameterAlias(String alias, String exp) Adds the specified (custom) parameter alias to the URI.addQueryOption(String option, String value, boolean replace) Adds/Replaces the specified (custom) query option to the URI.addQueryOption(QueryOption option, String value) Adds the specified query option to the URI.appendActionCallSegment(String action) Appends action segment to the URI.Appends all segment to the URI.Appends batch segment to the URI.Appends count segment to the URI.appendCrossjoinSegment(String... segmentValues) Appends cross join segment to the URI.appendDerivedEntityTypeSegment(String segmentValue) Appends derived entity type segment to the URI.appendEntityIdSegment(String segmentValue) Appends entity-id segment to the URI.appendEntitySetSegment(String segmentValue) Appends EntitySet segment to the URI.appendKeySegment(Object val) Appends key segment to the URI.appendKeySegment(Map<String, Object> segmentValues) Appends key segment to the URI, for multiple keys.appendKeySegment(Map<String, org.apache.commons.lang3.tuple.Pair<EdmEnumType, String>> enumValues, Map<String, Object> segmentValues) Appends key segment to the URI, for multiple keys.appendKeySegment(EdmEnumType enumType, String memberName) Appends enum key segment to the URI.Appends metadata segment to the URI.appendNavigationSegment(String segmentValue) Appends navigation segment to the URI.appendOperationCallSegment(String operation) Appends operation (action or function) segment to the URI.appendPropertySegment(String segmentValue) Appends property segment to the URI.Appends ref segment to the URI.appendSingletonSegment(String segmentValue) Appends Singleton segment to the URI.Appends value segment to the URI.build()Build OData URI.protected StringbuildMultiKeySegment(Map<String, Object> segmentValues, boolean escape, char sperator) count()Adds count query option.count(boolean value) Appends count query option.Adds expand query option.expandWithOptions(String expandItem, boolean pathRef, boolean pathCount, Map<QueryOption, Object> options) The set of expanded entities can be refined through the application of expand options, expressed as a semicolon-separated list of system query options, enclosed in parentheses, see [OData-URL].expandWithOptions(String expandItem, Map<QueryOption, Object> options) The set of expanded entities can be refined through the application of expand options, expressed as a semicolon-separated list of system query options, enclosed in parentheses, see [OData-URL].expandWithSelect(String expandItem, String... selectItems) Properties of related entities can be specified by including the $select query option within the $expand.Adds filter query option.Adds filter for filter query option.Adds format query option.protected charprotected StringAdds id query option.protected StringAdds orderby query option.replaceQueryOption(QueryOption option, String value) Adds/replaces the specified query option to the URI.Appends search query option.Appends search query option.Adds select query option.skip(int skip) Adds skip query option.Adds skiptoken query option.top(int top) Adds top query option.toString()
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOGLogger. -
segments
-
queryOptions
Insertion-order map of query options. -
customQueryOptions
Insertion-order map of custom query options. -
parameters
Insertion-order map of parameter aliases.
-
-
Constructor Details
-
URIBuilderImpl
Constructor.- Parameters:
serviceRoot- absolute URL (schema, host and port included) representing the location of the root of the data service.
-
-
Method Details
-
addQueryOption
Description copied from interface:URIBuilderAdds the specified query option to the URI.
Concatenates value if the specified query option already exists.- Specified by:
addQueryOptionin interfaceURIBuilder- Parameters:
option- query option.value- query option value.- Returns:
- current URIBuilder instance
-
replaceQueryOption
Description copied from interface:URIBuilderAdds/replaces the specified query option to the URI.- Specified by:
replaceQueryOptionin interfaceURIBuilder- Parameters:
option- query option.value- query option value.- Returns:
- current URIBuilder instance
-
addQueryOption
Description copied from interface:URIBuilderAdds/Replaces the specified (custom) query option to the URI.- Specified by:
addQueryOptionin interfaceURIBuilder- Parameters:
option- query option.value- query option value.replace- if true then replace existing one.- Returns:
- current URIBuilder instance.
-
addParameterAlias
Description copied from interface:URIBuilderAdds the specified (custom) parameter alias to the URI.- Specified by:
addParameterAliasin interfaceURIBuilder- Parameters:
alias- parameter alias.exp- expression value.- Returns:
- current URIBuilder instance.
-
appendEntitySetSegment
Description copied from interface:URIBuilderAppends EntitySet segment to the URI.- Specified by:
appendEntitySetSegmentin interfaceURIBuilder- Parameters:
segmentValue- segment value.- Returns:
- current URIBuilder instance
-
appendKeySegment
Description copied from interface:URIBuilderAppends key segment to the URI.- Specified by:
appendKeySegmentin interfaceURIBuilder- Parameters:
val- segment value.- Returns:
- current URIBuilder instance
-
appendKeySegment
Description copied from interface:URIBuilderAppends key segment to the URI, for multiple keys.- Specified by:
appendKeySegmentin interfaceURIBuilder- Parameters:
segmentValues- segment values.- Returns:
- current URIBuilder instance
-
appendPropertySegment
Description copied from interface:URIBuilderAppends property segment to the URI.- Specified by:
appendPropertySegmentin interfaceURIBuilder- Parameters:
segmentValue- segment value.- Returns:
- current URIBuilder instance
-
appendDerivedEntityTypeSegment
Description copied from interface:URIBuilderAppends derived entity type segment to the URI.- Specified by:
appendDerivedEntityTypeSegmentin interfaceURIBuilder- Parameters:
segmentValue- segment value.- Returns:
- current URIBuilder instance
-
appendValueSegment
Description copied from interface:URIBuilderAppends value segment to the URI.- Specified by:
appendValueSegmentin interfaceURIBuilder- Returns:
- current URIBuilder instance
-
appendCountSegment
Description copied from interface:URIBuilderAppends count segment to the URI.- Specified by:
appendCountSegmentin interfaceURIBuilder- Returns:
- current URIBuilder instance
-
appendActionCallSegment
Description copied from interface:URIBuilderAppends action segment to the URI.- Specified by:
appendActionCallSegmentin interfaceURIBuilder- Parameters:
action- Action name- Returns:
- current URIBuilder instance
-
appendOperationCallSegment
Description copied from interface:URIBuilderAppends operation (action or function) segment to the URI.- Specified by:
appendOperationCallSegmentin interfaceURIBuilder- Parameters:
operation- Operation (action or function) name- Returns:
- current URIBuilder instance
-
appendMetadataSegment
Description copied from interface:URIBuilderAppends metadata segment to the URI.- Specified by:
appendMetadataSegmentin interfaceURIBuilder- Returns:
- current URIBuilder instance
-
appendBatchSegment
Description copied from interface:URIBuilderAppends batch segment to the URI.- Specified by:
appendBatchSegmentin interfaceURIBuilder- Returns:
- current URIBuilder instance
-
count
Description copied from interface:URIBuilderAdds count query option.- Specified by:
countin interfaceURIBuilder- Returns:
- current URIBuilder instance
-
expand
Description copied from interface:URIBuilderAdds expand query option.- Specified by:
expandin interfaceURIBuilder- Parameters:
expandItems- items to be expanded in-line- Returns:
- current URIBuilder instance
- See Also:
-
format
Description copied from interface:URIBuilderAdds format query option.- Specified by:
formatin interfaceURIBuilder- Parameters:
format- media type acceptable in a response.- Returns:
- current URIBuilder instance
- See Also:
-
filter
Description copied from interface:URIBuilderAdds filter for filter query option.- Specified by:
filterin interfaceURIBuilder- Parameters:
filter- filter instance (to be obtained via FilterFactory); note that build() method will be immediately invoked.- Returns:
- current URIBuilder instance
- See Also:
-
filter
Description copied from interface:URIBuilderAdds filter query option.- Specified by:
filterin interfaceURIBuilder- Parameters:
filter- filter string.- Returns:
- current URIBuilder instance
- See Also:
-
select
Description copied from interface:URIBuilderAdds select query option.- Specified by:
selectin interfaceURIBuilder- Parameters:
selectItems- select items- Returns:
- current URIBuilder instance
- See Also:
-
orderBy
Description copied from interface:URIBuilderAdds orderby query option.- Specified by:
orderByin interfaceURIBuilder- Parameters:
order- order string.- Returns:
- current URIBuilder instance
- See Also:
-
top
Description copied from interface:URIBuilderAdds top query option.- Specified by:
topin interfaceURIBuilder- Parameters:
top- maximum number of entities to be returned.- Returns:
- current URIBuilder instance
- See Also:
-
skip
Description copied from interface:URIBuilderAdds skip query option.- Specified by:
skipin interfaceURIBuilder- Parameters:
skip- number of entities to be skipped into the response.- Returns:
- current URIBuilder instance
- See Also:
-
skipToken
Description copied from interface:URIBuilderAdds skiptoken query option.- Specified by:
skipTokenin interfaceURIBuilder- Parameters:
skipToken- opaque token.- Returns:
- current URIBuilder instance
- See Also:
-
build
Description copied from interface:URIBuilderBuild OData URI.- Specified by:
buildin interfaceURIBuilder- Returns:
- OData URI.
-
toString
-
buildMultiKeySegment
-
appendKeySegment
Description copied from interface:URIBuilderAppends enum key segment to the URI.- Specified by:
appendKeySegmentin interfaceURIBuilder- Parameters:
enumType- enum typememberName- enum member name- Returns:
- current URIBuilder instance
-
appendKeySegment
public URIBuilder appendKeySegment(Map<String, org.apache.commons.lang3.tuple.Pair<EdmEnumType, String>> enumValues, Map<String, Object> segmentValues) Description copied from interface:URIBuilderAppends key segment to the URI, for multiple keys.- Specified by:
appendKeySegmentin interfaceURIBuilder- Parameters:
enumValues- enum segment values.segmentValues- segment values.- Returns:
- current URIBuilder instance
-
noKeysWrapper
-
getBoundOperationSeparator
protected char getBoundOperationSeparator() -
getOperationInvokeMarker
-
appendSingletonSegment
Description copied from interface:URIBuilderAppends Singleton segment to the URI.- Specified by:
appendSingletonSegmentin interfaceURIBuilder- Parameters:
segmentValue- segment value.- Returns:
- current URIBuilder instance
-
appendEntityIdSegment
Description copied from interface:URIBuilderAppends entity-id segment to the URI.- Specified by:
appendEntityIdSegmentin interfaceURIBuilder- Parameters:
segmentValue- segment value- Returns:
- current URIBuilder instance
-
appendRefSegment
Description copied from interface:URIBuilderAppends ref segment to the URI.- Specified by:
appendRefSegmentin interfaceURIBuilder- Returns:
- current URIBuilder instance
-
appendCrossjoinSegment
Description copied from interface:URIBuilderAppends cross join segment to the URI.- Specified by:
appendCrossjoinSegmentin interfaceURIBuilder- Parameters:
segmentValues- segment values.- Returns:
- current URIBuilder instance
-
appendAllSegment
Description copied from interface:URIBuilderAppends all segment to the URI.- Specified by:
appendAllSegmentin interfaceURIBuilder- Returns:
- current URIBuilder instance
-
id
Description copied from interface:URIBuilderAdds id query option.- Specified by:
idin interfaceURIBuilder- Parameters:
idValue- opaque token.- Returns:
- current URIBuilder instance
- See Also:
-
search
Description copied from interface:URIBuilderAppends search query option.- Specified by:
searchin interfaceURIBuilder- Parameters:
search- search expression- Returns:
- current URIBuilder instance
- See Also:
-
search
Description copied from interface:URIBuilderAppends search query option.- Specified by:
searchin interfaceURIBuilder- Parameters:
expression- search expression- Returns:
- current URIBuilder instance
- See Also:
-
count
Description copied from interface:URIBuilderAppends count query option.- Specified by:
countin interfaceURIBuilder- Parameters:
value- true or false- Returns:
- current URIBuilder instance
- See Also:
-
expandWithOptions
Description copied from interface:URIBuilderThe set of expanded entities can be refined through the application of expand options, expressed as a semicolon-separated list of system query options, enclosed in parentheses, see [OData-URL].- Specified by:
expandWithOptionsin interfaceURIBuilder- Parameters:
expandItem- item to be expanded.options- System query options. Allowed query options are: $filter, $select, $orderby, $skip, $top, $count, $search, $expand, and $levels.- Returns:
- current URIBuilder instance.
- See Also:
-
expandWithOptions
public URIBuilder expandWithOptions(String expandItem, boolean pathRef, boolean pathCount, Map<QueryOption, Object> options) Description copied from interface:URIBuilderThe set of expanded entities can be refined through the application of expand options, expressed as a semicolon-separated list of system query options, enclosed in parentheses, see [OData-URL].- Specified by:
expandWithOptionsin interfaceURIBuilder- Parameters:
expandItem- item to be expanded.pathRef- include the /$ref at the end of the $expand item's path;if true pathCount MUST be falsepathCount- include /$count at the end of the $expand item's path;if true pathRef MUST be falseoptions- System query options. Allowed query options are: $filter, $select, $orderby, $skip, $top, $count, $search, $expand, and $levels.- Returns:
- current URIBuilder instance.
- See Also:
-
expandWithSelect
Description copied from interface:URIBuilderProperties of related entities can be specified by including the $select query option within the $expand.
http://host/service/Products?$expand=Category($select=Name)- Specified by:
expandWithSelectin interfaceURIBuilder- Parameters:
expandItem- related entity name.selectItems- properties to be selected.- Returns:
- current URIBuilder instance.
- See Also:
-
addCustomQueryOption
Description copied from interface:URIBuilderAdds/Replaces the specified custom query option to the URI.- Specified by:
addCustomQueryOptionin interfaceURIBuilder- Returns:
- current URIBuilder instance.
-