2 |
26 Feb 07 |
jari |
1 |
/* |
2 |
26 Feb 07 |
jari |
Copyright @ 1999-2003, The Institute for Genomic Research (TIGR). |
2 |
26 Feb 07 |
jari |
All rights reserved. |
2 |
26 Feb 07 |
jari |
4 |
*/ |
2 |
26 Feb 07 |
jari |
5 |
/* |
2 |
26 Feb 07 |
jari |
* $RCSfile: Parser.java,v $ |
2 |
26 Feb 07 |
jari |
* $Revision: 1.4 $ |
2 |
26 Feb 07 |
jari |
* $Date: 2006/02/23 21:00:02 $ |
2 |
26 Feb 07 |
jari |
* $Author: caliente $ |
2 |
26 Feb 07 |
jari |
* $State: Exp $ |
2 |
26 Feb 07 |
jari |
11 |
*/ |
2 |
26 Feb 07 |
jari |
12 |
package org.tigr.remote.protocol.parser; |
2 |
26 Feb 07 |
jari |
13 |
|
2 |
26 Feb 07 |
jari |
14 |
import java.io.InputStream; |
2 |
26 Feb 07 |
jari |
15 |
|
2 |
26 Feb 07 |
jari |
16 |
import org.tigr.remote.protocol.Response; |
2 |
26 Feb 07 |
jari |
17 |
import org.tigr.util.ConfMap; |
2 |
26 Feb 07 |
jari |
18 |
|
2 |
26 Feb 07 |
jari |
19 |
public abstract class Parser { |
2 |
26 Feb 07 |
jari |
20 |
/** |
2 |
26 Feb 07 |
jari |
* Must be overriden to parse data from specified stream. |
2 |
26 Feb 07 |
jari |
* @return an instance of Response as parse result. |
2 |
26 Feb 07 |
jari |
* @see Response |
2 |
26 Feb 07 |
jari |
24 |
*/ |
2 |
26 Feb 07 |
jari |
25 |
public abstract Response parseResponse( InputStream in ) throws ParserException ; |
2 |
26 Feb 07 |
jari |
26 |
|
2 |
26 Feb 07 |
jari |
27 |
/** |
2 |
26 Feb 07 |
jari |
* Creates a new instance of a <code>Parser</code> with specified configuration. |
2 |
26 Feb 07 |
jari |
29 |
*/ |
2 |
26 Feb 07 |
jari |
30 |
public static Parser createParser( ConfMap cfg ) throws ParserException { |
2 |
26 Feb 07 |
jari |
31 |
return new XMLResponseParser( cfg ); |
2 |
26 Feb 07 |
jari |
32 |
} |
2 |
26 Feb 07 |
jari |
33 |
} |
2 |
26 Feb 07 |
jari |
34 |
|