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

org.ow2.easywsdl.extensions.sawsdl.impl.DescriptionImpl Maven / Gradle / Ivy

There is a newer version: 2.5.0
Show newest version
/**
 * Copyright (c) 2008-2012 EBM WebSourcing, 2012-2016 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.sawsdl.impl;

import java.net.URI;
import java.util.List;

import org.ow2.easywsdl.extensions.sawsdl.api.AttrExtensions;
import org.ow2.easywsdl.extensions.sawsdl.api.Binding;
import org.ow2.easywsdl.extensions.sawsdl.api.Description;
import org.ow2.easywsdl.extensions.sawsdl.api.Endpoint;
import org.ow2.easywsdl.extensions.sawsdl.api.Import;
import org.ow2.easywsdl.extensions.sawsdl.api.Include;
import org.ow2.easywsdl.extensions.sawsdl.api.InterfaceType;
import org.ow2.easywsdl.extensions.sawsdl.api.SAWSDLElement;
import org.ow2.easywsdl.extensions.sawsdl.api.SAWSDLException;
import org.ow2.easywsdl.extensions.sawsdl.api.Service;
import org.ow2.easywsdl.extensions.sawsdl.api.Types;
import org.ow2.easywsdl.wsdl.api.WSDLException;
import org.ow2.easywsdl.wsdl.api.abstractItf.AbsItfDescription;
import org.ow2.easywsdl.wsdl.decorator.DecoratorDescriptionImpl;

/**
 * @author Nicolas Salatge - EBM WebSourcing
 */
public class DescriptionImpl extends
DecoratorDescriptionImpl implements
Description {

	/**
	 *
	 */
	private static final long serialVersionUID = 1L;

	private SAWSDLElement elmt = null;

	@SuppressWarnings("unchecked")
	public DescriptionImpl(final AbsItfDescription wsdl) throws WSDLException {
		super(wsdl, TypesImpl.class);

		this.elmt = new SAWSDLElementImpl(wsdl);
	}

	public List getModelReference() throws SAWSDLException {
		return this.elmt.getModelReference();
	}
	
	public void addModelReference(final URI uri) throws SAWSDLException {
		this.elmt.addModelReference(uri);
	}

	public List removeAllModelReferences() throws SAWSDLException {
		return this.elmt.removeAllModelReferences();
	}

	public URI removeModelReference(final URI uri) throws SAWSDLException {
		return this.elmt.removeModelReference(uri);
	}

//	@Override
//	public void setTypes(Types type) {
//		if((type instanceof DecoratorTypesImpl)&&(this.wsdl instanceof AbstractDescriptionImpl)) {
//			((AbstractDescriptionImpl)this.wsdl).setTypes( (AbsItfTypes) ((DecoratorTypesImpl)type).getDecorator());
//		} else {
//			super.setTypes(type);
//		}
//	}

	public AttrExtensions getAttrExtensions() throws SAWSDLException {
		return this.elmt.getAttrExtensions();
	}

//	@Override
//	public Types getTypes() {
//		Types types = null;
//		try {
//			types = new TypesImpl(this.wsdl.getTypes());
//		} catch (WSDLException e) {
//			// do nothing
//			e.printStackTrace();
//		}
//		return types;
//	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy