public class Navigation
extends java.lang.Object
The Navigation object represents dynamic navigation sent back from the search engine.
Each navigation item has the following properties:
- `id`: an MD5 hash of the name.
- `name`: the name of the metadata used to create this dynamic navigation option.
- `displayName`: the human digestible version of this name.
- `range`: true if the navigation option is a range.
- `or`: true if the navigation option supports or-queries.
- `refinements`: A list of the refinement values for this dynamic navigation
- `sort`: If specified, an object detailing the sort field and sort order
| Modifier and Type | Class and Description |
|---|---|
static class |
Navigation.Sort |
| Constructor and Description |
|---|
Navigation()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDisplayName() |
java.lang.String |
getId() |
java.util.List<Metadata> |
getMetadata()
A list of metadata key-value pairs for a specified navigation item. |
java.lang.String |
getName() |
java.util.List<Refinement> |
getRefinements() |
Navigation.Sort |
getSort()
Will return one of the following sort types:
Count_Ascending, Count_Descending
Value_Ascending, Value_Descending
|
java.lang.Boolean |
isMoreRefinements()
True if this navigation has more refinement values than the ones returned. |
boolean |
isOr()
If you are using the this object within a JSP you will not be able to reference it directly as
`navigation.or` is a reserved field in JSTL. |
boolean |
isRange() |
Navigation |
setDisplayName(java.lang.String displayName) |
Navigation |
setId(java.lang.String id) |
Navigation |
setMetadata(java.util.List<Metadata> metadata) |
Navigation |
setMoreRefinements(java.lang.Boolean moreRefinements) |
Navigation |
setName(java.lang.String name) |
Navigation |
setOr(boolean or) |
Navigation |
setRange(boolean range) |
Navigation |
setRefinements(java.util.List<Refinement> refinements) |
Navigation |
setSort(Navigation.Sort sort) |
Navigation |
setSort(java.lang.String sort)
Helper method
|
public java.lang.String getName()
public Navigation setName(java.lang.String name)
name - The name of the navigationpublic java.lang.String getDisplayName()
public Navigation setDisplayName(java.lang.String displayName)
displayName - Set the display namepublic java.util.List<Refinement> getRefinements()
public Navigation setRefinements(java.util.List<Refinement> refinements)
refinements - The refinement valuespublic java.lang.String getId()
public Navigation setId(java.lang.String id)
id - Set the IDpublic boolean isRange()
public Navigation setRange(boolean range)
range - Set rangepublic boolean isOr()
If you are using the this object within a JSP you will not be able to reference it directly as
`navigation.or` is a reserved field in JSTL. Instead reference it within quotes:
${navigation['or'] ? 'Or Query' : 'And Query'}
public Navigation setOr(boolean or)
or - Set whether this is an OR fieldpublic Navigation.Sort getSort()
Will return one of the following sort types:
Count_Ascending, Count_Descending
Value_Ascending, Value_Descending
public Navigation setSort(java.lang.String sort)
Helper method
sort - Set the sort by string.public Navigation setSort(Navigation.Sort sort)
sort - Set the sort typepublic java.util.List<Metadata> getMetadata()
A list of metadata key-value pairs for a specified navigation item. Each value
contains the following properties:
- key: a string containing the attribute name
- value: a string containing the attribute value
public Navigation setMetadata(java.util.List<Metadata> metadata)
metadata - Set the metadatapublic java.lang.Boolean isMoreRefinements()
True if this navigation has more refinement values than the ones returned.
public Navigation setMoreRefinements(java.lang.Boolean moreRefinements)
moreRefinements - True if this navigation has more refinement values than the ones returned.Copyright © 2013–2016 GroupBy Inc.. All rights reserved.