Clover coverage report - Apache Addressing - 1.0
Coverage timestamp: Tue Mar 22 2005 07:59:24 EST
file stats: LOC: 88   Methods: 5
NCLOC: 36   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
PortType.java - 66.7% 80% 70.6%
coverage coverage
 1   
 /*
 2   
  * Copyright  1999-2004 The Apache Software Foundation.
 3   
  *
 4   
  *  Licensed under the Apache License, Version 2.0 (the "License");
 5   
  *  you may not use this file except in compliance with the License.
 6   
  *  You may obtain a copy of the License at
 7   
  *
 8   
  *      http://www.apache.org/licenses/LICENSE-2.0
 9   
  *
 10   
  *  Unless required by applicable law or agreed to in writing, software
 11   
  *  distributed under the License is distributed on an "AS IS" BASIS,
 12   
  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13   
  *  See the License for the specific language governing permissions and
 14   
  *  limitations under the License.
 15   
  *
 16   
  */
 17   
 
 18   
 package org.apache.axis.message.addressing;
 19   
 
 20   
 import javax.xml.soap.SOAPElement;
 21   
 
 22   
 import org.apache.axis.utils.XMLUtils;
 23   
 
 24   
 import org.apache.axis.message.addressing.util.TextExtractor;
 25   
 
 26   
 import org.w3c.dom.Element;
 27   
 
 28   
 import javax.xml.namespace.QName;
 29   
 
 30   
 /**
 31   
  * Class PortType
 32   
  * 
 33   
  * @author Davanum Srinivas (dims@yahoo.com)
 34   
  */
 35   
 public class PortType extends AttributedQName {
 36   
     /**
 37   
      * Constructor PortType
 38   
      * 
 39   
      * @param qname 
 40   
      */
 41  9
     public PortType(QName qname) {
 42  9
         super(qname);
 43   
     }
 44   
 
 45   
     /**
 46   
      * Constructor PortType
 47   
      * 
 48   
      * @param namespace
 49   
      * @param localName
 50   
      */
 51  1
     public PortType(String namespace, 
 52   
                     String localName) {
 53  1
         super(namespace, localName);
 54   
     }
 55   
 
 56   
     /**
 57   
      * append DOM node to parent
 58   
      * 
 59   
      * @param parent 
 60   
      */
 61  0
     public void append(Element parent) {
 62  0
         Element pt = parent.getOwnerDocument().createElementNS(
 63   
                          Constants.NS_URI_ADDRESSING_DEFAULT,
 64   
                          Constants.PORT_TYPE
 65   
                      );
 66  0
         String value = XMLUtils.getStringForQName(this, pt);
 67  0
         pt.appendChild(parent.getOwnerDocument().createTextNode(value));
 68  0
         parent.appendChild(pt);
 69   
     }
 70   
 
 71  4
     public static PortType fromSOAPElement(SOAPElement element) 
 72   
         throws Exception {
 73  4
         String value = TextExtractor.getText(element);
 74  4
         QName qname = TextExtractor.getQName(value, element);
 75  4
         return new PortType(qname);
 76   
     }
 77   
 
 78  1
     public static PortType fromElement(Element element) 
 79   
         throws Exception {
 80  1
         String value = TextExtractor.getText(element);
 81  1
         QName qname = XMLUtils.getQNameFromString(value, element);
 82  1
         return new PortType(qname);
 83   
     }
 84   
     
 85   
 }
 86   
 
 87   
 
 88