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.SourceBlockFactory;
24: import org.apache.axis2.jaxws.message.impl.BlockFactoryImpl;
25:
26: import javax.xml.namespace.QName;
27: import javax.xml.stream.XMLStreamException;
28: import javax.xml.transform.Source;
29: import javax.xml.ws.WebServiceException;
30:
31: /**
32: * SourceBlockFactoryImpl
33: * <p/>
34: * Creates a SourceBlock
35: */
36: public class SourceBlockFactoryImpl extends BlockFactoryImpl implements
37: SourceBlockFactory {
38:
39: /** Default Constructor required for Factory */
40: public SourceBlockFactoryImpl() {
41: super ();
42: }
43:
44: /* (non-Javadoc)
45: * @see org.apache.axis2.jaxws.message.BlockFactory#createFrom(java.lang.Object, java.lang.Object, javax.xml.namespace.QName)
46: */
47: public Block createFrom(Object businessObject, Object context,
48: QName qName) throws WebServiceException {
49: return new SourceBlockImpl((Source) businessObject, qName, this );
50: }
51:
52: /* (non-Javadoc)
53: * @see org.apache.axis2.jaxws.message.BlockFactory#createFrom(org.apache.axiom.om.OMElement, java.lang.Object, javax.xml.namespace.QName)
54: */
55: public Block createFrom(OMElement omElement, Object context,
56: QName qName) throws XMLStreamException {
57: return new SourceBlockImpl(omElement, qName, this );
58: }
59:
60: public boolean isElement() {
61: return false;
62: }
63:
64: }
|