Package org.apache.sis.storage.aggregate
Class GroupBySample
java.lang.Object
org.apache.sis.storage.aggregate.Group<GroupByCRS<GroupByTransform>>
org.apache.sis.storage.aggregate.GroupBySample
A container for a list of elements grouped by their sample dimensions.
Usage for coverage aggregation
GroupBySample
contains an arbitrary number of GroupByCRS
instances,
which in turn contain an arbitrary number of GroupByTransform
instances,
which in turn contain an arbitrary number of GridSlice
instances.- Since:
- 1.3
- Version:
- 1.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<SampleDimension>
The sample dimensions of this group. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
GroupBySample
(List<SampleDimension> ranges) Creates a new group of objects associated to the list of sample dimensions. -
Method Summary
Modifier and TypeMethodDescription(package private) final void
createComponents
(GroupAggregate destination) Creates sub-aggregates for each member of this group and add them to the given aggregate.(package private) final String
createName
(Locale locale) Returns a name for this group.(package private) static GroupBySample
getOrAdd
(List<GroupBySample> groups, List<SampleDimension> ranges) Returns the group of objects associated to the given ranges.Methods inherited from class org.apache.sis.storage.aggregate.Group
getName, prepareAggregate, toString
-
Field Details
-
ranges
The sample dimensions of this group.
-
-
Constructor Details
-
GroupBySample
Creates a new group of objects associated to the list of sample dimensions.- Parameters:
ranges
- the sample dimensions of this group.
-
-
Method Details
-
createName
Returns a name for this group.- Specified by:
createName
in classGroup<GroupByCRS<GroupByTransform>>
- Parameters:
locale
- the locale for the name to return, ornull
for the default.- Returns:
- a name which can be used as aggregation name.
-
getOrAdd
Returns the group of objects associated to the given ranges. This method takes a synchronization lock on the given list.- Type Parameters:
E
- type of objects in groups.- Parameters:
groups
- the list where to search for a group.ranges
- sample dimensions of the desired group.- Returns:
- group of objects associated to the given ranges (never null).
-
createComponents
Creates sub-aggregates for each member of this group and add them to the given aggregate.- Parameters:
destination
- where to add sub-aggregates.
-