Clover coverage report -
Coverage timestamp: Sun Nov 1 2009 23:08:24 UTC
file stats: LOC: 95   Methods: 8
NCLOC: 56   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
DocumentBuilderImpl.java 0% 0% 0% 0%
coverage
 1    /*
 2    * Licensed to the Apache Software Foundation (ASF) under one or more
 3    * contributor license agreements. See the NOTICE file distributed with
 4    * this work for additional information regarding copyright ownership.
 5    * The ASF licenses this file to You under the Apache License, Version 2.0
 6    * (the "License"); you may not use this file except in compliance with
 7    * the License. You may obtain a copy of the License at
 8    *
 9    * http://www.apache.org/licenses/LICENSE-2.0
 10    *
 11    * Unless required by applicable law or agreed to in writing, software
 12    * distributed under the License is distributed on an "AS IS" BASIS,
 13    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14    * See the License for the specific language governing permissions and
 15    * limitations under the License.
 16    *
 17    * $Id: DocumentBuilderImpl.java 541508 2007-05-25 01:54:12Z vgritsenko $
 18    */
 19   
 20    package org.apache.xindice.xml.jaxp;
 21   
 22    import org.apache.commons.logging.Log;
 23    import org.apache.commons.logging.LogFactory;
 24    import org.apache.xindice.xml.dom.DOMImplementationImpl;
 25    import org.apache.xindice.xml.dom.DOMParser;
 26    import org.apache.xindice.xml.dom.DocumentImpl;
 27   
 28    import org.w3c.dom.DOMImplementation;
 29    import org.w3c.dom.Document;
 30    import org.xml.sax.EntityResolver;
 31    import org.xml.sax.ErrorHandler;
 32    import org.xml.sax.InputSource;
 33    import org.xml.sax.SAXException;
 34   
 35    import javax.xml.parsers.DocumentBuilder;
 36    import javax.xml.parsers.ParserConfigurationException;
 37    import java.io.IOException;
 38   
 39    /**
 40    * DocumentBuilderImpl
 41    *
 42    * @version $Revision: 541508 $, $Date: 2007-05-24 18:54:12 -0700 (Thu, 24 May 2007) $
 43    */
 44    public class DocumentBuilderImpl extends DocumentBuilder {
 45   
 46    private static final Log log = LogFactory.getLog(DocumentBuilderImpl.class);
 47   
 48    private DOMParser parser = null;
 49    private ErrorHandler errors = null;
 50    private EntityResolver entities = null;
 51   
 52   
 53  0 protected DocumentBuilderImpl() throws ParserConfigurationException {
 54  0 try {
 55  0 parser = new DOMParser();
 56    } catch (Exception e) {
 57  0 if (log.isWarnEnabled()) {
 58  0 log.warn("ignored exception", e);
 59    }
 60    }
 61    }
 62   
 63  0 public DOMImplementation getDOMImplementation() {
 64  0 return DOMImplementationImpl.getInstance();
 65    }
 66   
 67  0 public boolean isNamespaceAware() {
 68  0 return true;
 69    }
 70   
 71  0 public boolean isValidating() {
 72  0 return false;
 73    }
 74   
 75  0 public void setErrorHandler(ErrorHandler errors) {
 76  0 this.errors = errors;
 77    }
 78   
 79  0 public void setEntityResolver(EntityResolver entities) {
 80  0 this.entities = entities;
 81    }
 82   
 83  0 public Document parse(InputSource source) throws SAXException, IOException, IllegalArgumentException {
 84  0 if (source == null) {
 85  0 throw new IllegalArgumentException();
 86    } else {
 87  0 parser.parse(source);
 88    }
 89  0 return parser.getDocument();
 90    }
 91   
 92  0 public Document newDocument() {
 93  0 return new DocumentImpl();
 94    }
 95    }