1 /**
2 * Copyright (C) 2014-2015 Philip Helger (www.helger.com)
3 * philip[at]helger[dot]com
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 package com.helger.schematron.svrl;
18
19 import javax.annotation.Nonnull;
20
21 import org.oclc.purl.dsdl.svrl.FailedAssert;
22 import org.oclc.purl.dsdl.svrl.SuccessfulReport;
23
24 import com.helger.commons.error.IErrorLevel;
25
26 /**
27 * Interface that helps in determining an error level from SVRL elements.
28 *
29 * @author Philip Helger
30 */
31 public interface ISVRLErrorLevelDeterminator
32 {
33 /**
34 * Get the error level associated with a single failed assertion.
35 *
36 * @param aFailedAssert
37 * The failed assert to be queried. May not be <code>null</code>.
38 * @return The error level and never <code>null</code>.
39 */
40 @Nonnull
41 IErrorLevel getErrorLevelFromFailedAssert (@Nonnull FailedAssert aFailedAssert);
42
43 /**
44 * Get the error level associated with a single successful report.
45 *
46 * @param aSuccessfulReport
47 * The failed assert to be queried. May not be <code>null</code>.
48 * @return The error level and never <code>null</code>.
49 */
50 @Nonnull
51 IErrorLevel getErrorLevelFromSuccessfulReport (@Nonnull SuccessfulReport aSuccessfulReport);
52 }