Clover coverage report - ActiveSOAP - 1.0-SNAPSHOT
Coverage timestamp: Wed May 18 2005 17:30:15 BST
file stats: LOC: 59   Methods: 4
NCLOC: 30   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
XMLStreamFactory.java 83.3% 90.9% 100% 90.5%
coverage coverage
 1   
 /** 
 2   
  * 
 3   
  * Copyright 2004 Protique Ltd
 4   
  * 
 5   
  * Licensed under the Apache License, Version 2.0 (the "License"); 
 6   
  * you may not use this file except in compliance with the License. 
 7   
  * 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   
  **/
 18   
 package org.codehaus.activesoap.util;
 19   
 
 20   
 import javax.xml.stream.XMLInputFactory;
 21   
 import javax.xml.stream.XMLOutputFactory;
 22   
 
 23   
 /**
 24   
  * A helper class which holds the input and output factory instances
 25   
  *
 26   
  * @version $Revision: 1.2 $
 27   
  */
 28   
 public class XMLStreamFactory {
 29   
     private XMLInputFactory inputFactory;
 30   
     private XMLOutputFactory outputFactory;
 31   
     private boolean repairingNamespace = false;
 32   
 
 33  79
     public XMLInputFactory getInputFactory() {
 34  79
         if (inputFactory == null) {
 35  78
             inputFactory = XMLInputFactory.newInstance();
 36  78
             inputFactory.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, Boolean.TRUE);
 37   
         }
 38  79
         return inputFactory;
 39   
     }
 40   
 
 41  79
     public XMLOutputFactory getOutputFactory() {
 42  79
         if (outputFactory == null) {
 43  78
             outputFactory = XMLOutputFactory.newInstance();
 44  78
             if (isRepairingNamespace()) {
 45  0
                 outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.TRUE);
 46   
             }
 47   
         }
 48  79
         return outputFactory;
 49   
     }
 50   
 
 51  212
     public boolean isRepairingNamespace() {
 52  212
         return repairingNamespace;
 53   
     }
 54   
 
 55  1
     public void setRepairingNamespace(boolean repairingNamespace) {
 56  1
         this.repairingNamespace = repairingNamespace;
 57   
     }
 58   
 }
 59