Call the CasCrawler.listCrawls() method to list the existing crawls.
The syntax of the method is:
CasCrawler.listCrawls()
The method returns a List<CrawlId> object, which has zero or more CrawlId objects.
Each CrawlId has the name of a crawl.
To list the set of existing crawls:
Make sure that you have created a connection to the CAS Server. (A
CasCrawlerobject namedcrawleris used in this example.)Use the
CasCrawler.listCrawls()method to return a list of crawl names.For example:
List<CrawlId> crawlList = crawler.listCrawls();
Call the
CrawlId.getId()method to get the actual name (as a string) of each crawl.
You can also use the following to print out the number of crawls:
System.out.println("There are " + crawler.listCrawls().size() + " crawls configured");
The CasCrawler.listCrawls() method
does not throw an exception if it fails.

