Alt2XmlReaderFactory
authorFrantišek Kučera <franta-hg@frantovo.cz>
Thu, 05 Jun 2014 23:41:05 +0200
changeset 13a598b9d90144
parent 12 3770beeed252
child 14 471c0cda94c3
Alt2XmlReaderFactory
java/alt2xml-in-json/src/cz/frantovo/alt2xml/vstup/JsonReaderFactory.java
java/alt2xml-in-json/src/cz/frantovo/alt2xml/vstup/JsonXMLReader.java
java/alt2xml-lib/src/cz/frantovo/alt2xml/Alt2XmlReaderFactory.java
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/java/alt2xml-in-json/src/cz/frantovo/alt2xml/vstup/JsonReaderFactory.java	Thu Jun 05 23:41:05 2014 +0200
     1.3 @@ -0,0 +1,39 @@
     1.4 +/**
     1.5 + * Alt2XML
     1.6 + * Copyright © 2014 František Kučera (frantovo.cz)
     1.7 + *
     1.8 + * This program is free software: you can redistribute it and/or modify
     1.9 + * it under the terms of the GNU General Public License as published by
    1.10 + * the Free Software Foundation, either version 3 of the License, or
    1.11 + * (at your option) any later version.
    1.12 + *
    1.13 + * This program is distributed in the hope that it will be useful,
    1.14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    1.16 + * GNU General Public License for more details.
    1.17 + *
    1.18 + * You should have received a copy of the GNU General Public License
    1.19 + * along with this program. If not, see <http://www.gnu.org/licenses/>.
    1.20 + */
    1.21 +package cz.frantovo.alt2xml.vstup;
    1.22 +
    1.23 +import cz.frantovo.alt2xml.Alt2XmlReaderFactory;
    1.24 +import org.xml.sax.XMLReader;
    1.25 +
    1.26 +/**
    1.27 + *
    1.28 + * @author Ing. František Kučera (frantovo.cz)
    1.29 + */
    1.30 +public class JsonReaderFactory implements Alt2XmlReaderFactory {
    1.31 +
    1.32 +	@Override
    1.33 +	public boolean canRead(String systemId) {
    1.34 +		throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    1.35 +	}
    1.36 +
    1.37 +	@Override
    1.38 +	public XMLReader getReader() {
    1.39 +		throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    1.40 +	}
    1.41 +
    1.42 +}
     2.1 --- a/java/alt2xml-in-json/src/cz/frantovo/alt2xml/vstup/JsonXMLReader.java	Thu Jun 05 22:02:46 2014 +0200
     2.2 +++ b/java/alt2xml-in-json/src/cz/frantovo/alt2xml/vstup/JsonXMLReader.java	Thu Jun 05 23:41:05 2014 +0200
     2.3 @@ -44,7 +44,7 @@
     2.4  	private DTDHandler dtdHandler;
     2.5  	private EntityResolver entityResolver;
     2.6  	private Map<String, Object> konfigurace = new HashMap<>();
     2.7 -	
     2.8 +
     2.9  	@Override
    2.10  	public void parse(InputSource input) throws IOException, SAXException {
    2.11  		/**
    2.12 @@ -69,9 +69,9 @@
    2.13  	@Override
    2.14  	public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException {
    2.15  		/**
    2.16 -		 * TODO: 
    2.17 -		 * All XMLReaders are required to recognize 
    2.18 -		 * the http://xml.org/sax/features/namespaces 
    2.19 +		 * TODO:
    2.20 +		 * All XMLReaders are required to recognize
    2.21 +		 * the http://xml.org/sax/features/namespaces
    2.22  		 * and the http://xml.org/sax/features/namespace-prefixes feature names.
    2.23  		 */
    2.24  		throw new SAXNotSupportedException("Zatím není podporováno.");
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/java/alt2xml-lib/src/cz/frantovo/alt2xml/Alt2XmlReaderFactory.java	Thu Jun 05 23:41:05 2014 +0200
     3.3 @@ -0,0 +1,35 @@
     3.4 +/**
     3.5 + * Alt2XML
     3.6 + * Copyright © 2014 František Kučera (frantovo.cz)
     3.7 + *
     3.8 + * This program is free software: you can redistribute it and/or modify
     3.9 + * it under the terms of the GNU General Public License as published by
    3.10 + * the Free Software Foundation, either version 3 of the License, or
    3.11 + * (at your option) any later version.
    3.12 + *
    3.13 + * This program is distributed in the hope that it will be useful,
    3.14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    3.15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    3.16 + * GNU General Public License for more details.
    3.17 + *
    3.18 + * You should have received a copy of the GNU General Public License
    3.19 + * along with this program. If not, see <http://www.gnu.org/licenses/>.
    3.20 + */
    3.21 +package cz.frantovo.alt2xml;
    3.22 +
    3.23 +import org.xml.sax.XMLReader;
    3.24 +
    3.25 +/**
    3.26 + *
    3.27 + * @author Ing. František Kučera (frantovo.cz)
    3.28 + */
    3.29 +public interface Alt2XmlReaderFactory {
    3.30 +
    3.31 +	/**
    3.32 +	 * @param systemId system ID of the document to be read
    3.33 +	 * @return whether this alternative format is supported
    3.34 +	 */
    3.35 +	public boolean canRead(String systemId);
    3.36 +
    3.37 +	public XMLReader getReader();
    3.38 +}