All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ow2.easywsdl.extensions.wsdl4complexwsdl.WSDL4ComplexWsdlFactoryImpl Maven / Gradle / Ivy

The newest version!
/**
 * Copyright (c) 2008-2012 EBM WebSourcing, 2012-2023 Linagora
 * 
 * This program/library is free software: you can redistribute it and/or modify
 * it under the terms of the New BSD License (3-clause license).
 *
 * This program/library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the New BSD License (3-clause license)
 * for more details.
 *
 * You should have received a copy of the New BSD License (3-clause license)
 * along with this program/library; If not, see http://directory.fsf.org/wiki/License:BSD_3Clause/
 * for the New BSD License (3-clause license).
 */
 
package org.ow2.easywsdl.extensions.wsdl4complexwsdl;

import java.util.Map;

import org.ow2.easywsdl.extensions.wsdl4complexwsdl.api.Description;
import org.ow2.easywsdl.extensions.wsdl4complexwsdl.api.WSDL4ComplexWsdlException;
import org.ow2.easywsdl.extensions.wsdl4complexwsdl.api.WSDL4ComplexWsdlReader;
import org.ow2.easywsdl.extensions.wsdl4complexwsdl.api.WSDL4ComplexWsdlWriter;
import org.ow2.easywsdl.extensions.wsdl4complexwsdl.impl.converter.DescriptionConverter;
import org.ow2.easywsdl.extensions.wsdl4complexwsdl.impl.inout.WSDL4ComplexWsdlReaderImpl;
import org.ow2.easywsdl.extensions.wsdl4complexwsdl.impl.inout.WSDL4ComplexWsdlWriterImpl;
import org.ow2.easywsdl.wsdl.api.WSDLException;
import org.ow2.easywsdl.wsdl.api.WSDLReader.FeatureConstants;
import org.ow2.easywsdl.wsdl.api.abstractItf.AbsItfDescription;

/**
 * This class is a concrete implementation of the abstract class WSDLFactory.
 * 

* Some ideas used here have been shamelessly copied from the wonderful JAXP and * Xerces work. *

* * @author Nicolas Salatge - EBM WebSourcing */ public class WSDL4ComplexWsdlFactoryImpl extends WSDL4ComplexWsdlFactory { @SuppressWarnings("unchecked") @Override public Description addComplexWsdlElmt2Description(final AbsItfDescription desc) throws WSDL4ComplexWsdlException { Description newDesc = null; try { newDesc = DescriptionConverter.getInstance().convertDescription(desc); } catch (final WSDLException e) { throw new WSDL4ComplexWsdlException(e); } return newDesc; } @Override public Description addExtElmt2Description(AbsItfDescription desc) throws WSDL4ComplexWsdlException { return addComplexWsdlElmt2Description(desc); } @Override public WSDL4ComplexWsdlReader newWSDLReader() throws WSDL4ComplexWsdlException { return new WSDL4ComplexWsdlReaderImpl(); } @Override public WSDL4ComplexWsdlReader newWSDLReader(final Map features) throws WSDL4ComplexWsdlException { final WSDL4ComplexWsdlReaderImpl reader = new WSDL4ComplexWsdlReaderImpl(); reader.getFeatures().putAll(features); return reader; } @Override public WSDL4ComplexWsdlWriter newWSDLWriter() throws WSDL4ComplexWsdlException { return new WSDL4ComplexWsdlWriterImpl(); } @Override public Class getDescriptionType() { return Description.class; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy