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

edu.stanford.protege.webprotege.match.PropertyValueMatcher Maven / Gradle / Ivy

The newest version!
package edu.stanford.protege.webprotege.match;

import edu.stanford.protege.webprotege.frame.PlainPropertyValue;
import org.semanticweb.owlapi.model.OWLPrimitive;
import org.semanticweb.owlapi.model.OWLProperty;

import javax.annotation.Nonnull;
import javax.inject.Inject;

/**
 * Matthew Horridge
 * Stanford Center for Biomedical Informatics Research
 * 2019-12-02
 */
public class PropertyValueMatcher implements Matcher {

    @Nonnull
    private final Matcher propertyMatcher;

    @Nonnull
    private final Matcher valueMatcher;

    @Inject
    public PropertyValueMatcher(@Nonnull Matcher propertyMatcher,
                                @Nonnull Matcher valueMatcher) {
        this.propertyMatcher = propertyMatcher;
        this.valueMatcher = valueMatcher;
    }

    @Override
    public boolean matches(@Nonnull PlainPropertyValue value) {
        return propertyMatcher.matches(value.getProperty())
                && valueMatcher.matches(value.getValue());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy