use of com.bakdata.conquery.models.events.CBlock in project conquery by bakdata.
the class DateRestrictingNode method isOfInterest.
@Override
public boolean isOfInterest(Bucket bucket) {
CBlock cBlock = Objects.requireNonNull(preCurrentRow.get(bucket));
if (validityDateColumn == null) {
// If there is no validity date set for a concept there is nothing to restrict
return super.isOfInterest(bucket);
}
CDateRange range = cBlock.getEntityDateRange(entity.getId());
return restriction.intersects(range) && super.isOfInterest(bucket);
}
use of com.bakdata.conquery.models.events.CBlock in project conquery by bakdata.
the class CBlockDeserializer method deserialize.
@Override
public CBlock deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {
CBlock block = beanDeserializer.deserialize(p, ctxt);
TreeConcept concept = block.getConnector().getConcept();
if (block.getMostSpecificChildren() != null) {
// deduplicate concrete paths after loading from disk.
for (int event = 0; event < block.getMostSpecificChildren().length; event++) {
int[] mostSpecificChildren = block.getMostSpecificChildren()[event];
if (mostSpecificChildren == null || Connector.isNotContained(mostSpecificChildren)) {
block.getMostSpecificChildren()[event] = Connector.NOT_CONTAINED;
continue;
}
log.trace("Getting Elements for local ids: {}", mostSpecificChildren);
block.getMostSpecificChildren()[event] = concept.getElementByLocalId(mostSpecificChildren).getPrefix();
}
}
return block;
}
Aggregations