java/alt2xml-lib-input/src/cz/frantovo/alt2xml/ParserFactory.java
changeset 36 ad36a104623f
parent 34 5af9c7693d70
child 37 03f940508c72
     1.1 --- a/java/alt2xml-lib-input/src/cz/frantovo/alt2xml/ParserFactory.java	Sun Jun 08 00:01:29 2014 +0200
     1.2 +++ b/java/alt2xml-lib-input/src/cz/frantovo/alt2xml/ParserFactory.java	Sun Jun 08 09:53:51 2014 +0200
     1.3 @@ -86,7 +86,7 @@
     1.4  	private class FallbackReaderFactory implements Alt2XmlReaderFactory {
     1.5  
     1.6  		@Override
     1.7 -		public boolean canRead(String systemId) {
     1.8 +		public boolean canRead(AltInputSource inputSource) {
     1.9  			return true;
    1.10  		}
    1.11  
    1.12 @@ -102,13 +102,13 @@
    1.13  	}
    1.14  
    1.15  	@Override
    1.16 -	public XMLReader findReader(String systemId) throws SAXException {
    1.17 +	public XMLReader findReader(AltInputSource inputSource) throws SAXException {
    1.18  		for (Alt2XmlReaderFactory f : readerFactories) {
    1.19 -			if (f.canRead(systemId)) {
    1.20 +			if (f.canRead(inputSource)) {
    1.21  				return f.getReader();
    1.22  			}
    1.23  		}
    1.24 -		throw new SAXException("Iterated over " + readerFactories.size() + " and was unable to find XMLReader for SystemId: " + systemId);
    1.25 +		throw new SAXException("Iterated over " + readerFactories.size() + " and was unable to find XMLReader for SystemId: " + inputSource);
    1.26  	}
    1.27  
    1.28  	@Override
    1.29 @@ -131,7 +131,7 @@
    1.30  
    1.31  	private static class AltSAXParser extends SAXParser {
    1.32  
    1.33 -		private XMLReader xmlReader;
    1.34 +		private final XMLReader xmlReader;
    1.35  
    1.36  		public AltSAXParser(XMLReader xmlReader) {
    1.37  			this.xmlReader = xmlReader;