@@ -0,0 +1,2150 @@
+/*%0A *    ALMA - Atacama Large Millimiter Array%0A *    (c) European Southern Observatory, 2002%0A *    Copyright by ESO (in the framework of the ALMA collaboration)%0A *    and Cosylab 2002, All rights reserved%0A *%0A *    This library is free software; you can redistribute it and/or%0A *    modify it under the terms of the GNU Lesser General Public%0A *    License as published by the Free Software Foundation; either%0A *    version 2.1 of the License, or (at your option) any later version.%0A *%0A *    This library is distributed in the hope that it will be useful,%0A *    but WITHOUT ANY WARRANTY; without even the implied warranty of%0A *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU%0A *    Lesser General Public License for more details.%0A *%0A *    You should have received a copy of the GNU Lesser General Public%0A *    License along with this library; if not, write to the Free Software%0A *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, %0A *    MA 02111-1307  USA%0A */%0Apackage alma.acs.logging.engine.parser;%0A%0A/**%0A * A factory to build parsers.%0A * %3CP%3E%0A * The purpose of this object is to hide the type of parser really used at run time.%0A * %3CP%3E%0A * The object could instantiate a new parser or use only one instance, a singleton.%0A * %3CP%3E%0A * At the present there is one parser available, %3Ccode%3EACSLogParserDOM%3C/code%3E but we are%0A * trying to adopt VTD XML parser.%0A * %3CBR%3E%0A * Having this factory allows to transparently use a different implementation at run-time%0A * depending on the real availability of the parser.%0A *   %0A * @author acaproni%0A *%0A */%0Apublic class ACSLogParserFactory %7B%0A%09%0A%09/**%0A%09 * The parser is a singleton built at the first invocation%0A%09 * of %3Ccode%3EgetParser()%3C/code%3E.%0A%09 */%0A%09private static ACSLogParser parser=null;%0A%09%0A%09/**%0A%09 * Get a parser.%0A%09 * %3CP%3E%0A%09 * The %3Ccode%3EACSLogParser%3C/code%3E returned by this method can be a new instance%0A%09 * or not, depending on the implementation.%0A%09 * %0A%09 * @return The parser.%0A%09 * @throws %3Ccode%3EException%3C/code%3E in case of error building the parser%0A%09 */%0A%09public static ACSLogParser getParser() throws Exception %7B%0A%09%09if (parser==null) %7B%0A%09%09%09parser =  new ACSLogParserDOM();%0A%09%09%7D%0A%09%09return parser;%0A%09%7D%0A%7D%0A

The factory building the parser