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