Code example for Logger

Methods: fine, finest

0
    } 
 
    public void test1() throws Exception { 
        org.opengis.filter.Filter test = parseDocument("test1.xml");
        LOGGER.fine("filter: " + test.getClass().toString());
        LOGGER.fine("parsed: " + test.toString());
    } 
 
    public void test2() throws Exception { 
        org.opengis.filter.Filter test = parseDocument("test2.xml");
        LOGGER.fine("filter: " + test.getClass().toString());
        LOGGER.fine("parsed: " + test.toString());
    } 
 
    public void test3a() throws Exception { 
        org.opengis.filter.Filter test = parseDocument("test3a.xml");
        LOGGER.fine("filter: " + test.getClass().toString());
        LOGGER.fine("parsed: " + test.toString());
    } 
 
    public void test3b() throws Exception { 
        org.opengis.filter.Filter test = parseDocument("test3b.xml");
        LOGGER.fine("filter: " + test.getClass().toString());
        LOGGER.fine("parsed: " + test.toString());
    } 
 
    public void test4() throws Exception { 
        org.opengis.filter.Filter test = parseDocument("test4.xml");
        LOGGER.fine("filter: " + test.getClass().toString());
        LOGGER.fine("parsed: " + test.toString());
    } 
 
    public void test5() throws Exception { 
        org.opengis.filter.Filter test = parseDocument("test5.xml");
        LOGGER.fine("filter: " + test.getClass().toString());
        LOGGER.fine("parsed: " + test.toString());
    } 
 
    public void test6() throws Exception { 
        org.opengis.filter.Filter test = parseDocument("test6.xml");
        LOGGER.fine("filter: " + test.getClass().toString());
        LOGGER.fine("parsed: " + test.toString());
    } 
 
    public void test8() throws Exception { 
        org.opengis.filter.Filter test = parseDocument("test8.xml");
        LOGGER.fine("filter: " + test.getClass().toString());
        LOGGER.fine("parsed: " + test.toString());
    } 
 
    public void test9() throws Exception { 
        org.opengis.filter.Filter test = parseDocument("test9.xml");
        LOGGER.fine("filter: " + test.getClass().toString());
        LOGGER.fine("parsed: " + test.toString());
    } 
 
    public void test11() throws Exception { 
        org.opengis.filter.Filter test = parseDocument("test11.xml");
        LOGGER.fine("filter: " + test.getClass().toString());
        LOGGER.fine("parsed: " + test.toString());
    } 
 
    public void test12() throws Exception { 
        org.opengis.filter.Filter test = parseDocument("test12.xml");
        LOGGER.fine("filter: " + test.getClass().toString());
        LOGGER.fine("parsed: " + test.toString());
    } 
 
    public void test13() throws Exception { 
        org.opengis.filter.Filter test = parseDocument( "test13.xml");
        LOGGER.fine("filter: " + test.getClass().toString());
        LOGGER.fine("parsed: " + test.toString());
    } 
 
    public void test14() throws Exception { 
        org.opengis.filter.Filter test = parseDocument("test14.xml");
        LOGGER.fine("filter: " + test.getClass().toString());
        LOGGER.fine("parsed: " + test.toString());
    } 
 
    public void test15() throws Exception { 
        org.opengis.filter.Filter test = parseDocument("test15.xml");
        LOGGER.fine("filter: " + test.getClass().toString());
        LOGGER.fine("parsed: " + test.toString());
    } 
 
    public void test16() throws Exception { 
        org.opengis.filter.Filter test = parseDocument("test16.xml");
        LOGGER.fine("filter: " + test.getClass().toString());
        LOGGER.fine("parsed: " + test.toString());
    } 
 
    public void test17() throws Exception { 
        org.opengis.filter.Filter test = parseDocument("test17.xml");
        LOGGER.fine("filter: " + test.getClass().toString());
        LOGGER.fine("parsed: " + test.toString());
    } 
 
    /* 18 and 19 have multiple filters, and only last one will print, 
       but logicSAXParser was messing up with multiple filters, and 
       I used these tests to fix it.  To make these effective the 
       parser test should be able to get multiple filters.  And shouldn't 
       we also be checking the filters generated programmatically, so they 
       fail if things mess up?  I don't have time right now, but maybe 
       some time soon...cholmes */ 
    public void test18() throws Exception { 
        org.opengis.filter.Filter test = parseDocument("test18.xml");
        LOGGER.fine("filter: " + test.getClass().toString());
        LOGGER.fine("parsed: " + test.toString());
    } 
 
    public void test19() throws Exception { 
        org.opengis.filter.Filter test = parseDocument( "test19.xml");
        LOGGER.fine("filter: " + test.getClass().toString());
        LOGGER.fine("parsed: " + test.toString());
    } 
 
    public void test20() throws Exception { 
        org.opengis.filter.Filter test = parseDocument("test20.xml");
 
        LOGGER.fine("filter: " + test.getClass().toString());
        LOGGER.fine("parsed: " + test.toString());
    } 
 
    //public void test27() 
    //throws Exception { 
    //      Filter test = parseDocument(dataFolder+"/test27.xml"); 
    //      LOGGER.fine("filter: " + test.getClass().toString()); 
    //      LOGGER.fine("parsed: " + test.toString()); 
    //}  
    public org.opengis.filter.Filter parseDocument(String uri) throws Exception {
        LOGGER.finest("about to create parser");
 
        SAXParserFactory factory = SAXParserFactory.newInstance();
 
        // chains all the appropriate filters together (in correct order) 
        //  and initiates parsing 
        TestFilterHandler filterHandler = new TestFilterHandler();
        FilterFilter filterFilter = new FilterFilter(filterHandler, null);
        GMLFilterGeometry geometryFilter = new GMLFilterGeometry(filterFilter);
        GMLFilterDocument documentFilter = new GMLFilterDocument(geometryFilter);
 
        //XMLReader parser = XMLReaderFactory.createXMLReader(/*"org.apache.xerces.parsers.SAXParser"*/);  
        // uncomment to use xerces parser 
        //parser.setContentHandler(documentFilter); 
        //parser.parse(uri); 
        SAXParserFactory fac = SAXParserFactory.newInstance();
        SAXParser parser = fac.newSAXParser();
 
        ParserAdapter p = new ParserAdapter(parser.getParser());
        p.setContentHandler(documentFilter);
        LOGGER.fine("just made parser, " + uri);
        p.parse(TestData.getResource(this, uri).toExternalForm());
        LOGGER.finest("just parsed: " + uri);
 
        return filterHandler.getFilter();
    } 
}