uk.ac.manchester.cs.owl.owlapi.mansyntaxrenderer
Class ManchesterOWLSyntaxPrefixNameShortFormProvider

java.lang.Object
  extended by uk.ac.manchester.cs.owl.owlapi.mansyntaxrenderer.ManchesterOWLSyntaxPrefixNameShortFormProvider
All Implemented Interfaces:
ShortFormProvider

public class ManchesterOWLSyntaxPrefixNameShortFormProvider
extends java.lang.Object
implements ShortFormProvider

Author: Matthew Horridge
The University of Manchester
Information Management Group
Date: 28-Jun-2009 A special short form provider that delegates to a prefix manager to obtain short forms. The only difference between this short form provider and a prefix manager is that names with the default prefix do not have a colon with this short form provider.


Constructor Summary
ManchesterOWLSyntaxPrefixNameShortFormProvider(DefaultPrefixManager prefixManager)
          Constructs a short form provider that uses the specified prefix mappings
ManchesterOWLSyntaxPrefixNameShortFormProvider(OWLOntologyFormat format)
          Constructs a short form provider that reuses any prefix name mappings from the specified ontology format
ManchesterOWLSyntaxPrefixNameShortFormProvider(OWLOntologyManager man, OWLOntology ont)
          Constructs a short form provider that reuses any prefix name mappings obtainable from the format of the specified ontology (the manager will be asked for the ontology format of the specified ontology)
 
Method Summary
 void dispose()
          Disposes of the short form proivider.
 PrefixManager getPrefixManager()
           
 java.lang.String getShortForm(IRI iri)
          Gets the short form for an IRI
 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

ManchesterOWLSyntaxPrefixNameShortFormProvider

public ManchesterOWLSyntaxPrefixNameShortFormProvider(OWLOntologyManager man,
                                                      OWLOntology ont)
Constructs a short form provider that reuses any prefix name mappings obtainable from the format of the specified ontology (the manager will be asked for the ontology format of the specified ontology)

Parameters:
man - The manager
ont - The ontology

ManchesterOWLSyntaxPrefixNameShortFormProvider

public ManchesterOWLSyntaxPrefixNameShortFormProvider(OWLOntologyFormat format)
Constructs a short form provider that reuses any prefix name mappings from the specified ontology format

Parameters:
format - The format from which prefix name mappings will be reused

ManchesterOWLSyntaxPrefixNameShortFormProvider

public ManchesterOWLSyntaxPrefixNameShortFormProvider(DefaultPrefixManager prefixManager)
Constructs a short form provider that uses the specified prefix mappings

Parameters:
prefixManager - A prefix manager which will be used to obtain prefix mappings
Method Detail

getPrefixManager

public PrefixManager getPrefixManager()

getShortForm

public java.lang.String getShortForm(OWLEntity entity)
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.

getShortForm

public java.lang.String getShortForm(IRI iri)
Gets the short form for an IRI

Parameters:
iri - The IRI
Returns:
The short form for the specified IRI

dispose

public void dispose()
Disposes of the short form proivider. This frees any resources and clears any caches.

Specified by:
dispose in interface ShortFormProvider