1 |
1 |
/**
|
2 |
2 |
* Copyright (C) 2007 EDIT
|
3 |
|
* European Distributed Institute of Taxonomy
|
|
3 |
* European Distributed Institute of Taxonomy
|
4 |
4 |
* http://www.e-taxonomy.eu
|
5 |
|
*
|
|
5 |
*
|
6 |
6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7 |
7 |
* See LICENSE.TXT at the top of this package for the full license terms.
|
8 |
8 |
*/
|
... | ... | |
22 |
22 |
public interface IParsable {
|
23 |
23 |
|
24 |
24 |
/**
|
25 |
|
* Returns an integer value indicating whether the used parser
|
|
25 |
* Returns an integer value indicating whether the used parser
|
26 |
26 |
* method was able to parse a string successfully into this object (<code>0</code>)
|
27 |
|
* or not (<code>!=0</code>). The the parsing was not successful the value returned
|
|
27 |
* or not (<code>!=0</code>). The the parsing was not successful the value returned
|
28 |
28 |
* defines in more detail what the problem was. The definition of these values depends
|
29 |
29 |
* on the parser that has been used for parsing.
|
30 |
|
*
|
|
30 |
*
|
31 |
31 |
* @return the int value parsingProblem
|
32 |
32 |
*/
|
33 |
33 |
public int getParsingProblem();
|
34 |
|
|
|
34 |
|
35 |
35 |
/**
|
36 |
36 |
* @see #getParsingProblem()
|
37 |
37 |
*/
|
38 |
38 |
public void setParsingProblem(int hasProblem);
|
39 |
|
|
|
39 |
|
40 |
40 |
/**
|
41 |
|
* Returns true if any parsing problem (warning or error) exists.
|
42 |
|
*
|
|
41 |
* Returns true if any parsing problem (warning or error) exists.
|
|
42 |
*
|
43 |
43 |
* @see #getHasProblem()
|
44 |
44 |
*/
|
45 |
45 |
public boolean hasProblem();
|
46 |
|
|
|
46 |
|
47 |
47 |
/**
|
48 |
48 |
* Returns true, if the specified problem exists. False otherwise.
|
49 |
49 |
* @param problem
|
50 |
50 |
* @return
|
51 |
51 |
*/
|
52 |
52 |
public boolean hasProblem(ParserProblem problem);
|
53 |
|
|
54 |
|
|
|
53 |
|
|
54 |
|
55 |
55 |
/**
|
56 |
56 |
* Returns a list of all warnings and errors that have been recognized during the parsing
|
57 |
57 |
* and not yet handled.
|
58 |
58 |
* @return
|
59 |
59 |
*/
|
60 |
60 |
public List<ParserProblem> getParsingProblems();
|
61 |
|
|
|
61 |
|
62 |
62 |
/**
|
63 |
63 |
* Adds a parsing problem to the list of parsing problems
|
64 |
64 |
* @param problem
|
65 |
65 |
*/
|
66 |
66 |
public void addParsingProblem(ParserProblem problem);
|
67 |
|
|
|
67 |
|
68 |
68 |
/**
|
69 |
69 |
* Removes a parsing problem from the list of parsing problems.
|
70 |
70 |
* If the problem is not in the list or is <code>null</code>, nothing happens.
|
71 |
71 |
* @param warning
|
72 |
72 |
*/public void removeParsingProblem(ParserProblem problem);
|
73 |
|
|
74 |
|
|
|
73 |
|
|
74 |
|
75 |
75 |
/**
|
76 |
76 |
* Returns the integer value of the position where a parsing problem starts.
|
77 |
77 |
* If no problem exists -1 is returned.
|
78 |
78 |
* Default: -1
|
79 |
|
* @deprecated This method will be removed by a more sophisticated method in future versions,
|
|
79 |
* @deprecated This method will be removed by a more sophisticated method in future versions,
|
80 |
80 |
* therefore it is deprecated.<BR>
|
81 |
81 |
* @see #getHasProblem()
|
82 |
82 |
*/
|
83 |
83 |
@Deprecated
|
84 |
84 |
public int getProblemStarts();
|
85 |
|
|
|
85 |
|
86 |
86 |
/**
|
87 |
87 |
* Returns the integer value of the position where a parsing problem ends.
|
88 |
88 |
* If no problem exists -1 is returned.
|
89 |
89 |
* Default: -1
|
90 |
|
* @deprecated This method will be removed by a more sophisticated method in future versions,
|
91 |
|
* therefore it is deprecated. <BR>
|
|
90 |
* @deprecated This method will be removed by a more sophisticated method in future versions,
|
|
91 |
* therefore it is deprecated. <BR>
|
92 |
92 |
* @see #getHasProblem()
|
93 |
93 |
*/
|
94 |
94 |
@Deprecated
|
95 |
95 |
public int getProblemEnds();
|
96 |
|
|
|
96 |
|
97 |
97 |
/**
|
98 |
|
* @deprecated This method will be removed by a more sophisticated method in future versions,
|
99 |
|
* therefore it is deprecated. <BR>
|
|
98 |
* @deprecated This method will be removed by a more sophisticated method in future versions,
|
|
99 |
* therefore it is deprecated. <BR>
|
100 |
100 |
* @see #getProblemStarts()
|
101 |
101 |
*/
|
102 |
102 |
@Deprecated
|
103 |
103 |
public void setProblemStarts(int start);
|
104 |
|
|
|
104 |
|
105 |
105 |
/**
|
106 |
|
* @deprecated This method will be removed by a more sophisticated method in future versions,
|
107 |
|
* therefore it is deprecated. <BR>
|
|
106 |
* @deprecated This method will be removed by a more sophisticated method in future versions,
|
|
107 |
* therefore it is deprecated. <BR>
|
108 |
108 |
* @see #getProblemEnds()
|
109 |
109 |
*/
|
110 |
110 |
@Deprecated
|
111 |
111 |
public void setProblemEnds(int end);
|
112 |
|
|
|
112 |
|
113 |
113 |
}
|
cleanup