org.semanticweb.owl.util
Class CommonBaseURIMapper

java.lang.Object
  extended by org.semanticweb.owl.util.CommonBaseURIMapper
All Implemented Interfaces:
OWLOntologyURIMapper

public class CommonBaseURIMapper
extends java.lang.Object
implements OWLOntologyURIMapper

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
CommonBaseURIMapper(java.net.URI base)
          Creates a mapper, which maps ontology URIs to URIs which share the specified base
 
Method Summary
 void addMapping(java.net.URI ontologyURI, 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(java.net.URI ontologyURI)
          Given an ontology URI, this method maps the ontology URI to a physical URI 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

CommonBaseURIMapper

public CommonBaseURIMapper(java.net.URI base)
Creates a mapper, which maps ontology URIs to URIs which share the specified base

Method Detail

addMapping

public void addMapping(java.net.URI ontologyURI,
                       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(java.net.URI ontologyURI)
Given an ontology URI, this method maps the ontology URI to a physical URI that points to some concrete representation of the ontology.

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