Package org.incenp.obofoundry.kgcl.owl
Class OntologyBasedLabelResolver
java.lang.Object
org.incenp.obofoundry.kgcl.SimpleLabelResolver
org.incenp.obofoundry.kgcl.owl.OntologyBasedLabelResolver
- All Implemented Interfaces:
ILabelResolver
An object to resolve labels into identifiers using the
rdfs:label
annotations of an ontology’s entities.-
Constructor Summary
ConstructorsConstructorDescriptionOntologyBasedLabelResolver
(org.semanticweb.owlapi.model.OWLOntology ontology) Creates a new instance to resolve labels based on the contents of the provided ontology. -
Method Summary
Methods inherited from class org.incenp.obofoundry.kgcl.SimpleLabelResolver
add, getNewId
-
Constructor Details
-
OntologyBasedLabelResolver
public OntologyBasedLabelResolver(org.semanticweb.owlapi.model.OWLOntology ontology) Creates a new instance to resolve labels based on the contents of the provided ontology.- Parameters:
ontology
- The ontology to use to resolve labels.
-
-
Method Details
-
resolve
Description copied from interface:ILabelResolver
Finds the identifier corresponding to the given label.- Specified by:
resolve
in interfaceILabelResolver
- Overrides:
resolve
in classSimpleLabelResolver
- Parameters:
label
- The label to resolve.- Returns:
- The identifier of the entity with the given label, or
null
if the label could not be resolved.
-