5193 |
27 Nov 09 |
nicklas |
1 |
/** |
5193 |
27 Nov 09 |
nicklas |
$Id$ |
5193 |
27 Nov 09 |
nicklas |
3 |
|
5193 |
27 Nov 09 |
nicklas |
Copyright (C) 2009 Nicklas Nordborg |
5193 |
27 Nov 09 |
nicklas |
5 |
|
5193 |
27 Nov 09 |
nicklas |
This file is part of BASE - BioArray Software Environment. |
5193 |
27 Nov 09 |
nicklas |
Available at http://base.thep.lu.se/ |
5193 |
27 Nov 09 |
nicklas |
8 |
|
5193 |
27 Nov 09 |
nicklas |
BASE is free software; you can redistribute it and/or |
5193 |
27 Nov 09 |
nicklas |
modify it under the terms of the GNU General Public License |
5193 |
27 Nov 09 |
nicklas |
as published by the Free Software Foundation; either version 3 |
5193 |
27 Nov 09 |
nicklas |
of the License, or (at your option) any later version. |
5193 |
27 Nov 09 |
nicklas |
13 |
|
5193 |
27 Nov 09 |
nicklas |
BASE is distributed in the hope that it will be useful, |
5193 |
27 Nov 09 |
nicklas |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
5193 |
27 Nov 09 |
nicklas |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5193 |
27 Nov 09 |
nicklas |
GNU General Public License for more details. |
5193 |
27 Nov 09 |
nicklas |
18 |
|
5193 |
27 Nov 09 |
nicklas |
You should have received a copy of the GNU General Public License |
5193 |
27 Nov 09 |
nicklas |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
5193 |
27 Nov 09 |
nicklas |
21 |
*/ |
5193 |
27 Nov 09 |
nicklas |
22 |
package net.sf.basedb.util.bfs; |
5193 |
27 Nov 09 |
nicklas |
23 |
|
5193 |
27 Nov 09 |
nicklas |
24 |
/** |
5193 |
27 Nov 09 |
nicklas |
Event handlers are used for reacting to various parsing events when |
5193 |
27 Nov 09 |
nicklas |
parsing BFS files. Different parsers generate different types of events, |
5193 |
27 Nov 09 |
nicklas |
and generally, different event handler implementations are needed |
5193 |
27 Nov 09 |
nicklas |
for different BFS file types. |
5193 |
27 Nov 09 |
nicklas |
29 |
|
5193 |
27 Nov 09 |
nicklas |
@author Nicklas |
5193 |
27 Nov 09 |
nicklas |
@version 2.15 |
5193 |
27 Nov 09 |
nicklas |
@base.modified $Date$ |
5193 |
27 Nov 09 |
nicklas |
33 |
*/ |
5193 |
27 Nov 09 |
nicklas |
34 |
public interface EventHandler |
5193 |
27 Nov 09 |
nicklas |
35 |
{ |
5193 |
27 Nov 09 |
nicklas |
36 |
|
5193 |
27 Nov 09 |
nicklas |
37 |
/** |
5193 |
27 Nov 09 |
nicklas |
The method is called by the parser when it has found something |
5193 |
27 Nov 09 |
nicklas |
interesting in a BFS file. See the respective parser documentation |
5193 |
27 Nov 09 |
nicklas |
for documentation about the events that it generates. There is |
5193 |
27 Nov 09 |
nicklas |
usually some kind of information associated with the event. This |
5193 |
27 Nov 09 |
nicklas |
information is sent to the event handler as an object. The parser |
5193 |
27 Nov 09 |
nicklas |
should document what kind of information it sends so that event |
5193 |
27 Nov 09 |
nicklas |
handler implementation can react and use the information. |
5193 |
27 Nov 09 |
nicklas |
<p> |
5193 |
27 Nov 09 |
nicklas |
It is recommended that event handlers ignore event types they |
5193 |
27 Nov 09 |
nicklas |
don't know about. |
5193 |
27 Nov 09 |
nicklas |
48 |
|
5193 |
27 Nov 09 |
nicklas |
@param eventType The type of event. See the parser documentation |
5193 |
27 Nov 09 |
nicklas |
for more information about the event types it generates |
5193 |
27 Nov 09 |
nicklas |
@param eventData The data that is associated with the event |
5224 |
27 Jan 10 |
nicklas |
@param parser The parser that is resposible for parsing the file |
5193 |
27 Nov 09 |
nicklas |
53 |
*/ |
5224 |
27 Jan 10 |
nicklas |
54 |
public <T> void handleEvent(EventType<T> eventType, T eventData, BfsParser parser); |
5193 |
27 Nov 09 |
nicklas |
55 |
|
5193 |
27 Nov 09 |
nicklas |
56 |
} |