IBM®
跳转到主要内容
    中国 [选择]    使用条款
 
 
Select a scope:Search for:    
    首页    产品    服务与解决方案     支持与下载    个性化服务    
跳转到主要内容

developerWorks 中国  >  XML  >

Working XML: Link management and preparing the future

XM matures, with features enough to publish simple Web sites

developerWorks

返回原文..


Listing 5. MoversSupervisor
		
package org.ananas.xm;
import java.io.*;
import java.util.*;
public class MoversSupervisor
{
   protected Hashtable movers;
   protected Mover copier;
   public MoversSupervisor(Messenger messenger)
      throws XMException
   {
      movers = new Hashtable();
      movers.put("xml",new StylingMover(messenger,this,new File("rules.xsl")));
      copier = new CopyingMover(messenger);
   }
   public Mover getMover(File file)
   {
      Mover mover = (Mover)movers.get(DefaultMoverImpl.getExtension(file));
      return mover == null ? copier : mover;
   }
}		
	   
	   

返回原文.

    关于 IBM 隐私条约 联系 IBM 使用条款