01: package org.griphyn.cPlanner.selector.transformation;
02:
03: import org.griphyn.cPlanner.selector.TransformationSelector;
04:
05: import org.griphyn.common.catalog.TransformationCatalogEntry;
06: import org.griphyn.common.classes.TCType;
07:
08: import java.util.ArrayList;
09: import java.util.Iterator;
10: import java.util.List;
11:
12: /**
13: * This implementation of the Selector returns a list of TransformationCatalogEntry objects of type INSTALLED y on the submit site.
14: *
15: * @author Gaurang Mehta
16: *
17: * @version $Revision: 50 $
18: */
19:
20: public class Installed extends TransformationSelector {
21:
22: /**
23: * Returns a list of TransformationCatalogEntry objects of type installed
24: * from a List of valid TCEntries
25: * @param tcentries List The original list containing TransformationCatalogEntries.
26: * @return List returns a List of TransformationCatalogEntry objects of type INSTALLED
27: *
28: */
29: public List getTCEntry(List tcentries) {
30: List results = null;
31: for (Iterator i = tcentries.iterator(); i.hasNext();) {
32: TransformationCatalogEntry tc = (TransformationCatalogEntry) i
33: .next();
34: if (tc.getType().equals(TCType.INSTALLED)) {
35: if (results == null) {
36: results = new ArrayList(5);
37: }
38: results.add(tc);
39: }
40: }
41: return results;
42: }
43: }
|