org.semanticweb.owlapi.util
Class CommonBaseIRIMapper

java.lang.Object
  extended by org.semanticweb.owlapi.util.CommonBaseIRIMapper
All Implemented Interfaces:
OWLOntologyIRIMapper

public class CommonBaseIRIMapper
extends java.lang.Object
implements OWLOntologyIRIMapper

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 07-Feb-2007

An ontology IRI mapper that can be used to map ontology IRIs to ontology document IRIs which share the same base.


Constructor Summary
CommonBaseIRIMapper(IRI base)
          Creates a mapper, which maps ontology URIs to URIs which share the specified base
 
Method Summary
 void addMapping(IRI ontologyIRI, java.lang.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.
 IRI getDocumentIRI(IRI ontologyIRI)
          Given an ontology IRI, this method maps the ontology IRI to a document IRI that points to some concrete representation of the ontology.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonBaseIRIMapper

public CommonBaseIRIMapper(IRI base)
Creates a mapper, which maps ontology URIs to URIs which share the specified base

Method Detail

addMapping

public void addMapping(IRI ontologyIRI,
                       java.lang.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

public IRI getDocumentIRI(IRI ontologyIRI)
Given an ontology IRI, this method maps the ontology IRI to a document IRI that points to some concrete representation of the ontology.

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.