DLESE Tools
v1.6.0

org.dlese.dpc.vocab
Class HistogramVocabNode

java.lang.Object
  extended by 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 Summary
HistogramVocabNode(VocabNode vocabNode, HistogramForm histogramForm, boolean isCollection)
          Constructor for the HistogramVocabNode object
 
Method Summary
static void clearCache()
          Clear the cache that holds the totals for histogram nodes
 String getHasSubtotalsGreaterThanZero()
          Gets the hasSubtotalsGreaterThanZero attribute of the HistogramVocabNode object
 String getHistogramQuery()
          Gets the histogramQuery attribute of the HistogramVocabNode object
 String getIsLastInSublist()
          Gets the isLastInSublist attribute of the HistogramVocabNode object
 String getLibraryTotal()
          Gets the libraryTotal attribute of the HistogramVocabNode object
 VocabNode getVocabNode()
          Gets the vocabNode attribute of the HistogramVocabNode object
 String getVocabTotalBarPercent()
          Gets the vocabTotalBar attribute of the HistogramVocabNode object
 boolean hasSubtotalsGreaterThanZero()
          If this node is a sub-header, does it contain sub-nodes that have a total number of resources > 0?
 boolean isLastInSublist()
          Gets the lastInSublist attribute of the HistogramVocabNode object
 void setCollection(String collection)
          Sets the collection attribute of the HistogramVocabNode object
 void setHasSubtotalsGreaterThanZero(boolean hasSubtotalsGreaterThanZero)
          Sets the hasSubtotalsGreaterThanZero attribute of the HistogramVocabNode object
 void setIsLastInSublist(boolean isLastInSublist)
          Sets the isLastInSublist attribute of the HistogramVocabNode object
 void setLargestTotalInThisGroup(String total)
          Sets the largestTotalInThisGroup attribute of the HistogramVocabNode object
 void setLibraryTotal(int total)
          Sets the libraryTotal attribute of the HistogramVocabNode object
 int setLibraryTotal(SimpleLuceneIndex index, RepositoryManager rm, String addQuery)
          Set the total for this vocab value, with added query (for things like collection)
 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).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

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

DLESE Tools
v1.6.0