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.XMLStringBlockFactory;
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: * XMLStringFactoryImpl
31: * <p/>
32: * Creates an XMLStringBlock
33: */
34: public class XMLStringBlockFactoryImpl extends BlockFactoryImpl
35: implements XMLStringBlockFactory {
36:
37: /** Default Constructor required for Factory */
38: public XMLStringBlockFactoryImpl() {
39: super ();
40: }
41:
42: /* (non-Javadoc)
43: * @see org.apache.axis2.jaxws.message.BlockFactory#createFrom(java.lang.Object, java.lang.Object, javax.xml.namespace.QName)
44: */
45: public Block createFrom(Object businessObject, Object context,
46: QName qName) {
47: return new XMLStringBlockImpl((String) businessObject, qName,
48: this );
49: }
50:
51: /* (non-Javadoc)
52: * @see org.apache.axis2.jaxws.message.BlockFactory#createFrom(org.apache.axiom.om.OMElement, java.lang.Object, javax.xml.namespace.QName)
53: */
54: public Block createFrom(OMElement omElement, Object context,
55: QName qName) throws XMLStreamException {
56: return new XMLStringBlockImpl(omElement, qName, this );
57: }
58:
59: public boolean isElement() {
60: return false;
61: }
62:
63: }
|