01: package com.jclark.xml.parse.base;
02:
03: import java.io.IOException;
04: import com.jclark.xml.parse.*;
05:
06: /**
07: *
08: * @version $Revision: 1.1 $ $Date: 1998/05/08 06:38:14 $
09: */
10: public class ParserImpl extends ParserBase implements Parser {
11: private Application application = new ApplicationImpl();
12:
13: public void setApplication(Application application) {
14: if (application == null)
15: throw new NullPointerException();
16: this .application = application;
17: }
18:
19: /**
20: * Parses an XML document.
21: * If no <code>EntityManager</code> has been specified with
22: * <code>setEntityManager</code>, then <code>EntityManagerImpl</code>
23: * will be used.
24: *
25: * @param entity the document entity of the XML document
26: * @exception NotWellFormedException if the document is not well-formed
27: * @exception IOException if an IO error occurs
28: * @see EntityManagerImpl
29: */
30: public void parseDocument(OpenEntity entity)
31: throws ApplicationException, IOException {
32: DocumentParser
33: .parse(entity, entityManager, application, locale);
34: }
35: }
|