Class HistogramVocabNode

java.lang.Object
org.dlese.dpc.vocab.HistogramVocabNode

public class HistogramVocabNode extends Object
Wrapper for a plain VocabNode that ties to a Lucene index for generating vocab-based totals
Author:
Ryan Deardorff
  • Constructor Details

    • HistogramVocabNode

      public HistogramVocabNode(VocabNode vocabNode, HistogramForm histogramForm, boolean isCollection)
      Constructor for the HistogramVocabNode object
      Parameters:
      vocabNode -
      histogramForm - Description of the Parameter
      isCollection - Description of the Parameter
  • Method Details

    • setCollection

      public void setCollection(String collection)
      Sets the collection attribute of the HistogramVocabNode object
      Parameters:
      collection - The new collection value
    • getHistogramQuery

      public String getHistogramQuery()
      Gets the histogramQuery attribute of the HistogramVocabNode object
      Returns:
      The histogramQuery value
    • setLargestTotalInThisGroup

      public void setLargestTotalInThisGroup(String total)
      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

      public String getVocabTotalBarPercent()
      Gets the vocabTotalBar attribute of the HistogramVocabNode object
      Returns:
      The vocabTotalBar value
    • setLibraryTotal

      public int setLibraryTotal(SimpleLuceneIndex index, RepositoryManager rm, String addQuery)
      Set the total for this vocab value, with added query (for things like collection)
      Parameters:
      index - Lucene index
      rm - repository manager
      addQuery - 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

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

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

      public String getIsLastInSublist()
      Gets the isLastInSublist attribute of the HistogramVocabNode object
      Returns:
      The isLastInSublist value
    • getVocabNode

      public VocabNode getVocabNode()
      Gets the vocabNode attribute of the HistogramVocabNode object
      Returns:
      The vocabNode value