/*
* ChainBuilder ESB
* Visual Enterprise Integration
*
* Copyright (C) 2007 Bostech Corporation
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program 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 GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
* $Id: ComponentInfo.java 4582 2007-01-18 22:54:26Z mpreston $
*/
package com.bostechcorp.cbesb.common.wsdl;
import java.util.Iterator;
import java.util.List;
import javax.wsdl.extensions.ExtensibilityElement;
import javax.wsdl.Definition;
public abstract class ComponentInfo {
protected String name;
protected String namespaceURI;
/**
* @return the name
*/
public String getName() {
return name;
}
/**
* @param name the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the namespaceURI
*/
public String getNamespaceURI() {
return namespaceURI;
}
/**
* @param namespaceURI the namespaceURI to set
*/
public void setNamespaceURI(String namespaceURI) {
this.namespaceURI = namespaceURI;
}
/**
* Returns the desired ExtensibilityElement if found in the List
*
* @param extensibilityElements
* The list of extensibility elements to search
* @param elementType
* The element type to find
*
* @return Returns the first matching element of type found in the list
*/
protected static ExtensibilityElement findExtensibilityElement(
List extensibilityElements, String elementType)
{
if (extensibilityElements != null) {
Iterator iter = extensibilityElements.iterator();
while (iter.hasNext()) {
ExtensibilityElement element = (ExtensibilityElement) iter
.next();
if (element.getElementType().getLocalPart().equalsIgnoreCase(
elementType)) {
// Found it
return element;
}
}
}
return null;
}
}
|