out-xslt: class skeletons
authorFrantišek Kučera <franta-hg@frantovo.cz>
Mon, 16 Jun 2014 22:28:37 +0200
changeset 503af3ef97f33f
parent 49 bec481687c1b
child 51 d79b818c364b
out-xslt: class skeletons
java/alt2xml-cli/src/cz/frantovo/alt2xml/cli/CLI.java
java/alt2xml-out-xslt/config/META-INF.services/cz.frantovo.alt2xml.out.ActionFactory
java/alt2xml-out-xslt/src/cz/frantovo/alt2xml/out/xslt/XSLTAction.java
java/alt2xml-out-xslt/src/cz/frantovo/alt2xml/out/xslt/XSLTActionFactory.java
     1.1 --- a/java/alt2xml-cli/src/cz/frantovo/alt2xml/cli/CLI.java	Mon Jun 16 22:15:18 2014 +0200
     1.2 +++ b/java/alt2xml-cli/src/cz/frantovo/alt2xml/cli/CLI.java	Mon Jun 16 22:28:37 2014 +0200
     1.3 @@ -52,7 +52,7 @@
     1.4  			for (ActionFactory f : ServiceLoader.load(ActionFactory.class)) {
     1.5  				String code = f.getActionCode();
     1.6  				actionFactories.put(code, f);
     1.7 -				log.log(Level.CONFIG, "Discovered output module: {0} = {1}", new Object[]{code, f.getClass().getName()});
     1.8 +				log.log(Level.INFO, "Discovered output module: {0} = {1}", new Object[]{code, f.getClass().getName()});
     1.9  			}
    1.10  
    1.11  			ActionFactory actionFactory = actionFactories.get(actionCode);
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/java/alt2xml-out-xslt/config/META-INF.services/cz.frantovo.alt2xml.out.ActionFactory	Mon Jun 16 22:28:37 2014 +0200
     2.3 @@ -0,0 +1,1 @@
     2.4 +cz.frantovo.alt2xml.out.xslt.XSLTActionFactory
     2.5 \ No newline at end of file
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/java/alt2xml-out-xslt/src/cz/frantovo/alt2xml/out/xslt/XSLTAction.java	Mon Jun 16 22:28:37 2014 +0200
     3.3 @@ -0,0 +1,41 @@
     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.out.xslt;
    3.22 +
    3.23 +import cz.frantovo.alt2xml.out.AbstractAction;
    3.24 +import cz.frantovo.alt2xml.out.ActionContext;
    3.25 +import cz.frantovo.alt2xml.out.OutputActionException;
    3.26 +import javax.xml.parsers.SAXParser;
    3.27 +import org.xml.sax.InputSource;
    3.28 +
    3.29 +/**
    3.30 + *
    3.31 + * @author Ing. František Kučera (frantovo.cz)
    3.32 + */
    3.33 +public class XSLTAction extends AbstractAction {
    3.34 +
    3.35 +	public XSLTAction(ActionContext actionContext) {
    3.36 +		super(actionContext);
    3.37 +	}
    3.38 +
    3.39 +	@Override
    3.40 +	public void run(SAXParser parser, InputSource source) throws OutputActionException {
    3.41 +		// TODO: XSLT
    3.42 +		throw new UnsupportedOperationException("Not supported yet.");
    3.43 +	}
    3.44 +}
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/java/alt2xml-out-xslt/src/cz/frantovo/alt2xml/out/xslt/XSLTActionFactory.java	Mon Jun 16 22:28:37 2014 +0200
     4.3 @@ -0,0 +1,41 @@
     4.4 +/**
     4.5 + * Alt2XML
     4.6 + * Copyright © 2014 František Kučera (frantovo.cz)
     4.7 + *
     4.8 + * This program is free software: you can redistribute it and/or modify
     4.9 + * it under the terms of the GNU General Public License as published by
    4.10 + * the Free Software Foundation, either version 3 of the License, or
    4.11 + * (at your option) any later version.
    4.12 + *
    4.13 + * This program is distributed in the hope that it will be useful,
    4.14 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    4.15 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    4.16 + * GNU General Public License for more details.
    4.17 + *
    4.18 + * You should have received a copy of the GNU General Public License
    4.19 + * along with this program. If not, see <http://www.gnu.org/licenses/>.
    4.20 + */
    4.21 +package cz.frantovo.alt2xml.out.xslt;
    4.22 +
    4.23 +import cz.frantovo.alt2xml.out.Action;
    4.24 +import cz.frantovo.alt2xml.out.ActionContext;
    4.25 +import cz.frantovo.alt2xml.out.ActionFactory;
    4.26 +import cz.frantovo.alt2xml.out.OutputActionException;
    4.27 +
    4.28 +/**
    4.29 + * Executes XPath expression and prints result.
    4.30 + *
    4.31 + * @author Ing. František Kučera (frantovo.cz)
    4.32 + */
    4.33 +public class XSLTActionFactory implements ActionFactory {
    4.34 +
    4.35 +	@Override
    4.36 +	public String getActionCode() {
    4.37 +		return "xslt";
    4.38 +	}
    4.39 +
    4.40 +	@Override
    4.41 +	public Action getAction(ActionContext context) throws OutputActionException {
    4.42 +		return new XSLTAction(context);
    4.43 +	}
    4.44 +}