org.topbraid.spin.system
Class SPINLabels

java.lang.Object
  extended by org.topbraid.spin.system.SPINLabels

public class SPINLabels
extends java.lang.Object

A singleton that is used to render resources into strings. By default this displays qnames (if possible). Can be changed, for example, to switch to displaying rdfs:labels instead of qnames etc.

Author:
Holger Knublauch

Constructor Summary
SPINLabels()
           
 
Method Summary
static SPINLabels get()
          Gets the singleton instance of this class.
 java.lang.String getLabel(Resource resource)
          Gets the label for a given Resource.
static void set(SPINLabels value)
          Replaces the singleton to a subclass with different behavior.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SPINLabels

public SPINLabels()
Method Detail

get

public static SPINLabels get()
Gets the singleton instance of this class.

Returns:
the singleton

set

public static void set(SPINLabels value)
Replaces the singleton to a subclass with different behavior. This is used by TopBraid, which has its own rendering engine.

Parameters:
value - the new engine

getLabel

public java.lang.String getLabel(Resource resource)
Gets the label for a given Resource.

Parameters:
resource - the Resource to get the label of
Returns:
the label (never null)