カスタム・データ・ソース・クロールのSourceConfigには、クロールへのカスタム・データ・ソースおよびカスタム・データ・ソースに必要なその他のオプションのプロパティを定義する必須のModuleIdおよびModulePropertyオブジェクトが含まれています。
ias-cmd.bat listModules -t SOURCE Sample Data Source *Id: Sample Data Source *Type: SOURCE *Description: Sample Data Source for Testing ...
カスタム・データ・ソースは、任意の数のモジュール・プロパティを使用できます。プラグインの開発者は、カスタム・データ・ソースに必要なモジュール・プロパティおよびそのモジュール・プロパティがオプションに必要であるかどうかを決定できます。
ias-cmd.bat getModuleSpec -id "Sample Data Source" Sample Data Source ================= [Module Information] *Id: Sample Data Source *Type: SOURCE *Description: Sample Data Source for Testing [Sample Data Source Configuration Properties] Group: Basic Settings --------------------- User name: *Name: username *Type: {http://www.w3.org/2001/XMLSchema}string *Required: true *Max Length: 256 *Description: The name of the user used to log on to the repository *Multiple Values: false *Multiple Lines: false *Password: false *Always Show: true Password: *Name: password *Type: {http://www.w3.org/2001/XMLSchema}string *Required: true *Max Length: 256 *Description: The password used to log on to the repository *Multiple Values: false *Multiple Lines: false *Password: true *Always Show: true ...
// Connect to the IAS Server. ServiceAddress address = new ServiceAddress("localhost", 8401, contextPath); IasCrawlerLocator locator = IasCrawlerLocator.create(address); IasCrawler crawler = locator.getService(); // Create a new crawl Id with the name set to Demo. CrawlId crawlId = new CrawlId("Demo"); // Create the crawl configuration. CrawlConfig crawlConfig = new CrawlConfig(crawlId); // Create the source configuration. SourceConfig sourceConfig = new SourceConfig(); // Create a module ID for a Sample Data Source repository. // Set the module ID in the constructor. ModuleId moduleId = new ModuleId("Sample Data Source"); // Create a list for the module property objects. List<ModuleProperty> cmsPropsList = new ArrayList<ModuleProperty>(); // Create a module property for username. // Set key/values of the module property as strings in the constructor. ModuleProperty uname = new ModuleProperty("username", "SALES\\username"); // Set the module property in the module property list. cmsPropsList.add(uname); // Create a module property for password. // Set key/values of the module property as strings in the constructor. ModuleProperty upass = new ModuleProperty("password", "endeca"); // Set the module property in the module property list. cmsPropsList.add(upass); // Set the module property list in the source configuration. sourceConfig.setModuleProperties(cmsPropsList); // Set the source configuration in the crawl configuration. crawlConfig.setSourceConfig(SourceConfig); // Create the crawl. crawler.createCrawl(crawlConfig);