
org.nlp2rdf.validator.NIFBeanMentionValidator Maven / Gradle / Ivy
package org.nlp2rdf.validator;
import org.nlp2rdf.bean.NIFBean;
import org.nlp2rdf.bean.NIFType;
import org.nlp2rdf.exception.NIFException;
import java.util.List;
public class NIFBeanMentionValidator implements NIFMessagesException {
public static void checkIfContextExists(List beans) {
if (!beans.stream().filter(bean -> NIFType.CONTEXT.equals(bean.getNifType())).findFirst().isPresent()) {
throw new NIFException(NIF_STRUCTURE_CONTEXT_NOT_FOUND);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy