com.endeca.portal.attributes.viewmodel
Class SemanticView

java.lang.Object
  extended by com.endeca.portal.attributes.viewmodel.SemanticView

public class SemanticView
extends java.lang.Object

This class represents the top-level container for the Unified Attribute Model (UAM). It contains attribute and group hash map collections, as well as an ordered list representing the order of groups. Instances of this class can be converted to JSON using Jackson.

Author:
Endeca Technologies,, Inc

Field Summary
static java.lang.String PERMANENT_GROUP_ALL_DN
           
static java.lang.String PERMANENT_GROUP_ALL_KEY
           
static java.lang.String PERMANENT_GROUP_OTHER_DN
           
static java.lang.String PERMANENT_GROUP_OTHER_KEY
           
 
Constructor Summary
SemanticView()
           
 
Method Summary
 SemanticView copyBPCs()
          This method creates a shallow copy of SemanticView by cloning it's containers (attributes, predefinedMetrics, metadata, groups and GroupOrder).
 Group getAllGroup()
          Get all group, create the all group dynamically
 BPCFilter getAttributeFilter()
          An AttributeSettings instance can contain pre-constructed BPC filters for attributes and groups.
 java.util.HashMap<java.lang.String,Attribute> getAttributes()
           
 BPCFilter getGroupFilter()
          An AttributeSettings instance can contain pre-constructed BPC filters for attributes and groups.
 java.util.List<java.lang.String> getGroupOrder()
           
 java.util.HashMap<java.lang.String,Group> getGroups()
           
 ViewMetadata getMetadata()
           
 java.util.List<java.lang.String> getOtherAttrKeys()
           
 Group getOtherGroup()
          Get other group, create the other group dynamically
 java.util.LinkedHashMap<java.lang.String,PrefinedMetric> getPredefinedMetrics()
           
 Group getRealOtherGroup()
           
 void setAllGroup(Group allGroup)
           
 void setAttributeFilter(BPCFilter attributeFilter)
           
 void setAttributes(java.util.HashMap<java.lang.String,Attribute> attributes)
           
 void setGroupFilter(BPCFilter groupFilter)
           
 void setGroupOrder(java.util.List<java.lang.String> groupOrder)
           
 void setGroups(java.util.HashMap<java.lang.String,Group> groups)
           
 void setMetadata(ViewMetadata metadata)
           
 void setOtherGroup(Group otherGroup)
           
 void setPredefinedMetrics(java.util.LinkedHashMap<java.lang.String,PrefinedMetric> predefinedMetrics)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PERMANENT_GROUP_ALL_KEY

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

PERMANENT_GROUP_ALL_DN

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

PERMANENT_GROUP_OTHER_KEY

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

PERMANENT_GROUP_OTHER_DN

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

SemanticView

public SemanticView()
Method Detail

setAttributes

public void setAttributes(java.util.HashMap<java.lang.String,Attribute> attributes)
Parameters:
attributes - the attributes to set

getAttributes

public java.util.HashMap<java.lang.String,Attribute> getAttributes()
Returns:
the attributes

setGroups

public void setGroups(java.util.HashMap<java.lang.String,Group> groups)
Parameters:
groups - the groups to set

getGroups

public java.util.HashMap<java.lang.String,Group> getGroups()
Returns:
the groups

setGroupOrder

public void setGroupOrder(java.util.List<java.lang.String> groupOrder)
Parameters:
groupOrder - the groupOrder to set

getGroupOrder

public java.util.List<java.lang.String> getGroupOrder()
Returns:
the groupOrder

setAttributeFilter

public void setAttributeFilter(BPCFilter attributeFilter)
Parameters:
attributeFilter - the attributeFilter to set

getAttributeFilter

public BPCFilter getAttributeFilter()
An AttributeSettings instance can contain pre-constructed BPC filters for attributes and groups. These filter objects can be used as a convenience mechanism for storing a filter constructed based on the information contained in the global settings. These filter objects will be cached along with this AttributeSettings instance and can be reused by various portlets during merging.

Returns:
the attribute filter or null if it has not been set

setGroupFilter

public void setGroupFilter(BPCFilter groupFilter)
Parameters:
groupFilter - the groupFilter to set

getGroupFilter

public BPCFilter getGroupFilter()
An AttributeSettings instance can contain pre-constructed BPC filters for attributes and groups. These filter objects can be used as a convenience mechanism for storing a filter constructed based on the information contained in the global settings. These filter objects will be cached along with this AttributeSettings instance and can be reused by various portlets during merging.

Returns:
the group filter or null if it has not been set

getPredefinedMetrics

public java.util.LinkedHashMap<java.lang.String,PrefinedMetric> getPredefinedMetrics()

setPredefinedMetrics

public void setPredefinedMetrics(java.util.LinkedHashMap<java.lang.String,PrefinedMetric> predefinedMetrics)

getMetadata

public ViewMetadata getMetadata()

setMetadata

public void setMetadata(ViewMetadata metadata)

setAllGroup

public void setAllGroup(Group allGroup)
Parameters:
allGroup -

getAllGroup

public Group getAllGroup()
Get all group, create the all group dynamically

Returns:

setOtherGroup

public void setOtherGroup(Group otherGroup)

getOtherGroup

public Group getOtherGroup()
Get other group, create the other group dynamically

Returns:

getOtherAttrKeys

public java.util.List<java.lang.String> getOtherAttrKeys()

getRealOtherGroup

public Group getRealOtherGroup()

copyBPCs

public SemanticView copyBPCs()
This method creates a shallow copy of SemanticView by cloning it's containers (attributes, predefinedMetrics, metadata, groups and GroupOrder). The members of these containers are added by reference, so any change to these will be changed in both the new copy and the existing version. However, this method will allow you to add/delete members of these containers without effecting the original version.

Returns:
SemanticView