package at.procon.dip.ingestion.service;

import java.util.Map;

public final class IngestionInternalAttributes {

    public static final String DEFER_LEXICAL_INDEX = "_deferLexicalIndex";

    private IngestionInternalAttributes() {
    }

    public static boolean isTruthy(Map<String, String> attributes, String key) {
        if (attributes == null || attributes.isEmpty()) {
            return false;
        }
        String value = attributes.get(key);
        return value != null && Boolean.parseBoolean(value);
    }
}
