Class LiteralAnnotationError
java.lang.Object
org.incenp.obofoundry.odk.fixreport.LiteralAnnotationError
- All Implemented Interfaces:
IFixableError
- Direct Known Subclasses:
LowercaseDefinitionError,MissingObsoleteLabelError
Represents a fixable error that resides in a literal annotation.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLiteralAnnotationError(org.semanticweb.owlapi.model.IRI property, org.semanticweb.owlapi.model.IRI subject, String value) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanfixError(org.semanticweb.owlapi.model.OWLOntology ontology, boolean dubious) Fixes the reported error.protected abstract org.semanticweb.owlapi.model.OWLLiteralfixValue(org.semanticweb.owlapi.model.OWLLiteral oldValue, org.semanticweb.owlapi.model.OWLDataFactory factory, boolean dubious) Fixes the annotation value.
-
Field Details
-
property
protected org.semanticweb.owlapi.model.IRI property -
subject
protected org.semanticweb.owlapi.model.IRI subject -
value
-
-
Constructor Details
-
LiteralAnnotationError
public LiteralAnnotationError(org.semanticweb.owlapi.model.IRI property, org.semanticweb.owlapi.model.IRI subject, String value) Constructs a new instance.- Parameters:
property- The property of the annotation to fix.subject- The entity carrying the annotation to fix.value- The value of the annotation. This is the value as reported by ROBOT’sreportcommand, i.e. as a string of the formVALUE[@LANG].
-
-
Method Details
-
fixError
public boolean fixError(org.semanticweb.owlapi.model.OWLOntology ontology, boolean dubious) Description copied from interface:IFixableErrorFixes the reported error.- Specified by:
fixErrorin interfaceIFixableError- Parameters:
ontology- The ontology containing the error to fix.dubious- Iftrue, fix the error even if we are not certain it is actually an error.- Returns:
trueif the error has indeed been fixed.
-
fixValue
protected abstract org.semanticweb.owlapi.model.OWLLiteral fixValue(org.semanticweb.owlapi.model.OWLLiteral oldValue, org.semanticweb.owlapi.model.OWLDataFactory factory, boolean dubious) Fixes the annotation value.- Parameters:
oldValue- The literal representing the invalid annotation value.factory- A factory that can be used to create the correct value.dubious- Iftrue, fix the error even if we are not certain it is actually an error.- Returns:
- The correct value to use to replace the original one, or
nullif correction could not be performed for any reason.
-