Package org.infozone.tools.xml.queries

Source Code of org.infozone.tools.xml.queries.XPathQueryFactory

// You can redistribute this software and/or modify it under the terms of
// the Infozone Software License version 2 published by the Infozone Group
// (http://www.infozone-group.org).
//
// Copyright (C) @year@ by The Infozone Group. All rights reserved.
//
// $Id: XPathQueryFactory.java,v 1.1 2002/05/10 08:59:12 per_nyfelt Exp $


package org.infozone.tools.xml.queries;

import javax.xml.parsers.FactoryConfigurationError;


/**
* @version $Revision: 1.1 $ $Date: 2002/05/10 08:59:12 $
* @author <a href="http://www.softwarebuero.de">SMB</a>
* @see XPathQuery
*/
public abstract class XPathQueryFactory {


    public XPathQueryFactory() {
    }


    public static XPathQueryFactory newInstance() {
        String factoryName = System.getProperty ("org.infozone.tools.xml.queries.XPathQueryFactory",
                                                 "org.infozone.tools.xml.queries.xalan.XPathQueryFactoryImpl");

        XPathQueryFactory factory = null;

        try {
            Class clazz = Class.forName( factoryName );
            factory = (XPathQueryFactory)clazz.newInstance();
        }
        catch (ClassNotFoundException cnfe) {
            throw new FactoryConfigurationError (cnfe);
        }
        catch (IllegalAccessException iae) {
            throw new FactoryConfigurationError (iae);
        }
        catch (InstantiationException ie) {
            throw new FactoryConfigurationError (ie);
        }
        return factory;
    }


    public abstract XPathQuery newXPathQuery() throws XPathQueryConfigurationException;

}
TOP

Related Classes of org.infozone.tools.xml.queries.XPathQueryFactory

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.