Clover coverage report - Code Coverage for hivemind release 1.1-alpha-1
Coverage timestamp: Tue Jan 18 2005 07:55:08 EST
file stats: LOC: 136   Methods: 18
NCLOC: 93   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
ParseMessages.java - 63.2% 61.1% 62.2%
coverage coverage
 1   
 // Copyright 2004, 2005 The Apache Software Foundation
 2   
 //
 3   
 // Licensed under the Apache License, Version 2.0 (the "License");
 4   
 // you may not use this file except in compliance with the License.
 5   
 // You may obtain a copy of the License at
 6   
 //
 7   
 //     http://www.apache.org/licenses/LICENSE-2.0
 8   
 //
 9   
 // Unless required by applicable law or agreed to in writing, software
 10   
 // distributed under the License is distributed on an "AS IS" BASIS,
 11   
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12   
 // See the License for the specific language governing permissions and
 13   
 // limitations under the License.
 14   
 
 15   
 package org.apache.hivemind.parse;
 16   
 
 17   
 import java.util.Collection;
 18   
 
 19   
 import org.apache.hivemind.Location;
 20   
 import org.apache.hivemind.Resource;
 21   
 import org.apache.hivemind.impl.MessageFormatter;
 22   
 import org.apache.hivemind.schema.ElementModel;
 23   
 import org.apache.hivemind.schema.Schema;
 24   
 
 25   
 /**
 26   
  * Messages for the parse package.
 27   
  * 
 28   
  * @author Howard Lewis Ship
 29   
  */
 30   
 final class ParseMessages
 31   
 {
 32   
     private static final MessageFormatter _formatter = new MessageFormatter(ParseMessages.class,
 33   
             "ParseStrings");
 34   
 
 35  1
     public static String dupeAttributeMapping(AttributeMappingDescriptor newDescriptor,
 36   
             AttributeMappingDescriptor existingDescriptor)
 37   
     {
 38  1
         return _formatter.format(
 39   
                 "dupe-attribute-mapping",
 40   
                 newDescriptor.getAttributeName(),
 41   
                 existingDescriptor.getLocation());
 42   
     }
 43   
 
 44  1
     public static String extraMappings(Collection extraNames, ElementModel model)
 45   
     {
 46  1
         return _formatter.format("extra-mappings", extraNames, model.getElementName());
 47   
     }
 48   
 
 49  2
     public static String multipleContributionsSchemas(String configurationId, Location location)
 50   
     {
 51  2
         return _formatter.format("multiple-contributions-schemas", configurationId, location);
 52   
     }
 53   
 
 54  2
     public static String multipleParametersSchemas(String serviceId, Location location)
 55   
     {
 56  2
         return _formatter.format("multiple-parameters-schemas", serviceId, location);
 57   
     }
 58   
 
 59  0
     public static String notModule(String elementName, Location location)
 60   
     {
 61  0
         return _formatter.format("not-module", elementName, location);
 62   
     }
 63   
 
 64  1
     public static String requiredAttribute(String name, String path, Location location)
 65   
     {
 66  1
         return _formatter.format("required-attribute", name, path, location);
 67   
     }
 68   
 
 69  1
     public static String unknownAttribute(String name, String path)
 70   
     {
 71  1
         return _formatter.format("unknown-attribute", name, path);
 72   
     }
 73   
 
 74  0
     public static String booleanAttribute(String value, String name, String path)
 75   
     {
 76  0
         return _formatter.format("boolean-attribute", new Object[]
 77   
         { value, name, path });
 78   
     }
 79   
 
 80  0
     public static String invalidAttributeValue(String value, String name, String path)
 81   
     {
 82  0
         return _formatter.format("invalid-attribute-value", new Object[]
 83   
         { value, name, path });
 84   
 
 85   
     }
 86   
 
 87  0
     public static String invalidNumericValue(String value, String name, String path)
 88   
     {
 89  0
         return _formatter.format("invalid-numeric-value", new Object[]
 90   
         { value, name, path });
 91   
     }
 92   
 
 93  0
     public static String unableToInitialize(Throwable cause)
 94   
     {
 95  0
         return _formatter.format("unable-to-initialize", cause);
 96   
     }
 97   
 
 98  1
     public static String badRuleClass(String className, Location location, Throwable cause)
 99   
     {
 100  1
         return _formatter.format("bad-rule-class", className, location, cause);
 101   
     }
 102   
 
 103  0
     public static String errorReadingDescriptor(Resource resource, Throwable cause)
 104   
     {
 105  0
         return _formatter.format("error-reading-descriptor", resource, cause);
 106   
     }
 107   
 
 108  0
     public static String missingResource(Resource resource)
 109   
     {
 110  0
         return _formatter.format("missing-resource", resource);
 111   
     }
 112   
 
 113  1
     public static String unexpectedElement(String elementName, String elementPath)
 114   
     {
 115  1
         return _formatter.format("unexpected-element", elementName, elementPath);
 116   
     }
 117   
 
 118  3
     public static String invalidAttributeFormat(String attributeName, String value,
 119   
             String elementPath, String formatKey)
 120   
     {
 121  3
         String inputValueFormat = _formatter.getMessage(formatKey);
 122   
 
 123  3
         return _formatter.format("invalid-attribute-format", new Object[]
 124   
         { attributeName, value, elementPath, inputValueFormat });
 125   
     }
 126   
 
 127  1
     public static String duplicateSchema(String schemaId, Schema existingSchema)
 128   
     {
 129  1
         return _formatter.format("duplicate-schema", schemaId, existingSchema.getLocation());
 130   
     }
 131   
     
 132  1
     public static String invalidElementKeyAttribute(String schemaId, Throwable cause)
 133   
     {
 134  1
         return _formatter.format("invalid-element-key-attribute", schemaId, cause);
 135   
     }
 136   
 }