edu.northwestern.at.monk.model
Class AggregateContainer

java.lang.Object
  extended by edu.northwestern.at.monk.model.AggregateContainer
All Implemented Interfaces:
Container, java.lang.Comparable<AggregateContainer>

public class AggregateContainer
extends java.lang.Object
implements Container, java.lang.Comparable<AggregateContainer>

An aggregate container.

See Also:
MONK Datastore Overview, Licensing Agreement

Constructor Summary
AggregateContainer(java.util.Collection<Container> containers)
          Creates a new aggregate container.
 
Method Summary
 int compareTo(AggregateContainer other)
          Compares this instance with another.
 long getSummaryCount(CumKind cumKind, FeatureKind featureKind, Arity arity, MainKind mainKind)
          Gets a summary count.
 SummaryCounts getSummaryCounts(CumKind cumKind)
          Gets the summary counts.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggregateContainer

public AggregateContainer(java.util.Collection<Container> containers)
Creates a new aggregate container.

Parameters:
containers - Collection of containers.
Method Detail

getSummaryCounts

public SummaryCounts getSummaryCounts(CumKind cumKind)
Gets the summary counts.

Specified by:
getSummaryCounts in interface Container
Parameters:
cumKind - Kind of count: CumKind.CUM or CumKind.NON_CUM.
Returns:
The summary counts.

getSummaryCount

public long getSummaryCount(CumKind cumKind,
                            FeatureKind featureKind,
                            Arity arity,
                            MainKind mainKind)
Gets a summary count.

Specified by:
getSummaryCount in interface Container
Parameters:
cumKind - Kind of count: CumKind.CUM or CumKind.NON_CUM. (Ignored.)
featureKind - Feature kind: FeatureKind.WORD or FeatureKind.WORD_PART.
arity - Arity: Arity.UNIGRAM, Arity.BIGRAM or Arity.TRIGRAM.
mainKind - Main kind: MainKind.ALL_TEXT or MainKind.MAIN_TEXT.
Returns:
Summary count.

compareTo

public int compareTo(AggregateContainer other)
Compares this instance with another.

All aggregate containers are considered to be equal to each other.

Specified by:
compareTo in interface java.lang.Comparable<AggregateContainer>
Parameters:
other - The other instance to be compared.
Returns:
A negative integer, zero, or a positive integer as this instance is less than, equal to, or greater than the specified instance.