Vector projityResources=new Vector();
//map the existint project resourse impls for later use
_localResourceMap = new HashMap<Long, com.projity.pm.resource.Resource>();
EnterpriseResourceData unassigned=new EnterpriseResourceData();
unassigned.setUniqueId(EnterpriseResource.UNASSIGNED_ID);
unassigned.setName(Messages.getString("Text.Unassigned")); //$NON-NLS-1$
form.setUnassignedResource(unassigned);
projityResources.add(unassigned);
Serializer serializer=new Serializer();
ProjectData projectData=(ProjectData)serializer.serialize(existingProject,ProjectData.FACTORY,null);
if (existingProject.isForceNonIncremental()) projectData.setVersion(0);
projectData.setMaster(existingProject.isMaster());
//resources
Map resourceMap=serializer.saveResources(existingProject,projectData);
List<com.projity.pm.resource.Resource> existingResources=(List<com.projity.pm.resource.Resource>)existingProject.getResourcePool().getResourceList();
for (com.projity.pm.resource.Resource resource:existingResources){
if (resource==null) continue;
ResourceData r=(ResourceData)resourceMap.get(resource.getUniqueId());
if (r!=null){
EnterpriseResourceData er=r.getEnterpriseResource();
er.setName(resource.getName());
projityResources.add(er);
_localResourceMap.put((Long)r.getUniqueId(), resource);
}
}