com.endeca.portal.attributes.model
Class Attribute

java.lang.Object
  extended by com.endeca.portal.attributes.model.BasePropertyContainer
      extended by com.endeca.portal.attributes.model.Attribute

public class Attribute
extends BasePropertyContainer

Represents an attribute object serializable via Jackson

Author:
Endeca Technologies, Inc

Field Summary
static java.lang.String DEFAULT_LOCALE_ATTRIBUTE_KEY
           
static java.lang.String DESCRIPTION_PROPERTY
           
static java.lang.String DISPLAY_NAME_PROPERTY
           
static java.lang.String IS_MANAGED
           
static java.lang.String IS_PROPERTY_VALUE_SEARCHABLE_PROPERTY
           
static java.lang.String IS_SHOW_RECORD_COUNTS
           
static java.lang.String IS_SINGLE_ASSIGN_PROPERTY
           
static java.lang.String IS_TEXT_SEARCH_ALLOWS_WILDCARDS_PROPERTY
           
static java.lang.String IS_TEXT_SEARCHABLE_PROPERTY
           
static java.lang.String IS_UNIQUE_PROPERTY
           
static java.lang.String LOCALIZED_ATTRIBUTE_METADATA
           
static java.lang.String LOCALIZED_DESCRIPTION_PROPERTY
           
static java.lang.String LOCALIZED_DISPLAY_NAME_PROPERTY
           
static java.lang.String MDEX_TYPE_PROPERTY
           
static java.lang.String REFINEMENT_SELECTION_MODE
           
static java.lang.String SORT_ORDER_PROPERTY
           
static java.lang.String SYSTEM_IS_DIMENSION
           
static java.lang.String SYSTEM_LOCALIZED_DESC_SETTINGS
           
static java.lang.String SYSTEM_LOCALIZED_DN_SETTINGS
           
 
Fields inherited from class com.endeca.portal.attributes.model.BasePropertyContainer
KEY_PROPERTY, properties
 
Constructor Summary
Attribute()
           
 
Method Summary
 java.lang.String getDefaultLocaleAttributeKey()
          Get default locale attribute key for this attribute
 java.lang.String getDescription()
           
 java.lang.String getDescription(java.util.Locale locale)
          Get description by locale settings
 java.lang.String getDescription(javax.portlet.PortletRequest request)
          Get description by request
 java.lang.String getDescription(java.lang.String languageId)
          Get description by language id
 java.lang.String getDisplayName()
           
 java.lang.String getDisplayName(java.util.Locale locale)
          Get display name by locale settings
 java.lang.String getDisplayName(javax.portlet.PortletRequest request)
          Get display name by request
 java.lang.String getDisplayName(java.lang.String languageId)
          Get display name by language id
 java.lang.String getLocalizedAttributeMetadata()
          Get default locale attribute key for this attribute
 java.util.Map<java.lang.String,java.lang.String> getLocalizedAttributeMetadataMap()
          Utility function to get the locale-attribute mappings in a Map object.
 java.lang.String getLocalizedDescription()
           
 java.lang.String getLocalizedDisplayName()
           
 RefinementSelectionMode getRefinementSelectionMode()
          Gets the refinement selection mode of this attribute.
 java.lang.String getRefinementSortOrder()
           
 PropertyType getType()
          Gets the data type of this attribute.
 boolean isAttributeValueSearchEnabled()
          Indicates if this attribute is enabled for and can be used in a value search.
 boolean isDimension()
          Indicates if this attribute is designated as a Dimension in the EID Studio context.
 boolean isManaged()
          Indicates if this attribute is a Managed Attribute in Endeca Server.
 boolean isNavigable()
          Deprecated. As of MDEX 7 this is no longer relevant; all attributes are navigable
 boolean isSingleAssign()
          Indicates if this attribute is marked single-assign in the Endeca Server metadata, meaning a single record can have only a single assignment for this attribute.
 boolean isUnique()
          Indicates if this attribute is marked unique in the Endeca Server metadata, meaning no two records can share the same value for such an attribute.
 void setDefaultLocaleAttributeKey(java.lang.String attributeKey)
          Set default locale attribute key for this attribute
 void setDescription(java.lang.String description)
           
 void setDisplayName(java.lang.String displayName)
           
 void setLocalizedAttributeMetadata(java.lang.String value)
          Set default locale attribute key for this attribute
 void setLocalizedDescription(java.lang.String description)
           
 void setLocalizedDisplayName(java.lang.String displayName)
           
 void setManaged(boolean managed)
           
 void setRefinementSortOrder(java.lang.String sortOrder)
          Sets the refinement sort order (e.g. lexical, record count).
 
Methods inherited from class com.endeca.portal.attributes.model.BasePropertyContainer
addProperty, getKey, getProperties, getProperty, getProperty, isEmpty, isValid, setKey, setProperties, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DISPLAY_NAME_PROPERTY

public static final java.lang.String DISPLAY_NAME_PROPERTY
See Also:
Constant Field Values

DESCRIPTION_PROPERTY

public static final java.lang.String DESCRIPTION_PROPERTY
See Also:
Constant Field Values

LOCALIZED_DISPLAY_NAME_PROPERTY

public static final java.lang.String LOCALIZED_DISPLAY_NAME_PROPERTY
See Also:
Constant Field Values

LOCALIZED_DESCRIPTION_PROPERTY

public static final java.lang.String LOCALIZED_DESCRIPTION_PROPERTY
See Also:
Constant Field Values

IS_SINGLE_ASSIGN_PROPERTY

public static final java.lang.String IS_SINGLE_ASSIGN_PROPERTY
See Also:
Constant Field Values

IS_SHOW_RECORD_COUNTS

public static final java.lang.String IS_SHOW_RECORD_COUNTS
See Also:
Constant Field Values

IS_TEXT_SEARCH_ALLOWS_WILDCARDS_PROPERTY

public static final java.lang.String IS_TEXT_SEARCH_ALLOWS_WILDCARDS_PROPERTY
See Also:
Constant Field Values

IS_TEXT_SEARCHABLE_PROPERTY

public static final java.lang.String IS_TEXT_SEARCHABLE_PROPERTY
See Also:
Constant Field Values

IS_PROPERTY_VALUE_SEARCHABLE_PROPERTY

public static final java.lang.String IS_PROPERTY_VALUE_SEARCHABLE_PROPERTY
See Also:
Constant Field Values

IS_UNIQUE_PROPERTY

public static final java.lang.String IS_UNIQUE_PROPERTY
See Also:
Constant Field Values

MDEX_TYPE_PROPERTY

public static final java.lang.String MDEX_TYPE_PROPERTY
See Also:
Constant Field Values

SORT_ORDER_PROPERTY

public static final java.lang.String SORT_ORDER_PROPERTY
See Also:
Constant Field Values

REFINEMENT_SELECTION_MODE

public static final java.lang.String REFINEMENT_SELECTION_MODE
See Also:
Constant Field Values

SYSTEM_LOCALIZED_DN_SETTINGS

public static final java.lang.String SYSTEM_LOCALIZED_DN_SETTINGS
See Also:
Constant Field Values

SYSTEM_LOCALIZED_DESC_SETTINGS

public static final java.lang.String SYSTEM_LOCALIZED_DESC_SETTINGS
See Also:
Constant Field Values

SYSTEM_IS_DIMENSION

public static final java.lang.String SYSTEM_IS_DIMENSION
See Also:
Constant Field Values

IS_MANAGED

public static final java.lang.String IS_MANAGED
See Also:
Constant Field Values

LOCALIZED_ATTRIBUTE_METADATA

public static final java.lang.String LOCALIZED_ATTRIBUTE_METADATA
See Also:
Constant Field Values

DEFAULT_LOCALE_ATTRIBUTE_KEY

public static final java.lang.String DEFAULT_LOCALE_ATTRIBUTE_KEY
See Also:
Constant Field Values
Constructor Detail

Attribute

public Attribute()
Method Detail

setDisplayName

public void setDisplayName(java.lang.String displayName)
Parameters:
displayName - the displayName to set

getDisplayName

public java.lang.String getDisplayName()
Returns:
the displayName

setDescription

public void setDescription(java.lang.String description)
Parameters:
description - the description to set

getDescription

public java.lang.String getDescription()
Returns:
the description

isManaged

public boolean isManaged()
Indicates if this attribute is a Managed Attribute in Endeca Server. Managed attributes have a predefined value space, can be hierarchical, and can provide different additional metadata on value nodes (such as value display name).

Returns:
true if this attribute is a managed attribute

setManaged

public void setManaged(boolean managed)

getDisplayName

public java.lang.String getDisplayName(java.lang.String languageId)
Get display name by language id

Parameters:
languageId -
Returns:

getDisplayName

public java.lang.String getDisplayName(java.util.Locale locale)
Get display name by locale settings

Parameters:
locale -
Returns:

getDisplayName

public java.lang.String getDisplayName(javax.portlet.PortletRequest request)
Get display name by request

Parameters:
locale -
Returns:

setLocalizedDisplayName

public void setLocalizedDisplayName(java.lang.String displayName)
Parameters:
LocalizedDisplayName - the LocalizedDisplayName to set

getLocalizedDisplayName

public java.lang.String getLocalizedDisplayName()
Returns:
the LocalizedDisplayName

getDescription

public java.lang.String getDescription(java.lang.String languageId)
Get description by language id

Parameters:
languageId -
Returns:

getDescription

public java.lang.String getDescription(java.util.Locale locale)
Get description by locale settings

Parameters:
locale -
Returns:

getDescription

public java.lang.String getDescription(javax.portlet.PortletRequest request)
Get description by request

Parameters:
locale -
Returns:

setLocalizedDescription

public void setLocalizedDescription(java.lang.String description)
Parameters:
LocalizedDescription - the LocalizedDescription to set

getLocalizedDescription

public java.lang.String getLocalizedDescription()
Returns:
the LocalizedDescription

setLocalizedAttributeMetadata

public void setLocalizedAttributeMetadata(java.lang.String value)
Set default locale attribute key for this attribute

Parameters:
attributeKey -

getLocalizedAttributeMetadata

public java.lang.String getLocalizedAttributeMetadata()
Get default locale attribute key for this attribute

Returns:

getLocalizedAttributeMetadataMap

public java.util.Map<java.lang.String,java.lang.String> getLocalizedAttributeMetadataMap()
Utility function to get the locale-attribute mappings in a Map object.

Returns:
Map of locale code to localized attribute key; returns null if there are no localizations for this Attribute

setDefaultLocaleAttributeKey

public void setDefaultLocaleAttributeKey(java.lang.String attributeKey)
Set default locale attribute key for this attribute

Parameters:
attributeKey -

getDefaultLocaleAttributeKey

public java.lang.String getDefaultLocaleAttributeKey()
Get default locale attribute key for this attribute

Returns:

setRefinementSortOrder

public void setRefinementSortOrder(java.lang.String sortOrder)
Sets the refinement sort order (e.g. lexical, record count). Note that this method does NOT validate the input against the Sort enum in the config service; since this is a model, we leave that to higher-level logic to deal with.

Parameters:
sortOrder - the refinement sort order to set

getRefinementSortOrder

public java.lang.String getRefinementSortOrder()
Returns:
the sort order for refinements

isDimension

public boolean isDimension()
Indicates if this attribute is designated as a Dimension in the EID Studio context. Dimensions in EID Studio can be used as axes in charts and pivot tables, for example. Dimensions are often contrasted with Metrics in EID Studio. This concept of Dimension shouldn't be confused with Endeca Server's concept of Dimension, which refers to managed attribute's historical name in the Endeca product line. For that, use isManaged().

Returns:
true if this attribute is designated as a Dimension in EID Studio

isUnique

public boolean isUnique()
Indicates if this attribute is marked unique in the Endeca Server metadata, meaning no two records can share the same value for such an attribute.

Returns:
true if this is attribute is marked unique

isSingleAssign

public boolean isSingleAssign()
Indicates if this attribute is marked single-assign in the Endeca Server metadata, meaning a single record can have only a single assignment for this attribute. Default behavior if single-assign setting is omitted is for an attribute to be single-assign.

Returns:
true if this is attribute is single-assign

getRefinementSelectionMode

public RefinementSelectionMode getRefinementSelectionMode()
Gets the refinement selection mode of this attribute.

Returns:
RefinementSelectionMode indicating mode. If unknown, single-select is returned.

isAttributeValueSearchEnabled

public boolean isAttributeValueSearchEnabled()
Indicates if this attribute is enabled for and can be used in a value search.

Returns:
true if the attribute is value searchable

isNavigable

public boolean isNavigable()
Deprecated. As of MDEX 7 this is no longer relevant; all attributes are navigable

TODO: clean up references to this method


getType

public PropertyType getType()
Gets the data type of this attribute.

Returns:
PropertyType indicating the attribute's data type. It could be PropertyType.UNKNOWN if no type information is available.