franta-hg@13: /** franta-hg@13: * Alt2XML franta-hg@13: * Copyright © 2014 František Kučera (frantovo.cz) franta-hg@13: * franta-hg@13: * This program is free software: you can redistribute it and/or modify franta-hg@13: * it under the terms of the GNU General Public License as published by franta-hg@111: * the Free Software Foundation, version 3 of the License. franta-hg@13: * franta-hg@13: * This program is distributed in the hope that it will be useful, franta-hg@13: * but WITHOUT ANY WARRANTY; without even the implied warranty of franta-hg@13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the franta-hg@13: * GNU General Public License for more details. franta-hg@13: * franta-hg@13: * You should have received a copy of the GNU General Public License franta-hg@13: * along with this program. If not, see . franta-hg@13: */ franta-hg@14: package cz.frantovo.alt2xml.in.json; franta-hg@13: franta-hg@15: import cz.frantovo.alt2xml.Alt2XmlRegexReaderFactory; franta-hg@15: import java.util.regex.Pattern; franta-hg@13: import org.xml.sax.XMLReader; franta-hg@13: franta-hg@13: /** franta-hg@13: * franta-hg@13: * @author Ing. František Kučera (frantovo.cz) franta-hg@13: */ franta-hg@15: public class ReaderFactory extends Alt2XmlRegexReaderFactory { franta-hg@15: franta-hg@15: private static final Pattern pattern = Pattern.compile("^.*\\.json$"); franta-hg@13: franta-hg@13: @Override franta-hg@15: protected Pattern getSystemIdPattern() { franta-hg@15: return pattern; franta-hg@13: } franta-hg@13: franta-hg@13: @Override franta-hg@13: public XMLReader getReader() { franta-hg@15: return new Reader(); franta-hg@13: } franta-hg@13: }