com.endeca.mobile.abstraction
Class ContentAbstraction

java.lang.Object
  extended by com.endeca.mobile.abstraction.ContentAbstraction

public class ContentAbstraction
extends java.lang.Object


Constructor Summary
ContentAbstraction()
           
 
Method Summary
static java.util.HashMap abstractifyContentItem(com.endeca.content.ContentItem ci, int numLinks, AbstractionContext context)
          Converts the specified content item to a form suitable for serialization.
static java.util.ArrayList abstractifyContentItemList(com.endeca.content.ContentItemList list, int numLinks, AbstractionContext context)
          Converts the specified list of content items to a form suitable for serialization.
static java.util.ArrayList abstractifyDimensionList(com.endeca.navigation.DimensionList dims, AbstractionContext context)
          Converts the specified list of dimensions to a form suitable for serialization.
static java.util.HashMap abstractifyMetaInfo(com.endeca.content.ene.NavigationRecords navrecs, int numLinks, AbstractionContext context)
          Converts metadata regarding the records in a NavigationRecords object to a form suitable for serialization.
static java.util.HashMap abstractifyNavigationRecords(com.endeca.content.ene.NavigationRecords navrecs, int numLinks, AbstractionContext context)
          Converts the specified NavigationRecords object to a form suitable for serialization.
static java.util.HashMap abstractifyProperty(com.endeca.content.Property p, int numLinks, AbstractionContext context)
          Converts the specified property to a form suitable for serialization.
static java.util.ArrayList abstractifyPropertyList(java.util.List propertyList, int numLinks, AbstractionContext context)
          Converts the specified list of properties to a form suitable for serialization.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentAbstraction

public ContentAbstraction()
Method Detail

abstractifyContentItem

public static java.util.HashMap abstractifyContentItem(com.endeca.content.ContentItem ci,
                                                       int numLinks,
                                                       AbstractionContext context)
Converts the specified content item to a form suitable for serialization.

Parameters:
ci - The content item
numLinks - The number of page links to return as metadata for any record lists found within the given content item
context - The context of the current request
Returns:
A representation of the content item which is ready for serialization

abstractifyContentItemList

public static java.util.ArrayList abstractifyContentItemList(com.endeca.content.ContentItemList list,
                                                             int numLinks,
                                                             AbstractionContext context)
Converts the specified list of content items to a form suitable for serialization.

Parameters:
list - The list
numLinks - The number of page links to return as metadata for any record lists found within the given content items
context - The context of the current request
Returns:
A representation of the content item list which is ready for serialization

abstractifyPropertyList

public static java.util.ArrayList abstractifyPropertyList(java.util.List propertyList,
                                                          int numLinks,
                                                          AbstractionContext context)
Converts the specified list of properties to a form suitable for serialization.

Parameters:
propertyList - The list
numLinks - The number of page links to return as metadata for any record lists found within the given properties
context - The context of the current request
Returns:
A representation of the property list which is ready for serialization

abstractifyProperty

public static java.util.HashMap abstractifyProperty(com.endeca.content.Property p,
                                                    int numLinks,
                                                    AbstractionContext context)
Converts the specified property to a form suitable for serialization.

Parameters:
p - The property
numLinks - The number of page links to return as metadata for any record lists found within the given property
context - The context of the current request
Returns:
A representation of the property which is ready for serialization

abstractifyDimensionList

public static java.util.ArrayList abstractifyDimensionList(com.endeca.navigation.DimensionList dims,
                                                           AbstractionContext context)
Converts the specified list of dimensions to a form suitable for serialization. This method produces the same sort of results as are produced by the RefinementsByGroupAbstraction with the exception that the results of this method do not include representations of dimension groups.

Parameters:
dims - The list
context - The context of the current request
Returns:
A representation of the dimension list which is ready for serialization

abstractifyNavigationRecords

public static java.util.HashMap abstractifyNavigationRecords(com.endeca.content.ene.NavigationRecords navrecs,
                                                             int numLinks,
                                                             AbstractionContext context)
Converts the specified NavigationRecords object to a form suitable for serialization. This method produces the same sort of results as are produced by the ResultSetMetaInfoAbstraction and either the RecordsAbstraction or the AggRecordsAbstraction, as appropriate.

Parameters:
navrecs - The object to convert
numLinks - The number of page links to return as metadata for the records contained in the object
context - The context of the current request
Returns:
A representation of the object which is ready for serialization

abstractifyMetaInfo

public static java.util.HashMap abstractifyMetaInfo(com.endeca.content.ene.NavigationRecords navrecs,
                                                    int numLinks,
                                                    AbstractionContext context)
Converts metadata regarding the records in a NavigationRecords object to a form suitable for serialization. This method produces the same sort of results as are produced by the ResultSetMetaInfoAbstraction with the exception that this method leaves out compute time and key properties.

Parameters:
navrecs - The object from which to extract the metadata
numLinks - The number of page links to return for the object
context - The context of the current request
Returns:
A representation of the metadata which is ready for serialization