List allServices = new Vector();
//declared services
for(Iterator i=fServiceElements.iterator(); i.hasNext(); )
{
Service service = (Service)i.next();
if(!containsComponent(service, allServices)) {
((ServiceImpl)service).setDescriptionComponent(this);
allServices.add(service);
}
}
//nested services
List nestedDescs = new Vector(getNestedDescriptions());
for(Iterator i=nestedDescs.iterator(); i.hasNext(); )
{
DescriptionElement desc = (DescriptionElement)i.next();
ServiceElement[] services = desc.getServiceElements();
for(int j=0; j<services.length; j++)
{
Service service = (Service)services[j];
if(!containsComponent(service, allServices)) {
((ServiceImpl)service).setDescriptionComponent(this);
allServices.add(service);
}
}