Class OntologyBasedLabelResolver

java.lang.Object
org.incenp.obofoundry.kgcl.SimpleLabelResolver
org.incenp.obofoundry.kgcl.owl.OntologyBasedLabelResolver
All Implemented Interfaces:
ILabelResolver

public class OntologyBasedLabelResolver extends SimpleLabelResolver
An object to resolve labels into identifiers using the rdfs:label annotations of an ontology’s entities.
  • 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

      public String resolve(String label)
      Description copied from interface: ILabelResolver
      Finds the identifier corresponding to the given label.
      Specified by:
      resolve in interface ILabelResolver
      Overrides:
      resolve in class SimpleLabelResolver
      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.