use of org.obeonetwork.dsl.soa.Component in project InformationSystem by ObeoNetwork.
the class SOAService method allComponents.
public List<Component> allComponents(System context) {
EcoreService ecoreService = new EcoreService();
// Retrieve allRoots
Collection<EObject> allRoots = ecoreService.allRoots(context);
List<Component> components = new ArrayList<Component>();
// For all roots retrieve all elements of type Component
for (EObject object : allRoots) {
List<Component> allContainedEntities = new ArrayList<Component>();
for (EObject obj : EcoreService.eAllContents(object, Component.class)) {
allContainedEntities.add((Component) obj);
}
components.addAll(allContainedEntities);
}
return components;
}
use of org.obeonetwork.dsl.soa.Component in project InformationSystem by ObeoNetwork.
the class WireItemProvider method getProvidedServices.
/**
* Return the provided services in a System.
* @param system
* @return providedServices
* @generated NOT
* @added
*/
private List<Service> getProvidedServices(System system) {
List<Service> providedServices = new ArrayList<Service>();
List<Component> ownedComponents = system.getOwnedComponents();
for (Component component : ownedComponents) {
providedServices.addAll(component.getProvidedServices());
}
return providedServices;
}
Aggregations