public void removeDescriptor(IArtifactKey key, IProgressMonitor monitor) {
   for (IArtifactDescriptor nextDescriptor : artifactDescriptors) {
     if (key.equals(nextDescriptor.getArtifactKey())) artifactDescriptors.remove(nextDescriptor);
   }
   if (keysToLocations.containsKey(key)) {
     URI theLocation = keysToLocations.get(key);
     locationsToContents.remove(theLocation);
     keysToLocations.remove(key);
   }
 }
 public void removeAll(IProgressMonitor monitor) {
   artifactDescriptors.clear();
   keysToLocations.clear();
   locationsToContents.clear();
 }
 public void addDescriptor(IArtifactDescriptor descriptor, IProgressMonitor monitor) {
   ((ArtifactDescriptor) descriptor).setRepository(this);
   artifactDescriptors.add(descriptor);
   keysToLocations.put(descriptor.getArtifactKey(), null);
 }