Package org.obolibrary.robot.checks
Class InvalidReferenceChecker
- java.lang.Object
-
- org.obolibrary.robot.checks.InvalidReferenceChecker
-
public class InvalidReferenceChecker extends Object
Checks to determine if axioms contain invalid references: to dangling classes or deprecated classes.This is a structural check. To determine the *logical* validity of an axiom reference, robot uses OWL reasoning.
See: https://github.com/ontodev/robot/issues/1
- Author:
- cjm
-
-
Constructor Summary
Constructors Constructor Description InvalidReferenceChecker()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Set<InvalidReferenceViolation>
checkImportModule(org.semanticweb.owlapi.model.OWLOntology importModule, org.semanticweb.owlapi.model.OWLOntology baseOntology)
Checks an import module.static Set<InvalidReferenceViolation>
getInvalidReferenceViolations(org.semanticweb.owlapi.model.OWLOntology ontology, boolean ignoreDangling)
static Set<InvalidReferenceViolation>
getInvalidReferenceViolations(org.semanticweb.owlapi.model.OWLOntology ontology, Set<org.semanticweb.owlapi.model.OWLAxiom> axioms, boolean ignoreDangling)
Finds axioms that reference a deprecated or dangling entity.static boolean
isDangling(org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.model.OWLEntity entity)
Checks if entity is dangling.static boolean
isDeprecated(org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.model.OWLEntity entity)
Checks if entity is deprecated.
-
-
-
Method Detail
-
isDangling
public static boolean isDangling(org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.model.OWLEntity entity)
Checks if entity is dangling.- Parameters:
ontology
- the OWLOntology to checkentity
- the OWLEntity to check- Returns:
- true if owlClass has no logical or non-logical axioms
-
isDeprecated
public static boolean isDeprecated(org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.model.OWLEntity entity)
Checks if entity is deprecated.- Parameters:
ontology
- the OWLOntology to checkentity
- the OWLEntity to check- Returns:
- true if entity is deprecated
-
getInvalidReferenceViolations
public static Set<InvalidReferenceViolation> getInvalidReferenceViolations(org.semanticweb.owlapi.model.OWLOntology ontology, Set<org.semanticweb.owlapi.model.OWLAxiom> axioms, boolean ignoreDangling)
Finds axioms that reference a deprecated or dangling entity.Declaration axioms that reference a deprecated class do not count.
Note that this does not count the value field of an annotation assertion, since these reference IRIs and not entities
- Parameters:
ontology
- the OWLOntology to checkaxioms
- set of OWLAxioms to checkignoreDangling
- if true, ignore dangling entities- Returns:
- all violations
-
getInvalidReferenceViolations
public static Set<InvalidReferenceViolation> getInvalidReferenceViolations(org.semanticweb.owlapi.model.OWLOntology ontology, boolean ignoreDangling)
- Parameters:
ontology
- the OWLOntology to checkignoreDangling
- boolean to ignore dangling classes- Returns:
- all violations in ontology
-
checkImportModule
public static Set<InvalidReferenceViolation> checkImportModule(org.semanticweb.owlapi.model.OWLOntology importModule, org.semanticweb.owlapi.model.OWLOntology baseOntology)
Checks an import module. If the base ontology refers to deprecated entities in the import module this constitutes a violation- Parameters:
importModule
- the OWLOntology import to checkbaseOntology
- the base OWLOntology to check- Returns:
- all deprecation-reference violations in baseOntology with respect to import module
-
-