Class AnnotationValueShortFormProvider

  extended by org.semanticweb.owl.util.AnnotationValueShortFormProvider
All Implemented Interfaces:

public class AnnotationValueShortFormProvider
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 that generates short forms based on entity annotation values. A list of preferred annotation URIs and preferred annotation languages is used to determine which annotation value to select if there are multiple annoations for the entity whose short form is being generated. If there are multiple annotations the these annotations are ranked by preferred URI and then by preferred language.

Constructor Summary
AnnotationValueShortFormProvider(java.util.List<> annotationURIs, java.util.Map<,java.util.List<java.lang.String>> preferredLanguageMap, OWLOntologySetProvider ontologySetProvider)
          Constructs an annotation value short form provider.
AnnotationValueShortFormProvider(java.util.List<> annotationURIs, java.util.Map<,java.util.List<java.lang.String>> preferredLanguageMap, OWLOntologySetProvider ontologySetProvider, ShortFormProvider alternateShortFormProvider)
          Constructs an annotation short form provider.
Method Summary
 void dispose()
          Disposes of the short form proivider.
 java.util.List<> getAnnotationURIs()
          Gets the annotation URIs that this short form provider uses.
 java.util.Map<,java.util.List<java.lang.String>> getPreferredLanguageMap()
 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


public AnnotationValueShortFormProvider(java.util.List<> annotationURIs,
                                        java.util.Map<,java.util.List<java.lang.String>> preferredLanguageMap,
                                        OWLOntologySetProvider ontologySetProvider)
Constructs an annotation value short form provider. Using SimpleShortFormProvider as the alternate short form provider (see other constructor for details).


public AnnotationValueShortFormProvider(java.util.List<> annotationURIs,
                                        java.util.Map<,java.util.List<java.lang.String>> preferredLanguageMap,
                                        OWLOntologySetProvider ontologySetProvider,
                                        ShortFormProvider alternateShortFormProvider)
Constructs an annotation short form provider.

annotationURIs - A List of preferred annotation URIs. The list is searched from start to end, so that annotations that have an annotation URI at the start of the list have a higher priority and are selected over annotation URIs that appear towards or at the end of the list.
preferredLanguageMap - A map which maps annotation URIs to preferred languages. For any given annotation URI there may be a list of preferred languages. Languages at the start of the list have a higher priority over languages at the end of the list. This parameter may be empty but it must not be null.
ontologySetProvider - An OWLOntologySetProvider which provides a set of ontology from which candidate annotation axioms should be taken. For a given entity, all ontologies are examined.
alternateShortFormProvider - A short form provider which will be used to generate the short form for an entity that does not have any annotations. This provider will also be used in the case where the value of an annotation is an OWLIndividual for providing the short form of the individual.
Method Detail


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
entity - The entity.
A string which represents a short rendering of the speicified entity.


public java.util.List<> getAnnotationURIs()
Gets the annotation URIs that this short form provider uses.


public java.util.Map<,java.util.List<java.lang.String>> getPreferredLanguageMap()


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