
org.molgenis.api.data.v2.EntityAggregatesResponse Maven / Gradle / Ivy
package org.molgenis.api.data.v2;
import static com.google.common.base.Preconditions.checkNotNull;
import static org.molgenis.data.util.EntityTypeUtils.isReferenceType;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.molgenis.data.Entity;
import org.molgenis.data.aggregation.AggregateResult;
import org.molgenis.data.meta.model.Attribute;
import org.molgenis.data.security.aggregation.AnonymizedAggregateResult;
public class EntityAggregatesResponse extends EntityCollectionResponseV2 {
private final AggregateResultResponse aggs;
private final AttributeResponseV2 xAttr;
private final AttributeResponseV2 yAttr;
public EntityAggregatesResponse(
AggregateResult aggs, AttributeResponseV2 xAttr, AttributeResponseV2 yAttr, String href) {
super(href);
this.aggs = checkNotNull(AggregateResultResponse.toResponse(aggs));
this.xAttr = xAttr;
this.yAttr = yAttr;
}
public AggregateResultResponse getAggs() {
return aggs;
}
public AttributeResponseV2 getXAttr() {
return xAttr;
}
public AttributeResponseV2 getYAttr() {
return yAttr;
}
public static class AggregateResultResponse {
private final List> matrix;
private final List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy