Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 140b6bc7 authored by Jérôme Euzenat's avatar Jérôme Euzenat
Browse files

- added parseString( s )

parent aa5b7eb7
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,7 @@
package fr.inrialpes.exmo.align.parser;
//Imported SAX classes
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.Attributes;
import org.xml.sax.helpers.DefaultHandler;
......@@ -32,6 +33,7 @@ import javax.xml.parsers.ParserConfigurationException;
//Imported JAVA classes
import java.io.IOException;
import java.io.StringReader;
import java.net.URI;
import java.net.URISyntaxException;
import java.lang.Integer;
......@@ -172,6 +174,7 @@ public class AlignmentParser extends DefaultHandler {
* @deprecated use parse( URI ) instead
*/
public Alignment parse( String uri, Hashtable loaded ) throws SAXException, IOException {
//ontologies = loaded;
return parse( uri );
}
......@@ -183,10 +186,15 @@ public class AlignmentParser extends DefaultHandler {
*/
public Alignment parse( String uri ) throws SAXException, IOException {
this.uri = uri;
//ontologies = loaded;
parser.parse(uri,this);
return alignment;
}
public Alignment parseString( String s ) throws SAXException, IOException {
parser.parse( new InputSource( new StringReader( s ) ),
this );
return alignment;
}
/**
* Called by the XML parser at the begining of an element.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment