Examples of UseOfPropertyInChainCausesCycle


Examples of org.semanticweb.owlapi.profiles.violations.UseOfPropertyInChainCausesCycle

            // center part of the chain must be smaller in any case
            for (int i = 1; i < chain.size() - 1; i++) {
                OWLObjectPropertyExpression propB = chain.get(i);
                assert propB != null;
                if (getPropertyManager().isLessThan(superProp, propB)) {
                    profileViolations.add(new UseOfPropertyInChainCausesCycle(
                            getCurrentOntology(), axiom, propB));
                }
            }
            if (first.equals(superProp)) {
                // first equals, last must be smaller
                if (getPropertyManager().isLessThan(superProp, last)) {
                    profileViolations.add(new UseOfPropertyInChainCausesCycle(
                            getCurrentOntology(), axiom, last));
                }
            } else {
                // first not equal, it must be smaller
                if (getPropertyManager().isLessThan(superProp, first)) {
                    profileViolations.add(new UseOfPropertyInChainCausesCycle(
                            getCurrentOntology(), axiom, first));
                }
            }
            if (last.equals(superProp)) {
                // last equals, first must be smaller
                if (getPropertyManager().isLessThan(superProp, first)) {
                    profileViolations.add(new UseOfPropertyInChainCausesCycle(
                            getCurrentOntology(), axiom, first));
                }
            } else {
                // last not equal, it must be smaller
                if (getPropertyManager().isLessThan(superProp, last)) {
                    profileViolations.add(new UseOfPropertyInChainCausesCycle(
                            getCurrentOntology(), axiom, last));
                }
            }
            // neither first and last equal: they both must be smaller, checked
            // already in the else branches
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.