Class CommonBaseIRIMapper

java.lang.Object
org.semanticweb.owlapi.util.CommonBaseIRIMapper
All Implemented Interfaces:
Serializable, OWLOntologyIRIMapper

public class CommonBaseIRIMapper extends Object implements OWLOntologyIRIMapper
An ontology IRI mapper that can be used to map ontology IRIs to ontology document IRIs which share the same base.
Since:
2.0.0
Author:
Matthew Horridge, The University Of Manchester, Bio-Health Informatics Group
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a mapper, which maps ontology URIs to URIs which share the specified base.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addMapping(IRI ontologyIRI, String localName)
    Adds a mapping from an ontology IRI to an ontology document IRI which has a base of this mapper and a specified local name - in other words the document IRI will be determined by resolving the local name against the URI base of this mapper.
    getDocumentIRI(IRI ontologyIRI)
    Given an ontology IRI, this method maps the ontology IRI to a document IRI.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CommonBaseIRIMapper

      public CommonBaseIRIMapper(IRI base)
      Creates a mapper, which maps ontology URIs to URIs which share the specified base.
      Parameters:
      base - the base IRI
  • Method Details

    • addMapping

      public void addMapping(IRI ontologyIRI, String localName)
      Adds a mapping from an ontology IRI to an ontology document IRI which has a base of this mapper and a specified local name - in other words the document IRI will be determined by resolving the local name against the URI base of this mapper.
      Parameters:
      ontologyIRI - the ontology IRI
      localName - the document IRI
    • getDocumentIRI

      @Nullable public IRI getDocumentIRI(IRI ontologyIRI)
      Description copied from interface: OWLOntologyIRIMapper
      Given an ontology IRI, this method maps the ontology IRI to a document IRI.
      Specified by:
      getDocumentIRI in interface OWLOntologyIRIMapper
      Parameters:
      ontologyIRI - The ontology IRI to be mapped.
      Returns:
      The document IRI of the ontology, or null if the mapper doesn't have mapping for the specified ontology IRI.