-
Interface Summary
Interface |
Description |
SimpleListExtension |
|
SleEntry |
This is a parse only module that holds the values of enternal fields declared in the SLE
module.
|
-
Class Summary
Class |
Description |
SimpleListExtensionImpl |
|
SleEntryImpl |
This is a parse only module that holds the values of enternal fields declared in the SLE
module.
|
SleUtility |
This is a utiltiy class for grouping and sorting lists of entries based on the SLE.
|
Package com.rometools.modules.sle Description
This is a module that supports the Microsoft Simple List Extensions.
This is a feed-level module. However, for the purposes of sorting and goupding
it provides the SleEntry module, which is dynamically generated with values for
sorting and grouping.
Sample Usage:
SimpleListExtension sle = (SimpleListExtension) feed.getModule( SimpleListExtension.URI );
System.out.println( sle );
Group[] groups = sle.getGroupFields();
System.out.println( groups[0].getLabel() );
//You can use the SleUtility class to do sorting and grouping:
List sortedEntries = SleUtility.sort( feed.getEntries(), sle.getSortFields()[1], true );
SyndEntry entry = (SyndEntry) sortedEntries.get( 0 );
//You can also Group or Sort and Group
List sortedAndGroupedEntries = SleUtility.sortAndGroup( feed.getEntries, sle.getGroupFields(), sle.getSortFields()[0], false );
// If you change, for instance, module values on a feed and want to reinitialize it for
// grouping and sorting...
SleUtility.initializeForSorting( feed );
// Be aware, this is a VERY heavy operation and should not be used frequently.