A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse.xml.core / src / net / sourceforge / phpeclipse / xml / core / internal / parser / DefaultProblem.java
1 /*
2  * Copyright (c) 2003-2004 Christopher Lenz and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  * 
8  * Contributors:
9  *     Christopher Lenz - initial API and implementation
10  * 
11  * $Id: DefaultProblem.java,v 1.2 2006-10-21 23:13:43 pombredanne Exp $
12  */
13
14 package net.sourceforge.phpeclipse.xml.core.internal.parser;
15
16 import net.sourceforge.phpeclipse.xml.core.parser.IProblem;
17
18 public class DefaultProblem implements IProblem {
19
20         // Instance Variables ------------------------------------------------------
21
22         private String message;
23
24         private int sourceStart;
25
26         private int sourceEnd;
27
28         private int sourceLineNumber;
29
30         private boolean error;
31
32         // Constructors ------------------------------------------------------------
33
34         public DefaultProblem(String message, int sourceStart, int sourceEnd,
35                         int sourceLineNumber, boolean error) {
36                 this.message = message;
37                 this.sourceStart = sourceStart;
38                 this.sourceEnd = sourceEnd;
39                 this.sourceLineNumber = sourceLineNumber;
40                 this.error = error;
41         }
42
43         // IProblem Implementation -------------------------------------------------
44
45         /*
46          * @see IProblem#getMessage()
47          */
48         public String getMessage() {
49                 return message;
50         }
51
52         /*
53          * @see IProblem#getSourceStart()
54          */
55         public int getSourceStart() {
56                 return sourceStart;
57         }
58
59         /*
60          * @see IProblem#getSourceEnd()
61          */
62         public int getSourceEnd() {
63                 return sourceEnd;
64         }
65
66         /*
67          * @see IProblem#getSourceLineNumber()
68          */
69         public int getSourceLineNumber() {
70                 return sourceLineNumber;
71         }
72
73         /*
74          * @see IProblem#isError()
75          */
76         public boolean isError() {
77                 return error;
78         }
79
80         /*
81          * @see IProblem#isWarning()
82          */
83         public boolean isWarning() {
84                 return !error;
85         }
86
87 }