if(Debug.isSet("BES")) System.out.println("S4CrawlableDataset sending BES cmd: show "+product); BesAPI.besShowTransaction(product,baos);
if (Debug.isSet("BES")) System.out.println("BESCrawlableDataset sending BES cmd: show " + product); BesAPI.besShowTransaction(product, baos);
    public static Document showInfo(String path)            throws PPTException, BadConfigurationException, IOException, JDOMException, BESException {        ByteArrayOutputStream baos = new ByteArrayOutputStream();        String product = "info for "+"\""+path+"\"";        if(Debug.isSet("BES")) System.out.println("S4CrawlableDataset sending BES cmd: show "+product);        BesAPI.besShowTransaction(product,baos);        if(Debug.isSet("BES")) System.out.println("BES returned:\n"+baos);        // Parse the XML doc into a Document object.        SAXBuilder sb = new SAXBuilder();        Document doc = sb.build(new ByteArrayInputStream(baos.toByteArray()));        // Check for an exception:        besExceptionHandler(doc);        // Prepare the response:        // First find the response Element        Element topDataset = doc.getRootElement().getChild("response").getChild("dataset");        // Disconnect it from it's parent and then rename it.        topDataset.detach();        doc.detachRootElement();        doc.setRootElement(topDataset);        return doc;    }