intial source from ttp://www.sf.net/projects/wdte
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.css.core / src / net / sourceforge / phpeclipse / css / 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.1 2004-09-02 18:07:13 jsurfer Exp $
12  */
13
14 package net.sourceforge.phpeclipse.css.core.internal.parser;
15
16 import net.sourceforge.phpeclipse.css.core.parser.IProblem;
17
18 public class DefaultProblem implements IProblem {
19
20         // Instance Variables ------------------------------------------------------
21
22         private String id;
23
24         private String message;
25
26         private String originatingFileName;
27
28         private int sourceStart;
29
30         private int sourceEnd;
31
32         private int sourceLineNumber;
33
34         private boolean error;
35
36         // Constructors ------------------------------------------------------------
37
38         public DefaultProblem(String id, String message, String originatingFileName,
39                 int sourceStart, int sourceEnd, int sourceLineNumber, boolean error) {
40                 this.id = id;
41                 this.message = message;
42                 this.originatingFileName = originatingFileName;
43                 this.sourceStart = sourceStart;
44                 this.sourceEnd = sourceEnd;
45                 this.sourceLineNumber = sourceLineNumber;
46                 this.error = error;
47         }
48
49         // IProblem Implementation -------------------------------------------------
50
51         /*
52          * @see IProblem#getID()
53          */
54         public String getId() {
55                 return id;
56         }
57
58         /*
59          * @see IProblem#getMessage()
60          */
61         public String getMessage() {
62                 return message;
63         }
64
65         /*
66          * @see IProblem#getOriginatingFileName()
67          */
68         public String getOriginatingFileName() {
69                 return originatingFileName;
70         }
71
72         /*
73          * @see IProblem#getSourceEnd()
74          */
75         public int getSourceEnd() {
76                 return sourceEnd;
77         }
78
79         /*
80          * @see IProblem#getSourceLineNumber()
81          */
82         public int getSourceLineNumber() {
83                 return sourceLineNumber;
84         }
85
86         /*
87          * @see IProblem#getSourceStart()
88          */
89         public int getSourceStart() {
90                 return sourceStart;
91         }
92
93         /*
94          * @see IProblem#isError()
95          */
96         public boolean isError() {
97                 return error;
98         }
99
100         /*
101          * @see IProblem#isWarning()
102          */
103         public boolean isWarning() {
104                 return !error;
105         }
106
107 }