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

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

package edu.stanford.protege.webprotege.criteria;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.google.auto.value.AutoValue;
import java.util.List;
import org.semanticweb.owlapi.model.OWLClass;

import javax.annotation.Nonnull;

/**
 * Matthew Horridge
 * Stanford Center for Biomedical Informatics Research
 * 2020-11-06
 */
@AutoValue

@JsonTypeName("NotSubClassOf")
public abstract class NotSubClassOfCriteria implements EntityMatchCriteria, HierarchyPositionCriteria {

    private static final String TARGET = "target";

    private static final String FILTER_TYPE = "filterType";

    @JsonProperty(TARGET)
    @Nonnull
    public abstract OWLClass getTarget();

    @JsonProperty(FILTER_TYPE)
    public abstract HierarchyFilterType getFilterType();

    @JsonCreator
    @Nonnull
    public static NotSubClassOfCriteria get(@Nonnull @JsonProperty(TARGET) OWLClass target,
                                            @Nonnull @JsonProperty(FILTER_TYPE) HierarchyFilterType filterType) {
        return new AutoValue_NotSubClassOfCriteria(target, filterType);
    }

    @Override
    public  R accept(@Nonnull HierarchyPositionCriteriaVisitor visitor) {
        return visitor.visit(this);
    }

    @Override
    public  R accept(RootCriteriaVisitor visitor) {
        return visitor.visit(this);
    }

    @Override
    public CompositeRootCriteria asCompositeRootCriteria() {
        return CompositeRootCriteria.get(List.of(this), MultiMatchType.ALL);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy