if (resolves.isEmpty()) {
// Identifier lookup is being inconsistent; this often happens when code trips up over
// converting URLs to and from Files
throw new IOException("Could not find " + layerResourceID + " in local catalog");
}
EList resources = new EDataTypeUniqueEList(IGeoResource.class, this,
ProjectPackage.LAYER__GEO_RESOURCES);
LayerResource preferredResource = null;
for (IResolve resolve : resolves) {
if (resolve instanceof IGeoResource) {
LayerResource layerResource = new LayerResource((LayerImpl) layer,
(IGeoResource) resolve);
if (resolve.getID().equals(layerResourceID)) {
resources.add(0, layerResource);
} else {
resources.add(layerResource);
}
if (resolve == resource) {
preferredResource = layerResource;
}
}