public interface Resource { // The initialize() method requires a TTDFactory instance // (which the factory uses to create the TTDItem instances // it returns from the select() method in response to a // query) and a String array (which contains the arguments // from the configuration file). public void initialize(TTDFactory ttdfactory, String [] arstring) throws ResourceException; // The select() method requires a String instance that // defines the selection criteria. It returns an array // of TTDItems, one for each entry that matches the // selection criteria. public TTDItem [] select(String stringSelector) throws ResourceException; } Resource 接口定义资源的结构和行为。