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

org.semanticweb.owlapitools.decomposition.SigAccessor Maven / Gradle / Ivy

The newest version!
package org.semanticweb.owlapitools.decomposition;

import org.semanticweb.owlapi.model.OWLDataRange;
import org.semanticweb.owlapi.model.OWLObjectVisitor;

/**
 * helper class to set signature and locality class
 */
public class SigAccessor implements OWLObjectVisitor {

    LocalityChecker localityChecker;

    /**
     * @param c locality checker
     */
    public SigAccessor(LocalityChecker c) {
        localityChecker = c;
    }

    /**
     * @param expr data range to check
     * @return true iff EXPR is a top datatype or a built-in datatype;
     */
    public boolean isTopOrBuiltInDataType(OWLDataRange expr) {
        return expr.isTopDatatype() || expr.isOWLDatatype()
            && expr.asOWLDatatype().isBuiltIn();
    }

    /**
     * @return true iff roles are treated as TOPs
     */
    public boolean topRLocal() {
        return localityChecker.getSignature().topRLocal();
    }

    protected Signature getSignature() {
        return localityChecker.getSignature();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy