Class CollectionView
- All Implemented Interfaces:
Serializable
CollectionView class.
- See Also:
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionCollectionView
(CollectionView blueprint) Creates a new CollectionView from an already existing one, keeping only the list of all collections without any display informationCollectionView
(String field, CollectionView.BrowseDataProvider dataProvider) Constructor for CollectionView. -
Method Summary
Modifier and TypeMethodDescriptionvoid
associateElementsWithCMSData.static List<HierarchicalBrowseDcElement>
associateWithCMSCollections
(List<HierarchicalBrowseDcElement> collections, String solrField) associateWithCMSCollections.int
calculateLevel
(String name) calculateLevel.void
calculateVisibleDcElements.void
calculateVisibleDcElements
(boolean loadDescriptions) calculateVisibleDcElements.void
expand
(HierarchicalBrowseDcElement element) expand.void
Sets all collection elements visiblevoid
expandAll
(int depth) Sets all collection elements visible up to 'depth' levels into the hierarchyvoid
expandAll
(HierarchicalBrowseDcElement element) Sets all descendants of this element to visiblevoid
expandAll
(HierarchicalBrowseDcElement element, int depth) Sets all descendants of this element to visible, but not beyond level 'depth'getAncestors
(String elementName, boolean includeSelf) int
getBaseElementLevel.Getter for the fieldbaseElementName
.int
Getter for the fieldbaseLevels
.static String
getCollectionDefaultSortField
(String name, Map<String, String> configuredSortFields) getCollectionElement
(String name) getCollectionUrl
(HierarchicalBrowseDcElement collection) getCollectionUrl.static String
getCollectionUrl
(HierarchicalBrowseDcElement collection, String field, String baseSearchUrl) getCollectionUrl.getCollectionUrl
(String collection) getCollectionUrl.getCompleteList.int
getField()
Getter for the fieldfield
.Getter for the fieldtopVisibleElement
.int
getTopVisibleElementLevel.getTranslationForName
(String name) getVisibleDcElements.void
hideAll()
hideAll.void
hideChildren
(HierarchicalBrowseDcElement element) hideChildren.boolean
isDisplayParentCollections.boolean
boolean
isShowAllHierarchyLevels.boolean
isSubcollection.boolean
isTopVisibleElement.loadCollection.void
populateCollectionList.void
removeCollectionInfo
(String name) Remove all custom collection info from the browse element with the given name.void
reset
(boolean reset) Resets the top visible element so the topmost hierarchy level is shownvoid
resetCollectionList.void
resetIgnore.void
setBaseElementName
(String baseElementName) Setter for the fieldbaseElementName
.void
setBaseLevels
(int baseLevels) Setter for the fieldbaseLevels
.void
setCollectionInfo
(String name, BrowseElementInfo info) Set theBrowseElementInfo
of theBrowseDcElement
with the given name to the given info objectvoid
setDisplayParentCollections
(boolean displayParents) Setter for the fielddisplayParentCollections
.void
setIgnore.void
setIgnore
(Collection<String> collectionNames) setIgnore.void
setIgnoreHierarchy
(boolean ignoreHierarchy) void
setSearchUrl
(String searchUrl) void
setShowAllHierarchyLevels
(boolean showAllHierarchyLevels) Setter for the fieldshowAllHierarchyLevels
.void
Setter for the fieldtopVisibleElement
.void
setTopVisibleElement
(String topVisibleElement) Setter for the fieldtopVisibleElement
.void
showAll()
showAll.void
showChildren
(HierarchicalBrowseDcElement element) showChildren.protected static List<HierarchicalBrowseDcElement>
sortDcList
(List<HierarchicalBrowseDcElement> inDcList, List<DcSortingList> sortCriteriaSuperList, String topElement, String splittingChar) Sorts the givenBrowseDcElement
list as defined in the configuration.toggleChildren.toString()
-
Constructor Details
-
CollectionView
Constructor for CollectionView.
- Parameters:
field
- aString
object.dataProvider
- aCollectionView.BrowseDataProvider
object.
-
CollectionView
Creates a new CollectionView from an already existing one, keeping only the list of all collections without any display information- Parameters:
blueprint
- aCollectionView
object.
-
-
Method Details
-
populateCollectionList
public void populateCollectionList() throws IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestExceptionpopulateCollectionList.
- Throws:
IndexUnreachableException
- if any.de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
calculateVisibleDcElements
public void calculateVisibleDcElements() throws de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestExceptioncalculateVisibleDcElements.
- Throws:
de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
calculateVisibleDcElements
public void calculateVisibleDcElements(boolean loadDescriptions) throws de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException calculateVisibleDcElements.
- Parameters:
loadDescriptions
- a boolean.- Throws:
de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
getAncestors
- Parameters:
elementName
-includeSelf
-- Returns:
- List
-
associateElementsWithCMSData
public void associateElementsWithCMSData()associateElementsWithCMSData.
-
associateWithCMSCollections
public static List<HierarchicalBrowseDcElement> associateWithCMSCollections(List<HierarchicalBrowseDcElement> collections, String solrField) throws DAOException associateWithCMSCollections.
- Parameters:
collections
- aList
object.solrField
- aString
object.- Returns:
- the 'collection' parameter
- Throws:
DAOException
- if any.PresentationException
- if any.
-
getVisibleDcElements
getVisibleDcElements.
- Returns:
- a
List
object.
-
calculateLevel
calculateLevel.
- Parameters:
name
- aString
object.- Returns:
- a int.
-
resetCollectionList
public void resetCollectionList()resetCollectionList.
-
isSubcollection
public boolean isSubcollection()isSubcollection.
- Returns:
- a boolean.
-
getTopVisibleElement
Getter for the field
topVisibleElement
.- Returns:
- a
String
object.
-
setTopVisibleElement
Setter for the field
topVisibleElement
.- Parameters:
topVisibleElement
- aString
object.
-
setTopVisibleElement
Setter for the field
topVisibleElement
.- Parameters:
element
- aHierarchicalBrowseDcElement
object.
-
showChildren
showChildren.
- Parameters:
element
- aHierarchicalBrowseDcElement
object.
-
hideChildren
hideChildren.
- Parameters:
element
- aHierarchicalBrowseDcElement
object.
-
toggleChildren
toggleChildren.
- Parameters:
element
- aHierarchicalBrowseDcElement
object.- Returns:
- a
String
object.
-
sortDcList
protected static List<HierarchicalBrowseDcElement> sortDcList(List<HierarchicalBrowseDcElement> inDcList, List<DcSortingList> sortCriteriaSuperList, String topElement, String splittingChar) Sorts the givenBrowseDcElement
list as defined in the configuration. All other elements are moved to the end of the list. -
toString
-
expandAll
Sets all descendants of this element to visible- Parameters:
element
- aHierarchicalBrowseDcElement
object.
-
expandAll
Sets all descendants of this element to visible, but not beyond level 'depth'- Parameters:
depth
- a int.element
- aHierarchicalBrowseDcElement
object.
-
expandAll
public void expandAll()Sets all collection elements visible -
expandAll
public void expandAll(int depth) Sets all collection elements visible up to 'depth' levels into the hierarchy- Parameters:
depth
- a int.
-
getCompleteList
getCompleteList.
- Returns:
- a
List
object.
-
expand
public void expand(HierarchicalBrowseDcElement element) throws IndexUnreachableException, de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException expand.
- Parameters:
element
- aHierarchicalBrowseDcElement
object.- Throws:
IndexUnreachableException
- if any.de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
reset
public void reset(boolean reset) Resets the top visible element so the topmost hierarchy level is shown- Parameters:
reset
- a boolean.- Throws:
DAOException
- if any.IndexUnreachableException
- if any.de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
getBaseElementName
Getter for the field
baseElementName
.- Returns:
- a
String
object.
-
setBaseElementName
Setter for the field
baseElementName
.- Parameters:
baseElementName
- aString
object.
-
getBaseLevels
public int getBaseLevels()Getter for the field
baseLevels
.- Returns:
- a int.
-
setBaseLevels
public void setBaseLevels(int baseLevels) Setter for the field
baseLevels
.- Parameters:
baseLevels
- a int.
-
isTopVisibleElement
isTopVisibleElement.
- Parameters:
element
- aHierarchicalBrowseDcElement
object.- Returns:
- a boolean.
-
showAll
public void showAll() throws de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestExceptionshowAll.
- Throws:
de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
hideAll
public void hideAll() throws de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestExceptionhideAll.
- Throws:
de.unigoettingen.sub.commons.contentlib.exceptions.IllegalRequestException
-
getTopVisibleElementLevel
public int getTopVisibleElementLevel()getTopVisibleElementLevel.
- Returns:
- a int.
-
getBaseElementLevel
public int getBaseElementLevel()getBaseElementLevel.
- Returns:
- a int.
-
setShowAllHierarchyLevels
public void setShowAllHierarchyLevels(boolean showAllHierarchyLevels) Setter for the field
showAllHierarchyLevels
.- Parameters:
showAllHierarchyLevels
- the showAllHierarchyLevels to set
-
isShowAllHierarchyLevels
public boolean isShowAllHierarchyLevels()isShowAllHierarchyLevels.
- Returns:
- the showAllHierarchyLevels
-
getCollectionUrl
getCollectionUrl.
-
loadCollection
loadCollection.
- Parameters:
element
- aHierarchicalBrowseDcElement
object.- Returns:
- a
String
object.
-
getCollectionUrl
getCollectionUrl.
- Parameters:
collection
- aHierarchicalBrowseDcElement
object.- Returns:
- a
String
object. - Throws:
URISyntaxException
-
getCollectionUrl
public static String getCollectionUrl(HierarchicalBrowseDcElement collection, String field, String baseSearchUrl) getCollectionUrl.
- Parameters:
collection
- aHierarchicalBrowseDcElement
object.field
- aString
object.baseSearchUrl
-- Returns:
- a
String
object. - Throws:
URISyntaxException
-
setDisplayParentCollections
public void setDisplayParentCollections(boolean displayParents) Setter for the field
displayParentCollections
.- Parameters:
displayParents
- a boolean.
-
isDisplayParentCollections
public boolean isDisplayParentCollections()isDisplayParentCollections.
- Returns:
- the displayParentCollections
-
setIgnore
setIgnore.
- Parameters:
collectionName
- aString
object.
-
setIgnore
setIgnore.
- Parameters:
collectionNames
- aCollection
object.
-
resetIgnore
public void resetIgnore()resetIgnore.
-
setCollectionInfo
Set theBrowseElementInfo
of theBrowseDcElement
with the given name to the given info object- Parameters:
name
- The collection nameinfo
- The info to apply
-
removeCollectionInfo
Remove all custom collection info from the browse element with the given name. The element will get a newSimpleBrowseElementInfo
- Parameters:
name
- The collection name
-
getTranslationForName
- Parameters:
name
- Raw collection name- Returns:
- Translation for the current langauge; null of none found
-
getField
Getter for the field
field
.- Returns:
- the field
-
getSearchUrl
- Returns:
- the searchUrl
-
setSearchUrl
- Parameters:
searchUrl
- the searchUrl to set
-
isIgnoreHierarchy
public boolean isIgnoreHierarchy()- Returns:
- the ignoreHierarchy
-
setIgnoreHierarchy
public void setIgnoreHierarchy(boolean ignoreHierarchy) - Parameters:
ignoreHierarchy
- the ignoreHierarchy to set
-
getCollectionDefaultSortField
-
getSplittingChar
- Returns:
- the splittingChar
-
getDisplayNumberOfVolumesLevel
public int getDisplayNumberOfVolumesLevel()- Returns:
- the displayNumberOfVolumesLevel
-
getCollectionElement
-
getBaseElement
-