KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > axis2 > om > impl > llom > factory > OMXMLBuilderFactory


1 /*
2  * Copyright 2004,2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.axis2.om.impl.llom.factory;
17
18 import org.apache.axis2.om.OMFactory;
19 import org.apache.axis2.om.impl.llom.builder.StAXOMBuilder;
20 import org.apache.axis2.soap.SOAPFactory;
21 import org.apache.axis2.soap.impl.llom.builder.StAXSOAPModelBuilder;
22
23 import javax.xml.stream.XMLStreamReader;
24
25 /**
26  * Class OMXMLBuilderFactory
27  */

28 public class OMXMLBuilderFactory {
29     /**
30      * Field PARSER_XPP
31      */

32     public static final String JavaDoc PARSER_XPP = "XPP";
33
34     /**
35      * Field PARSER_STAX
36      */

37     public static final String JavaDoc PARSER_STAX = "StAX";
38
39     /**
40      * Field MODEL_SOAP_SPECIFIC
41      */

42     public static final String JavaDoc MODEL_SOAP_SPECIFIC = "SOAP_SPECIFIC";
43
44     /**
45      * Field MODEL_OM
46      */

47     public static final String JavaDoc MODEL_OM = "OM_ONLY";
48
49     /**
50      * Method createStAXSOAPModelBuilder
51      *
52      * @param soapFactory
53      * @param parser
54      * @return
55      */

56     public static StAXSOAPModelBuilder createStAXSOAPModelBuilder(
57             SOAPFactory soapFactory, XMLStreamReader parser) {
58         return new StAXSOAPModelBuilder(parser);
59     }
60
61     /**
62      * Method createStAXOMBuilder
63      *
64      * @param ombuilderFactory
65      * @param parser
66      * @return
67      */

68     public static StAXOMBuilder createStAXOMBuilder(OMFactory ombuilderFactory,
69                                                     XMLStreamReader parser) {
70         return new StAXOMBuilder(ombuilderFactory, parser);
71     }
72 }
73
Popular Tags