View Javadoc
1   /**
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    *  to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    *  with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.creadur.whisker.app.analysis;
20  
21  /**
22   * Enumerates modes of definitional error.
23   */
24  public enum ResourceDefinitionError {
25      /** Expected license definition is missing. */
26      MISSING_LICENSE("Missing license(s)"),
27      /** Duplicate licenses */
28      EXTRA_LICENSE("Extra license(s)"),
29      /** Duplicate resources.  */
30      DUPLICATE("Duplicate resource(s)"),
31      /** Links to source is missing. */
32      MISSING_SOURCE("Missing link to source ");
33  
34      /** Describes this error suitable for display. */
35      private final String description;
36  
37      /**
38       * Constructs an error with the given description.
39       * @param description not null
40       */
41      private ResourceDefinitionError(final String description) {
42          this.description = description;
43      }
44  
45      /**
46       * Gets a description suitable for display.
47       * @return not null
48       */
49      public final String getDescription() {
50          return description;
51      }
52  }