use of org.eclipse.emf.cdo.eresource.CDOResourceNode in project InformationSystem by ObeoNetwork.
the class EmbeddedCDOServer method getRemoteProjectsURIs.
private Collection<URI> getRemoteProjectsURIs(CDOTransaction transaction) {
Collection<URI> remoteProjectsURIs = new ArrayList<URI>();
CDOResource rootResource = transaction.getRootResource();
for (EObject object : rootResource.getContents()) {
// CDOResourceNode
if (object instanceof CDOResourceFolder) {
// Search in folder
remoteProjectsURIs.addAll(getRemoteProjectsURIs((CDOResourceFolder) object));
} else if (object instanceof CDOResourceNode) {
CDOResourceNode node = (CDOResourceNode) object;
if (isSessionResource(node)) {
remoteProjectsURIs.add(node.getURI());
}
}
}
return remoteProjectsURIs;
}
Aggregations