|
|||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
RDFParserError.java | 0% | 0% | 0% | 0% |
|
1 | /* | |
2 | wsmo4j - a WSMO API and Reference Implementation | |
3 | Copyright (c) 2005, University of Innsbruck, Austria | |
4 | This library is free software; you can redistribute it and/or modify it under | |
5 | the terms of the GNU Lesser General Public License as published by the Free | |
6 | Software Foundation; either version 2.1 of the License, or (at your option) | |
7 | any later version. | |
8 | This library is distributed in the hope that it will be useful, but WITHOUT | |
9 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | |
10 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | |
11 | details. | |
12 | You should have received a copy of the GNU Lesser General Public License along | |
13 | with this library; if not, write to the Free Software Foundation, Inc., | |
14 | 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
15 | */ | |
16 | package org.deri.wsmo4j.io.parser.rdf; | |
17 | ||
18 | /** | |
19 | * This class represents a RDF Parser Error. | |
20 | * | |
21 | * <pre> | |
22 | * Created on Nov 14, 2006 | |
23 | * Committed by $Author: nathaliest $ | |
24 | * $Source$ | |
25 | * </pre> | |
26 | * | |
27 | * @author nathalie.steinmetz@deri.org | |
28 | * @version $Revision: 1876 $ $Date: 2006-11-16 11:53:28 +0200 (Thu, 16 Nov 2006) $ | |
29 | */ | |
30 | public class RDFParserError extends RDFParserMessage { | |
31 | ||
32 | 0 | public RDFParserError(String message, int lineNo, int colNo) { |
33 | 0 | super(message, lineNo, colNo); |
34 | } | |
35 | ||
36 | /** | |
37 | * <p> | |
38 | * The <code>equals</code> method implements an equivalence relation | |
39 | * on non-null object references. RDFParserWarnings are equal if their | |
40 | * warning message and their line and column numbers are equal. | |
41 | * </p> | |
42 | * <p> | |
43 | * It is generally necessary to override the <code>hashCode</code> method whenever this method | |
44 | * is overridden. | |
45 | * </p> | |
46 | * @param o the reference object with which to compare. | |
47 | * @return <code>true</code> if this object is the same as the obj | |
48 | * argument; <code>false</code> otherwise. | |
49 | * @see java.lang.Object#equals(java.lang.Object) | |
50 | * @see java.lang.Object#hashCode() | |
51 | */ | |
52 | 0 | public boolean equals(Object obj) { |
53 | 0 | if (obj instanceof RDFParserError) { |
54 | 0 | RDFParserError w = (RDFParserError) obj; |
55 | 0 | return ((w.getMessage().equals(this.getMessage()) |
56 | && (w.getLine() == this.getLine()) && | |
57 | (w.getColumn() == this.getColumn()))); | |
58 | } | |
59 | 0 | return false; |
60 | } | |
61 | ||
62 | /** | |
63 | * <p> | |
64 | * If two objects are equal according to the <code>equals(Object)</code> method, then calling | |
65 | * the <code>hashCode</code> method on each of the two objects must produce the same integer | |
66 | * result. However, it is not required that if two objects are unequal according to | |
67 | * the <code>equals(Object)</code> method, then calling the <code>hashCode</code> method on each of the two | |
68 | * objects must produce distinct integer results. | |
69 | * </p> | |
70 | * <p> | |
71 | * This method should be overriden, when the <code>equals(Object)</code> method is overriden. | |
72 | * </p> | |
73 | * @return A hash code value for this Object. | |
74 | * @see java.lang.Object#hashCode() | |
75 | * @see java.lang.Object#equals(Object) | |
76 | */ | |
77 | 0 | public int hashCode() { |
78 | 0 | return super.hashCode(); |
79 | } | |
80 | } | |
81 | /* | |
82 | * $Log$ | |
83 | * Revision 1.1 2006/11/16 09:53:28 nathaliest | |
84 | * added RDFParserError | |
85 | * | |
86 | * | |
87 | */ |
|