Package org.semanticweb.owlapi.util
Class SimpleShortFormProvider
java.lang.Object
org.semanticweb.owlapi.util.SimpleShortFormProvider
- All Implemented Interfaces:
Serializable
,ShortFormProvider
A very simple short form provider which is intended to provide human readable
display names for entities. The following strategy is used: 1) If the entity
URI has a fragment then that fragment is returned e.g. http://an.other.com#A
would have a short form of "A". 2) If the entity URI does not have a fragment
then the last segment of the URI path is used e.g. http://an.other.com/A/B
would have a short form of "B". 3) If the entity URI does not have a path
then the full URI is returned as a string.
- Since:
- 2.0.0
- Author:
- Matthew Horridge, The University Of Manchester, Bio-Health Informatics Group
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetShortForm
(OWLEntity entity) Gets the short form for the specified entity.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.semanticweb.owlapi.util.ShortFormProvider
dispose
-
Constructor Details
-
SimpleShortFormProvider
public SimpleShortFormProvider()
-
-
Method Details
-
getShortForm
Description copied from interface:ShortFormProvider
Gets the short form for the specified entity.- Specified by:
getShortForm
in interfaceShortFormProvider
- Parameters:
entity
- The entity.- Returns:
- A string which represents a short rendering of the specified entity. The returned value will not be null but might be an empty string.
-