java/alt2xml-in-fs/src/cz/frantovo/alt2xml/in/fs/ReaderFactory.java
author František Kučera <franta-hg@frantovo.cz>
Tue, 28 Oct 2014 16:14:09 +0100
changeset 103 5e22fa13e016
parent 87 java/alt2xml-in-ini/src/cz/frantovo/alt2xml/in/ini/ReaderFactory.java@233907073718
child 111 e4900596abdb
permissions -rw-r--r--
in-fs: basics
franta-hg@76
     1
/**
franta-hg@76
     2
 * Alt2XML
franta-hg@76
     3
 * Copyright © 2014 František Kučera (frantovo.cz)
franta-hg@76
     4
 *
franta-hg@76
     5
 * This program is free software: you can redistribute it and/or modify
franta-hg@76
     6
 * it under the terms of the GNU General Public License as published by
franta-hg@76
     7
 * the Free Software Foundation, either version 3 of the License, or
franta-hg@76
     8
 * (at your option) any later version.
franta-hg@76
     9
 *
franta-hg@76
    10
 * This program is distributed in the hope that it will be useful,
franta-hg@76
    11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
franta-hg@76
    12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
franta-hg@76
    13
 * GNU General Public License for more details.
franta-hg@76
    14
 *
franta-hg@76
    15
 * You should have received a copy of the GNU General Public License
franta-hg@76
    16
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
franta-hg@76
    17
 */
franta-hg@103
    18
package cz.frantovo.alt2xml.in.fs;
franta-hg@76
    19
franta-hg@76
    20
import cz.frantovo.alt2xml.Alt2XmlRegexReaderFactory;
franta-hg@76
    21
import java.util.regex.Pattern;
franta-hg@76
    22
import org.xml.sax.XMLReader;
franta-hg@76
    23
franta-hg@76
    24
/**
franta-hg@76
    25
 *
franta-hg@76
    26
 * @author Ing. František Kučera (frantovo.cz)
franta-hg@76
    27
 */
franta-hg@76
    28
public class ReaderFactory extends Alt2XmlRegexReaderFactory {
franta-hg@76
    29
franta-hg@103
    30
	private static final Pattern pattern = Pattern.compile("^file:.*/$");
franta-hg@76
    31
franta-hg@76
    32
	@Override
franta-hg@76
    33
	protected Pattern getSystemIdPattern() {
franta-hg@76
    34
		return pattern;
franta-hg@76
    35
	}
franta-hg@76
    36
franta-hg@76
    37
	@Override
franta-hg@76
    38
	public XMLReader getReader() {
franta-hg@76
    39
		return new Reader();
franta-hg@76
    40
	}
franta-hg@76
    41
}