Package org.dlese.dpc.vocab
Class HistogramVocabNode
java.lang.Object
org.dlese.dpc.vocab.HistogramVocabNode
Wrapper for a plain VocabNode that ties to a Lucene index for generating
vocab-based totals
- Author:
- Ryan Deardorff
-
Constructor Summary
ConstructorsConstructorDescriptionHistogramVocabNode(VocabNode vocabNode, HistogramForm histogramForm, boolean isCollection) Constructor for the HistogramVocabNode object -
Method Summary
Modifier and TypeMethodDescriptionstatic voidClear the cache that holds the totals for histogram nodesGets the hasSubtotalsGreaterThanZero attribute of the HistogramVocabNode objectGets the histogramQuery attribute of the HistogramVocabNode objectGets the isLastInSublist attribute of the HistogramVocabNode objectGets the libraryTotal attribute of the HistogramVocabNode objectGets the vocabNode attribute of the HistogramVocabNode objectGets the vocabTotalBar attribute of the HistogramVocabNode objectbooleanIf this node is a sub-header, does it contain sub-nodes that have a total number of resources > 0?booleanGets the lastInSublist attribute of the HistogramVocabNode objectvoidsetCollection(String collection) Sets the collection attribute of the HistogramVocabNode objectvoidsetHasSubtotalsGreaterThanZero(boolean hasSubtotalsGreaterThanZero) Sets the hasSubtotalsGreaterThanZero attribute of the HistogramVocabNode objectvoidsetIsLastInSublist(boolean isLastInSublist) Sets the isLastInSublist attribute of the HistogramVocabNode objectvoidsetLargestTotalInThisGroup(String total) Sets the largestTotalInThisGroup attribute of the HistogramVocabNode objectvoidsetLibraryTotal(int total) Sets the libraryTotal attribute of the HistogramVocabNode objectintsetLibraryTotal(SimpleLuceneIndex index, RepositoryManager rm, String addQuery) Set the total for this vocab value, with added query (for things like collection)voidsetPercentAdjust(int perc) Percentages are adjusted to account for extra UI space (in the browse case, the total number displayed next to the percentage image bar).
-
Constructor Details
-
HistogramVocabNode
Constructor for the HistogramVocabNode object- Parameters:
vocabNode-histogramForm- Description of the ParameterisCollection- Description of the Parameter
-
-
Method Details
-
setCollection
Sets the collection attribute of the HistogramVocabNode object- Parameters:
collection- The new collection value
-
getHistogramQuery
Gets the histogramQuery attribute of the HistogramVocabNode object- Returns:
- The histogramQuery value
-
setLargestTotalInThisGroup
Sets the largestTotalInThisGroup attribute of the HistogramVocabNode object- Parameters:
total- The new largestTotalInThisGroup value
-
setPercentAdjust
public void setPercentAdjust(int perc) Percentages are adjusted to account for extra UI space (in the browse case, the total number displayed next to the percentage image bar). This can be set to 100 to eliminate that behavior, or adjusted for UIs that may need more space.- Parameters:
perc- Percentage multiplier (1-100)
-
getVocabTotalBarPercent
Gets the vocabTotalBar attribute of the HistogramVocabNode object- Returns:
- The vocabTotalBar value
-
setLibraryTotal
Set the total for this vocab value, with added query (for things like collection)- Parameters:
index- Lucene indexrm- repository manageraddQuery- added to query that gets the total for this node- Returns:
-
clearCache
public static void clearCache()Clear the cache that holds the totals for histogram nodes -
setLibraryTotal
public void setLibraryTotal(int total) Sets the libraryTotal attribute of the HistogramVocabNode object- Parameters:
total- The new libraryTotal value
-
getLibraryTotal
Gets the libraryTotal attribute of the HistogramVocabNode object- Returns:
- The libraryTotal value
-
hasSubtotalsGreaterThanZero
public boolean hasSubtotalsGreaterThanZero()If this node is a sub-header, does it contain sub-nodes that have a total number of resources > 0?- Returns:
-
setHasSubtotalsGreaterThanZero
public void setHasSubtotalsGreaterThanZero(boolean hasSubtotalsGreaterThanZero) Sets the hasSubtotalsGreaterThanZero attribute of the HistogramVocabNode object- Parameters:
hasSubtotalsGreaterThanZero- The new hasSubtotalsGreaterThanZero value
-
getHasSubtotalsGreaterThanZero
Gets the hasSubtotalsGreaterThanZero attribute of the HistogramVocabNode object- Returns:
- The hasSubtotalsGreaterThanZero value
-
isLastInSublist
public boolean isLastInSublist()Gets the lastInSublist attribute of the HistogramVocabNode object- Returns:
- The lastInSublist value
-
setIsLastInSublist
public void setIsLastInSublist(boolean isLastInSublist) Sets the isLastInSublist attribute of the HistogramVocabNode object- Parameters:
isLastInSublist- The new isLastInSublist value
-
getIsLastInSublist
Gets the isLastInSublist attribute of the HistogramVocabNode object- Returns:
- The isLastInSublist value
-
getVocabNode
Gets the vocabNode attribute of the HistogramVocabNode object- Returns:
- The vocabNode value
-