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 URI mapper that can be used to map ontology URIs to physical URIs which share the same base.


Constructor Summary
CommonBaseIRIMapper(java.net.URI 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 URI to a physical URI which has a base of this mapper and a specified local name - in other words the physical URI will be determined by resolving the local name against the URI base of this mapper.
 java.net.URI getPhysicalURI(IRI ontologyIRI)
          Given an ontology IRI, this method maps the ontology IRI to a physical 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(java.net.URI 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 URI to a physical URI which has a base of this mapper and a specified local name - in other words the physical URI will be determined by resolving the local name against the URI base of this mapper.


getPhysicalURI

public java.net.URI getPhysicalURI(IRI ontologyIRI)
Given an ontology IRI, this method maps the ontology IRI to a physical IRI that points to some concrete representation of the ontology.

Specified by:
getPhysicalURI in interface OWLOntologyIRIMapper
Parameters:
ontologyIRI - The ontology IRI to be mapped.
Returns:
The physical IRI of the ontology, or null if the mapper doesn't have mapping for the specified ontology IRI.