com.endeca.portal.data
Class SemanticViewUtils

java.lang.Object
  extended by com.endeca.portal.data.SemanticViewUtils

public class SemanticViewUtils
extends java.lang.Object


Constructor Summary
SemanticViewUtils()
           
 
Method Summary
static java.lang.String getAttributeDisplayName(SemanticView view, java.lang.String attributeKey, java.util.Locale locale)
          Null safe method to get an attribute display name from the view or return the key if there is none.
static java.lang.String getPredefinedMetricDisplayName(SemanticView view, java.lang.String metricKey, java.util.Locale locale)
          Null safe method to get a predefined metric display name from the view or return the key if there is none.
static boolean isBaseAttribute(SemanticView view, java.lang.String attributeKey)
          Determines if an attribute key exists in a base collection.
static boolean isRefineable(SemanticView view, java.lang.String attributeKey)
          Determines if the attribute having the specified keys is a refineable attribute.
static boolean isSingleAssign(SemanticView view, java.lang.String attributeKey)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SemanticViewUtils

public SemanticViewUtils()
Method Detail

isSingleAssign

public static boolean isSingleAssign(SemanticView view,
                                     java.lang.String attributeKey)

getAttributeDisplayName

public static java.lang.String getAttributeDisplayName(SemanticView view,
                                                       java.lang.String attributeKey,
                                                       java.util.Locale locale)
Null safe method to get an attribute display name from the view or return the key if there is none.

Parameters:
attributesMap -
attributeKey -
locale -
Returns:

getPredefinedMetricDisplayName

public static java.lang.String getPredefinedMetricDisplayName(SemanticView view,
                                                              java.lang.String metricKey,
                                                              java.util.Locale locale)
Null safe method to get a predefined metric display name from the view or return the key if there is none.

Parameters:
attributesMap -
metricKey -
locale -
Returns:

isBaseAttribute

public static boolean isBaseAttribute(SemanticView view,
                                      java.lang.String attributeKey)
                               throws DataSourceException,
                                      KeyNotFoundException
Determines if an attribute key exists in a base collection. Do not use this method to determine if an attribute is refineable. Use isRefineable for that purpose instead.

Parameters:
view -
attributeKey -
Returns:
Throws:
DataSourceException
KeyNotFoundException

isRefineable

public static boolean isRefineable(SemanticView view,
                                   java.lang.String attributeKey)
Determines if the attribute having the specified keys is a refineable attribute.

Parameters:
view -
attributeKey -
Returns: