01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */
19: package org.apache.axis2.jaxws.message.databinding.impl;
20:
21: import org.apache.axiom.om.OMElement;
22: import org.apache.axis2.jaxws.message.Block;
23: import org.apache.axis2.jaxws.message.factory.OMBlockFactory;
24: import org.apache.axis2.jaxws.message.impl.BlockFactoryImpl;
25:
26: import javax.xml.namespace.QName;
27: import javax.xml.stream.XMLStreamException;
28:
29: /**
30: * OMBlockFactoryImpl
31: * <p/>
32: * Creates an OMBlock
33: */
34: public class OMBlockFactoryImpl extends BlockFactoryImpl implements
35: OMBlockFactory {
36:
37: /** Default Constructor required for Factory */
38: public OMBlockFactoryImpl() {
39: super ();
40: }
41:
42: /* (non-Javadoc)
43: * @see org.apache.axis2.jaxws.message.BlockFactory#createFrom(org.apache.axiom.om.OMElement, java.lang.Object, javax.xml.namespace.QName)
44: */
45: public Block createFrom(OMElement omElement, Object context,
46: QName qName) throws XMLStreamException {
47: return new OMBlockImpl(omElement, this );
48: }
49:
50: /* (non-Javadoc)
51: * @see org.apache.axis2.jaxws.message.BlockFactory#createFrom(java.lang.Object, java.lang.Object, javax.xml.namespace.QName)
52: */
53: public Block createFrom(Object businessObject, Object context,
54: QName qName) {
55: return new OMBlockImpl((OMElement) businessObject, this );
56: }
57:
58: public boolean isElement() {
59: return true;
60: }
61:
62: }
|