001: /*
002: * The contents of this file are subject to the terms of the Common Development
003: * and Distribution License (the License). You may not use this file except in
004: * compliance with the License.
005: *
006: * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
007: * or http://www.netbeans.org/cddl.txt.
008: *
009: * When distributing Covered Code, include this CDDL Header Notice in each file
010: * and include the License file at http://www.netbeans.org/cddl.txt.
011: * If applicable, add the following below the CDDL Header, with the fields
012: * enclosed by brackets [] replaced by your own identifying information:
013: * "Portions Copyrighted [year] [name of copyright owner]"
014: *
015: * The Original Software is NetBeans. The Initial Developer of the Original
016: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
017: * Microsystems, Inc. All Rights Reserved.
018: */
019:
020: package org.netbeans.modules.wsdlextensions.ftp.impl;
021:
022: import java.util.ArrayList;
023: import java.util.Collection;
024: import java.util.Collections;
025: import java.util.Set;
026: import javax.xml.namespace.QName;
027: import org.netbeans.modules.xml.wsdl.model.WSDLComponent;
028: import org.netbeans.modules.wsdlextensions.ftp.FTPQName;
029: import org.netbeans.modules.xml.wsdl.model.spi.ElementFactory;
030: import org.w3c.dom.Element;
031:
032: /**
033: ** @author jim.fu@sun.com
034: */
035: public class FTPElementFactoryProvider {
036:
037: public static class BindingFactory extends ElementFactory {
038: public Set<QName> getElementQNames() {
039: return Collections.singleton(FTPQName.BINDING.getQName());
040: }
041:
042: public WSDLComponent create(WSDLComponent context,
043: Element element) {
044: return new FTPBindingImpl(context.getModel(), element);
045: }
046: }
047:
048: public static class AddressFactory extends ElementFactory {
049: public Set<QName> getElementQNames() {
050: return Collections.singleton(FTPQName.ADDRESS.getQName());
051: }
052:
053: public WSDLComponent create(WSDLComponent context,
054: Element element) {
055: return new FTPAddressImpl(context.getModel(), element);
056: }
057: }
058:
059: public static class OperationFactory extends ElementFactory {
060: public Set<QName> getElementQNames() {
061: return Collections.singleton(FTPQName.OPERATION.getQName());
062: }
063:
064: public WSDLComponent create(WSDLComponent context,
065: Element element) {
066: return new FTPOperationImpl(context.getModel(), element);
067: }
068: }
069:
070: public static class TransferFactory extends ElementFactory {
071: public Set<QName> getElementQNames() {
072: return Collections.singleton(FTPQName.TRANSFER.getQName());
073: }
074:
075: public WSDLComponent create(WSDLComponent context,
076: Element element) {
077: return new FTPTransferImpl(context.getModel(), element);
078: }
079: }
080:
081: public static class MessageFactory extends ElementFactory {
082: public Set<QName> getElementQNames() {
083: return Collections.singleton(FTPQName.MESSAGE.getQName());
084: }
085:
086: public WSDLComponent create(WSDLComponent context,
087: Element element) {
088: return new FTPMessageImpl(context.getModel(), element);
089: }
090: }
091: /**
092: public static class MessageActivePassiveFactory extends ElementFactory{
093: public Set<QName> getElementQNames() {
094: return Collections.singleton(FTPQName.MESSAGEACTIVEPASSIVE.getQName());
095: }
096: public WSDLComponent create(WSDLComponent context, Element element) {
097: return new FTPMessageActivePassiveImpl(context.getModel(), element);
098: }
099: }
100: */
101: }
|