@ -88,9 +88,9 @@ implements Parser {
"xerces.jar"
} ;
public mimeTypeParser ( ) {
super ( LIBX_DEPENDENCIES ) ;
}
public mimeTypeParser ( ) {
super ( LIBX_DEPENDENCIES ) ;
}
public plasmaParserDocument parse ( URL location , String mimeType , File sourceFile ) throws ParserException {
@ -113,6 +113,9 @@ implements Parser {
mimeType = match . getMimeType ( ) ;
}
// to avoid loops we have to test if the mimetype has changed ...
if ( this . getSupportedMimeTypes ( ) . containsKey ( mimeType ) ) return null ;
plasmaParser theParser = new plasmaParser ( ) ;
return theParser . parseSource ( location , mimeType , sourceFile ) ;
}
@ -123,8 +126,8 @@ implements Parser {
}
}
public plasmaParserDocument parse ( URL location , String mimeType ,
InputStream source ) throws ParserException {
public plasmaParserDocument parse ( URL location , String mimeType ,
InputStream source ) throws ParserException {
File dstFile = null ;
try {
dstFile = File . createTempFile ( "mimeTypeParser" , ".tmp" ) ;
@ -136,14 +139,14 @@ implements Parser {
if ( dstFile ! = null ) { dstFile . delete ( ) ; }
}
}
}
public java . util . Hashtable getSupportedMimeTypes ( ) {
return mimeTypeParser . SUPPORTED_MIME_TYPES ;
}
public java . util . Hashtable getSupportedMimeTypes ( ) {
return mimeTypeParser . SUPPORTED_MIME_TYPES ;
}
public void reset ( ) {
public void reset ( ) {
// Nothing todo here at the moment
}
}
}