What is Endeca Dimension Groups?
Dimension groups allow you to organize dimensions into groupings for presentation purposes.
Dimension groups allow you to organize dimensions into groupings for presentation purposes.
Dimension groups allow the user to select dimension values from each of the dimensions contained in them.
How to define it using Endeca Pipeline?
Example: Discover Electronics Application
How it Looks in the the Endeca reference application?
How to retrieve it on Front end application?
Code Snippet:
package com.endeca.presentation;
import com.endeca.navigation.DimGroup;
import com.endeca.navigation.DimGroupList;
import com.endeca.navigation.DimValIdList;
import com.endeca.navigation.Dimension;
import com.endeca.navigation.DimensionList;
import com.endeca.navigation.ENEConnection;
import com.endeca.navigation.ENEQuery;
import com.endeca.navigation.ENEQueryException;
import com.endeca.navigation.ENEQueryResults;
import com.endeca.navigation.HttpENEConnection;
/**
*
* @author Ravi Honakamble
*
*/
public class DimensionGroupClient {
private static final String MDEX_HOST = "localhost";
private static final Integer MDEX_PORT = 15000;
/**
* @param args
* @throws ENEQueryException
*/
public static void main(final String[] args) throws ENEQueryException {
final ENEQueryResults results = createConnection().query(createNavigationQuery("0"));
final DimGroupList dimGroupList = results.getNavigation().getCompleteDimGroups();
for(final Object element : dimGroupList){
final DimGroup dimGroup = (DimGroup) element;
System.out.println(dimGroup.getId());
System.out.println(dimGroup.getName());
}
}
private static ENEQuery createNavigationQuery(final String nValue) {
final ENEQuery query = new ENEQuery();
final DimValIdList dimValIdList = new DimValIdList(nValue);
query.setNavDescriptors(dimValIdList);
query.setNavNumERecs(100);
return query;
}
/**
* @return
*/
private static ENEConnection createConnection() {
return new HttpENEConnection(MDEX_HOST, MDEX_PORT);
}
}
How to define it using Endeca Pipeline?
Example: Discover Electronics Application
How it Looks in the the Endeca reference application?
Code Snippet:
package com.endeca.presentation;
import com.endeca.navigation.DimGroup;
import com.endeca.navigation.DimGroupList;
import com.endeca.navigation.DimValIdList;
import com.endeca.navigation.Dimension;
import com.endeca.navigation.DimensionList;
import com.endeca.navigation.ENEConnection;
import com.endeca.navigation.ENEQuery;
import com.endeca.navigation.ENEQueryException;
import com.endeca.navigation.ENEQueryResults;
import com.endeca.navigation.HttpENEConnection;
/**
*
* @author Ravi Honakamble
*
*/
public class DimensionGroupClient {
private static final String MDEX_HOST = "localhost";
private static final Integer MDEX_PORT = 15000;
/**
* @param args
* @throws ENEQueryException
*/
public static void main(final String[] args) throws ENEQueryException {
final ENEQueryResults results = createConnection().query(createNavigationQuery("0"));
final DimGroupList dimGroupList = results.getNavigation().getCompleteDimGroups();
for(final Object element : dimGroupList){
final DimGroup dimGroup = (DimGroup) element;
System.out.println(dimGroup.getId());
System.out.println(dimGroup.getName());
}
}
private static ENEQuery createNavigationQuery(final String nValue) {
final ENEQuery query = new ENEQuery();
final DimValIdList dimValIdList = new DimValIdList(nValue);
query.setNavDescriptors(dimValIdList);
query.setNavNumERecs(100);
return query;
}
/**
* @return
*/
private static ENEConnection createConnection() {
return new HttpENEConnection(MDEX_HOST, MDEX_PORT);
}
}
.
No comments:
Post a Comment