org.dspace.browse
Class BrowserScope

java.lang.Object
  extended by org.dspace.browse.BrowserScope

public class BrowserScope
extends Object

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
BrowserScope(Context context)
          Construct a new BrowserScope using the given Context
 
Method Summary
 String getAuthorityValue()
           
 DSpaceObject getBrowseContainer()
          Obtain a DSpaceObject that represents the container object.
 BrowseIndex getBrowseIndex()
           
 int getBrowseLevel()
           
 Collection getCollection()
           
 Community getCommunity()
           
 Context getContext()
           
 int getEtAl()
           
 String getFilterValue()
          Used for second-level item browses, to only display items that match the value
 String getFilterValueLang()
           
 boolean getFilterValuePartial()
          Should the filter value be treated as partial, or exact
 int getJumpToItem()
           
 String getJumpToValue()
           
 String getJumpToValueLang()
           
 int getOffset()
           
 String getOrder()
           
 int getResultsPerPage()
           
 int getSortBy()
           
 SortOption getSortOption()
          Obtain the sort option
 String getStartsWith()
           
 boolean hasFilterValue()
           
 boolean hasJumpToItem()
           
 boolean hasJumpToValue()
           
 boolean hasStartsWith()
           
 boolean inCollection()
           
 boolean inCommunity()
           
 boolean isAscending()
           
 boolean isSecondLevel()
           
 boolean isTopLevel()
           
 void setAuthorityValue(String value)
           
 void setBrowseContainer(DSpaceObject dso)
          Set the DSpaceObject that is the container for this browse.
 void setBrowseIndex(BrowseIndex browseIndex)
           
 void setBrowseLevel(int level)
           
 void setCollection(Collection collection)
           
 void setCommunity(Community community)
           
 void setContext(Context context)
           
 void setEtAl(int etAl)
           
 void setFilterValue(String value)
          Used for second-level item browses, to only display items that match the value
 void setFilterValueLang(String lang)
           
 void setFilterValuePartial(boolean filterValuePartial)
          Should the filter value be treated as partial, or exact
 void setJumpToItem(int itemId)
           
 void setJumpToValue(String value)
           
 void setJumpToValueLang(String valueLang)
           
 void setOffset(int offset)
           
 void setOrder(String order)
           
 void setResultsPerPage(int resultsPerPage)
           
 void setSortBy(int sortBy)
           
 void setStartsWith(String startsWith)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BrowserScope

public BrowserScope(Context context)
Construct a new BrowserScope using the given Context

Parameters:
context - the DSpace Context
Method Detail

setBrowseContainer

public void setBrowseContainer(DSpaceObject dso)
                        throws BrowseException
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

getBrowseContainer

public DSpaceObject 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

public BrowseIndex getBrowseIndex()
Returns:
Returns the browseIndex.

setBrowseIndex

public void setBrowseIndex(BrowseIndex browseIndex)
                    throws BrowseException
Parameters:
browseIndex - The browseIndex to set.
Throws:
BrowseException

getEtAl

public int getEtAl()
Returns:
Returns the author limit.

setEtAl

public void setEtAl(int etAl)
Parameters:
etAl - the author limit

getCollection

public Collection getCollection()
Returns:
Returns the collection.

setCollection

public void setCollection(Collection collection)
Parameters:
collection - The collection to set.

getCommunity

public Community getCommunity()
Returns:
Returns the community.

setCommunity

public void setCommunity(Community community)
Parameters:
community - The community to set.

getContext

public Context getContext()
Returns:
Returns the context.

setContext

public void setContext(Context context)
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

public String getJumpToValue()
Returns:
the value to focus on

setJumpToValue

public void setJumpToValue(String value)
Parameters:
value - the value to focus on

getJumpToValueLang

public String getJumpToValueLang()
Returns:
the language of the value to focus on

setJumpToValueLang

public void setJumpToValueLang(String valueLang)
Parameters:
valueLang - the language of the value to focus on

getOrder

public String getOrder()
Returns:
Returns the order.

setOrder

public void setOrder(String order)
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

public void setSortBy(int sortBy)
               throws BrowseException
Parameters:
sortBy - The sortBy to set.
Throws:
BrowseException

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

public SortOption getSortOption()
                         throws BrowseException
Obtain the sort option

Returns:
the sort option
Throws:
BrowseException

getStartsWith

public String getStartsWith()
Returns:
Returns the startsWith.

setStartsWith

public void setStartsWith(String startsWith)
Parameters:
startsWith - The startsWith to set.

getFilterValue

public String getFilterValue()
Used for second-level item browses, to only display items that match the value

Returns:
Returns the value.

setFilterValue

public void setFilterValue(String value)
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

public String getFilterValueLang()
Returns:
Returns the language.

setFilterValueLang

public void setFilterValueLang(String lang)
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

public String getAuthorityValue()

setAuthorityValue

public void setAuthorityValue(String value)


Copyright © 2010 DuraSpace. All Rights Reserved.