org.semanticweb.owlapi.util
Class QNameShortFormProvider

java.lang.Object
  extended by org.semanticweb.owlapi.util.QNameShortFormProvider
All Implemented Interfaces:
ShortFormProvider

public class QNameShortFormProvider
extends java.lang.Object
implements ShortFormProvider

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 18-Apr-2007

A short form provider which creates QNames for entities


Constructor Summary
QNameShortFormProvider()
          Creates a QNameShortFormProvider where namespace prefix mappings will automatically be generated.
QNameShortFormProvider(java.util.Map<java.lang.String,java.lang.String> prefix2NamespaceMap)
          Creates a QNameShortFormProvider where the specified map overrides any auto-generated prefix namespace mappings.
 
Method Summary
 void dispose()
          Disposes of the short form proivider.
 java.lang.String getShortForm(OWLEntity entity)
          Gets the short form for the specified entity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QNameShortFormProvider

public QNameShortFormProvider()
Creates a QNameShortFormProvider where namespace prefix mappings will automatically be generated.


QNameShortFormProvider

public QNameShortFormProvider(java.util.Map<java.lang.String,java.lang.String> prefix2NamespaceMap)
Creates a QNameShortFormProvider where the specified map overrides any auto-generated prefix namespace mappings.

Parameters:
prefix2NamespaceMap - The map which contains a prefix -> namespace mapping.
Method Detail

getShortForm

public java.lang.String getShortForm(OWLEntity entity)
Description copied from interface: ShortFormProvider
Gets the short form for the specified entity.

Specified by:
getShortForm in interface ShortFormProvider
Parameters:
entity - The entity.
Returns:
A string which represents a short rendering of the speicified entity.

dispose

public void dispose()
Description copied from interface: ShortFormProvider
Disposes of the short form proivider. This frees any resources and clears any caches.

Specified by:
dispose in interface ShortFormProvider