01: package org.andromda.metafacades.emf.uml2;
02:
03: import java.util.ArrayList;
04: import java.util.Collection;
05: import java.util.Iterator;
06: import java.util.List;
07:
08: import org.andromda.metafacades.uml.FrontEndController;
09: import org.andromda.metafacades.uml.FrontEndUseCase;
10:
11: /**
12: * MetafacadeLogic implementation for
13: * org.andromda.metafacades.uml.FrontEndPackage.
14: *
15: * @see org.andromda.metafacades.uml.FrontEndPackage
16: */
17: public class FrontEndPackageLogicImpl extends FrontEndPackageLogic {
18: public FrontEndPackageLogicImpl(final Object metaObject,
19: final String context) {
20: super (metaObject, context);
21: }
22:
23: /**
24: * @see org.andromda.metafacades.uml.FrontEndPackage#getFrontEndUseCases()
25: */
26: protected java.util.List handleGetFrontEndUseCases() {
27: final List useCases = new ArrayList();
28: final Collection ownedElements = this .getOwnedElements();
29: for (final Iterator elementIterator = ownedElements.iterator(); elementIterator
30: .hasNext();) {
31: final Object object = elementIterator.next();
32: if (object instanceof FrontEndUseCase) {
33: useCases.add(object);
34: }
35: }
36: return useCases;
37: }
38:
39: /**
40: * @see org.andromda.metafacades.uml.FrontEndPackage#getFrontEndControllers()
41: */
42: protected java.util.List handleGetFrontEndControllers() {
43: final List useCases = new ArrayList();
44: final Collection ownedElements = this .getOwnedElements();
45: for (final Iterator elementIterator = ownedElements.iterator(); elementIterator
46: .hasNext();) {
47: final Object object = elementIterator.next();
48: if (object instanceof FrontEndController) {
49: useCases.add(object);
50: }
51: }
52: return useCases;
53: }
54: }
|