Package org.dspace.browse
Class BrowserScope
java.lang.Object
org.dspace.browse.BrowserScope
A class which represents the initial request to the browse system.
When passed into the BrowseEngine, this will cause the creation
of a BrowseInfo object
- Author:
- Richard Jones
-
Constructor Summary
ConstructorsConstructorDescriptionBrowserScope(Context context) Construct a new BrowserScope using the given Context -
Method Summary
Modifier and TypeMethodDescriptionObtain a DSpaceObject that represents the container object.intintgetEtAl()Used for second-level item browses, to only display items that match the valuebooleanShould the filter value be treated as partial, or exactintintgetOrder()intintObtain the sort optionbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidsetAuthorityValue(String value) voidSet the DSpaceObject that is the container for this browse.voidsetBrowseIndex(BrowseIndex browseIndex) voidsetBrowseLevel(int level) voidsetCollection(Collection collection) voidsetCommunity(Community community) voidsetContext(Context context) voidsetEtAl(int etAl) voidsetFilterValue(String value) Used for second-level item browses, to only display items that match the valuevoidsetFilterValueLang(String lang) voidsetFilterValuePartial(boolean filterValuePartial) Should the filter value be treated as partial, or exactvoidsetJumpToItem(int itemId) voidsetJumpToValue(String value) voidsetJumpToValueLang(String valueLang) voidsetOffset(int offset) voidvoidsetResultsPerPage(int resultsPerPage) voidsetSortBy(int sortBy) voidsetStartsWith(String startsWith) voidsetUserLocale(String userLocale)
-
Constructor Details
-
BrowserScope
Construct a new BrowserScope using the given Context- Parameters:
context- the DSpace Context
-
-
Method Details
-
setBrowseContainer
Set the DSpaceObject that is the container for this browse. If this is not of type Collection or Community, this method will throw an exception- Parameters:
dso- the container object; a Community or Collection- Throws:
BrowseException- if browse error
-
getBrowseContainer
Obtain a DSpaceObject that represents the container object. This will be a Community or a Collection- Returns:
- A DSpaceObject representing a Community or a Collection
-
setBrowseLevel
public void setBrowseLevel(int level) - Parameters:
level- the browse level
-
getBrowseLevel
public int getBrowseLevel()- Returns:
- the browse level
-
isTopLevel
public boolean isTopLevel()- Returns:
- true if top level browse, false if not
-
isSecondLevel
public boolean isSecondLevel()- Returns:
- true if second level browse, false if not
-
getBrowseIndex
- Returns:
- Returns the browseIndex.
-
setBrowseIndex
- Parameters:
browseIndex- The browseIndex to set.- Throws:
BrowseException- if error
-
getEtAl
public int getEtAl()- Returns:
- Returns the author limit.
-
setEtAl
public void setEtAl(int etAl) - Parameters:
etAl- the author limit
-
getCollection
- Returns:
- Returns the collection.
-
setCollection
- Parameters:
collection- The collection to set.
-
getCommunity
- Returns:
- Returns the community.
-
setCommunity
- Parameters:
community- The community to set.
-
getContext
- Returns:
- Returns the context.
-
setContext
- Parameters:
context- The context to set.
-
getJumpToItem
public int getJumpToItem()- Returns:
- Returns the focus.
-
setJumpToItem
public void setJumpToItem(int itemId) - Parameters:
itemId- The focus to set.
-
getJumpToValue
- Returns:
- the value to focus on
-
setJumpToValue
- Parameters:
value- the value to focus on
-
getJumpToValueLang
- Returns:
- the language of the value to focus on
-
setJumpToValueLang
- Parameters:
valueLang- the language of the value to focus on
-
getOrder
- Returns:
- Returns the order.
-
setOrder
- Parameters:
order- The order to set.
-
getResultsPerPage
public int getResultsPerPage()- Returns:
- Returns the resultsPerPage.
-
setResultsPerPage
public void setResultsPerPage(int resultsPerPage) - Parameters:
resultsPerPage- The resultsPerPage to set.
-
getSortBy
public int getSortBy()- Returns:
- Returns the sortBy.
-
setSortBy
- Parameters:
sortBy- The sortBy to set.- Throws:
BrowseException- if error
-
getOffset
public int getOffset()- Returns:
- returns the offset for the browse
-
setOffset
public void setOffset(int offset) - Parameters:
offset- the offset to use for this scope
-
getSortOption
Obtain the sort option- Returns:
- the sort option
- Throws:
BrowseException- if browse error
-
getStartsWith
- Returns:
- Returns the startsWith.
-
setStartsWith
- Parameters:
startsWith- The startsWith to set.
-
getFilterValue
Used for second-level item browses, to only display items that match the value- Returns:
- Returns the value.
-
setFilterValue
Used for second-level item browses, to only display items that match the value- Parameters:
value- The value to set.
-
getFilterValuePartial
public boolean getFilterValuePartial()Should the filter value be treated as partial, or exact- Returns:
- true if partial, false if exact
-
setFilterValuePartial
public void setFilterValuePartial(boolean filterValuePartial) Should the filter value be treated as partial, or exact- Parameters:
filterValuePartial- true if partial, false if exact
-
getFilterValueLang
- Returns:
- Returns the language.
-
setFilterValueLang
- Parameters:
lang- The language to set.
-
inCommunity
public boolean inCommunity()- Returns:
- true if in community, false if not
-
inCollection
public boolean inCollection()- Returns:
- true if in collection, false if not
-
isAscending
public boolean isAscending()- Returns:
- true if ascending, false if not - or not set
-
hasFilterValue
public boolean hasFilterValue()- Returns:
- true if has value, false if not
-
hasJumpToItem
public boolean hasJumpToItem()- Returns:
- true if has item focus, false if not
-
hasJumpToValue
public boolean hasJumpToValue()- Returns:
- true if has value focus, false if not
-
hasStartsWith
public boolean hasStartsWith()- Returns:
- true if has starts with value, false if not
-
getAuthorityValue
-
setAuthorityValue
-
setUserLocale
-
getUserLocale
-