All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.stanford.protege.webprotege.criteria.AnnotationValueCriteria Maven / Gradle / Ivy

package edu.stanford.protege.webprotege.criteria;

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonSubTypes.Type;
import com.fasterxml.jackson.annotation.JsonTypeInfo;

import javax.annotation.Nonnull;
import java.util.List;

/**
 * Matthew Horridge
 * Stanford Center for Biomedical Informatics Research
 * 11 Jun 2018
 *
 * Criteria for the matching of annotation values
 */
@JsonTypeInfo(
        use = JsonTypeInfo.Id.NAME,
        property = "match"
)
@JsonSubTypes({
        @Type(LiteralCriteria.class),
        @Type(IriCriteria.class),
        @Type(AnyAnnotationValueCriteria.class),
        @Type(CompositeAnnotationValueCriteria.class),
        @Type(IriEqualsCriteria.class)
})
public interface AnnotationValueCriteria extends Criteria {

     R accept(@Nonnull AnnotationValueCriteriaVisitor visitor);

    default CompositeAnnotationValueCriteria asCompositeAnnotationValueCriteria() {
        List singleton = List.of(this);
        return CompositeAnnotationValueCriteria.get(singleton, MultiMatchType.ALL);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy