public static  Vector replaceSourcesWithId(Vector srcs,
					       String serverName) {

	Vector replacedSrcs = new Vector();
	Object obj;
	for (int i=0; i<srcs.size(); i++) {
	    obj = srcs.elementAt(i);
	    if (obj instanceof RMIServerProxy) {
		RMIServerProxy rmisp = (RMIServerProxy)obj;
		if (rmisp.getServerName().equalsIgnoreCase(serverName)){
		    replacedSrcs.add(rmisp.getRMIID().toString());
		} else {
		    String str = 
			new String(rmisp.getServerName()+
				   "::"+rmisp.getRMIID());
		    replacedSrcs.add(str);
		}
	    } else if (obj instanceof RemoteRenderedOp){
		RemoteRenderedOp rrop = (RemoteRenderedOp)obj;
		Object ai = rrop.getRendering();
		if (ai instanceof RMIServerProxy) {
		    RMIServerProxy rmisp = (RMIServerProxy)ai;
		    if (rmisp.getServerName().equalsIgnoreCase(serverName)){
			replacedSrcs.add(rmisp.getRMIID().toString());
		    } else {
			String str = 
			    new String(rmisp.getServerName()+
				       "::"+rmisp.getRMIID());
			replacedSrcs.add(str);
		    }
		} else {
		    RenderedImage ri = (RenderedImage)ai;
		    replacedSrcs.add(new SerializableRenderedImage(ri));
		}
	    } else if (obj instanceof RenderedOp){
		RenderedOp rop = (RenderedOp)obj;
		replacedSrcs.add(new SerializableRenderedImage(
					  (RenderedImage)rop.getRendering()));
	    } else if (obj instanceof Serializable) {
		replacedSrcs.add(obj);
	    } else if (obj instanceof RenderedImage) {
		RenderedImage ri = (RenderedImage)obj;
		replacedSrcs.add(new SerializableRenderedImage(ri));
	    }
	}

	return replacedSrcs;					      
    }