final List<VirtualFile> virtualFiles = vfsUnit.getMetaDataFiles(AbstractDeploymentModelBuilder.WS_FILE_FILTER);
final Set<UnifiedVirtualFile> uVirtualFiles = new HashSet<UnifiedVirtualFile>();
for (VirtualFile vf : virtualFiles)
{
// Adding the roots of the virtual files.
uVirtualFiles.add(new VirtualFileAdaptor(vf));
}
dep.setMetadataFiles(new LinkedList<UnifiedVirtualFile>(uVirtualFiles));
}
if (unit.getParent() != null)
{
final String parentDeploymentName = unit.getParent().getSimpleName();
final ClassLoader parentClassLoader = unit.getParent().getClassLoader();
this.log.debug("Creating new WS deployment model for parent: " + unit.getParent());
final ArchiveDeployment parentDep = this.newDeployment(parentDeploymentName, parentClassLoader);
dep.setParent(parentDep);
}
if (unit instanceof VFSDeploymentUnit)
{
dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit) unit).getRoot()));
}
else
{
dep.setRootFile(new ResourceLoaderAdapter(unit.getClassLoader()));
}