juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svi...@apache.org
Subject cvs commit: ws-juddi/src/java/org/apache/juddi/datatype/binding AccessPoint.java BindingTemplate.java BindingTemplates.java HostingRedirector.java InstanceDetails.java InstanceParms.java TModelInstanceDetails.java TModelInstanceInfo.java
Date Tue, 11 Nov 2003 13:43:05 GMT
sviens      2003/11/11 05:43:05

  Added:       src/java/org/apache/juddi/datatype/binding AccessPoint.java
                        BindingTemplate.java BindingTemplates.java
                        HostingRedirector.java InstanceDetails.java
                        InstanceParms.java TModelInstanceDetails.java
                        TModelInstanceInfo.java
  Log:
  Moved from jUDDI CVS at SourceForge
  
  Revision  Changes    Path
  1.1                  ws-juddi/src/java/org/apache/juddi/datatype/binding/AccessPoint.java
  
  Index: AccessPoint.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "jUDDI" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.juddi.datatype.binding;
  
  import org.apache.juddi.datatype.RegistryObject;
  
  /**
   * Is an attribute-qualified pointer to a service entry point. Many types of
   * entry point are accommodated. A single urlType attribute is used to indicate
   * the type of entry point so searches for specific types can be performed.
   * Types might be "http", "smtp", "ftp", etc. In addition there is the actual
   * string value for the entry point. Example accessPoints therefore may be:
   * mailto:purch@fabrikam.com
   * http://www.sviens.com/purchasing
   * ftp://ftp.sviens.com/public, etc.
   *
   * If the AccessPoint has a custom addressformat, the "other" urlType has to
   * be used. When this value is used, one or more of the tModel signatures
   * found in the tModelInstanceInfo collection must imply that a particual
   * format or transport type is required.
   *
   * @author Steve Viens (sviens@apache.org)
   */
  public class AccessPoint implements RegistryObject
  {
    /**
     * Constant which designates that the AccessPoint url is formatted as an
     * electronic mail address reference.
     */
    public static final String MAILTO = "mailto";
  
    /**
     * Constant which designates that the AccessPoint url is formatted as an
     * HTTP compatible Uniform Resource Locator (URL).
     */
    public static final String HTTP = "http";
  
    /**
     * Constant which designates that the AccessPoint url is formatted as a
     * secure HTTP compatible URL.
     */
    public static final String HTTPS = "https";
  
    /**
     * Constant which designates that the AccessPoint url is formatted as a
     * writable FTP directory address.
     */
    public static final String FTP = "ftp";
  
    /**
     * Constant which designates that the AccessPoint url is formatted as a
     * telephone number that will contact a facsimile machine.
     */
    public static final String FAX = "fax";
  
    /**
     * Constant which designates that the AccessPoint url is formatted as a
     * telephone number that will connect to a human or suitable voice or
     * tone response based system.
     */
    public static final String PHONE = "phone";
  
    /**
     * Constant which designates that the AccessPoint is formatted as some other
     * address format. When this value is used, one or more of the tModel
     * signatures found in the tModelInstanceInfo collection must imply that a
     * particual format or transport type is required.
     */
    public static final String OTHER = "other";
  
    String urlType;
    String urlValue;
  
    /**
     * Constructs a new initialized AccessPoint
     */
    public AccessPoint()
    {
    }
  
    /**
     * Constructs a new AccessPoint for a given urlType and a given urlValue.
     *
     * @param urlType The urlType of the AccessPoint.
     * @param urlValue The value of the AccessPoint url.
     */
    public AccessPoint(String urlType,String urlValue)
    {
      this.urlType = urlType;
      this.urlValue = urlValue;
    }
  
    /**
     * Set the urlType of this AccessPoint to the given urlType. The urlType
     * cannot be null.
     *
     * @param urlType The new type of the AccessPoint.
     */
    public void setURLType(String urlType)
    {
      this.urlType = urlType;
    }
  
    /**
     * Set the url value of this AccessPoint to the given value. The value cannot
     * be null.
     *
     * @param url The new value of this AccessPoint.
     */
    public void setURL(String url)
    {
      this.urlValue = url;
    }
  
    /**
     * Returns the value of this AccessPoint.
     *
     * @return The value of this AccessPoint.
     */
    public String getURL()
    {
      return this.urlValue;
    }
  
    /**
     * Returns the type of this AccessPoint.
     *
     * @return The type of this AccessPoint.
     */
    public String getURLType()
    {
      return this.urlType;
    }
  }
  
  
  1.1                  ws-juddi/src/java/org/apache/juddi/datatype/binding/BindingTemplate.java
  
  Index: BindingTemplate.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "jUDDI" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.juddi.datatype.binding;
  
  import java.util.Vector;
  
  import org.apache.juddi.datatype.CategoryBag;
  import org.apache.juddi.datatype.Description;
  import org.apache.juddi.datatype.KeyedReference;
  import org.apache.juddi.datatype.RegistryObject;
  
  /**
   * Technical web service description. Contains "information relevant for
   * application programs that need to connect to and then communicate with a
   * remote Web Service. This information includes the address to make contact
   * with a Web Service, as well as support for option information that can be
   * used to describe both hosted services and services that require additional
   * values to be discovered prior to invoking a service" - technical
   * whitepaper
   *
   * "Technical information about a service entry point and construction
   * specs" - XML Structure Reference
   *
   * @author Steve Viens (sviens@apache.org)
   */
  public class BindingTemplate implements RegistryObject
  {
    // unique key for the bindingTemplate.
    String bindingKey;
  
    // the unique key of the enclosing service
    // is required if the business service is not specified
    String serviceKey;
  
    // Optional repeating element. This is zero or more language-qualified
    // text descriptions of the technical service entry point.
    Vector descVector;
  
    // One of accessPoint or hostingRedirector is required. accessPoint may be an
    // email, a URL, or even a phone nbr. No assumptions can be made about this
    // field without understanding the specifics of the service.
    AccessPoint accessPoint;
  
    // hostingRedirector is required if accessPoint is not supplied. This field
    // is a redirected reference to a DIFFERENT bindingTemplate. If you query a
    // bindingTemplate and find a hostingRedirector value, you should retrieve
    // that bindingTemplate and use it in place of the first one (the one
    // containing the hostingRedirector).
    HostingRedirector hostingRedirector;
  
    // the "technical fingerprint". Contains a set of 0..n references to
    // tModelInstanceInfo instances that are all completely supported by this web
    // service.
    TModelInstanceDetails tModelInstanceDetails;
  
    // UDDI v3.0 The ability to classify bindingTemplates with
    // categoryBags now allows metadata to be attributed directly to
    // the technical details of a Web service, enabling more granular
    // searches to be performed on the specific technical metadata
    // for a given service.
    CategoryBag categoryBag;
  
    /**
     * Constructs a new empty BindingTemplate.
     */
    public BindingTemplate()
    {
    }
  
    /**
     * Sets the bindingkey of this bindingtemplate to the given key.
     *
     * @param key The new bindingkey of this bindingtemplate.
     */
    public void setBindingKey(String key)
    {
      this.bindingKey = key;
    }
  
    /**
     * Returns the bindingkey of this binding template.
     * @return The bindingkey of this binding template.
     */
    public String getBindingKey()
    {
      return this.bindingKey;
    }
  
    /**
     * Sets the servicekey of this bindingtemplate.
     *
     * @param key The new service key.
     */
    public void setServiceKey(String key)
    {
      this.serviceKey = key;
    }
  
    /**
     * Returns the servicekey of this bindingtemplate. This method can return null
     * if the business service for this binding template has been set and if the
     * service key for this binding template has not been set.
     *
     * @return The servicekey of this bindingtemplate.
     */
    public String getServiceKey()
    {
      return this.serviceKey;
    }
  
    /**
     * Adds the given description. If there was already a description with the
     * same language-code as the new description, an exception will be thrown.
     *
     * @param desc The description to add.
     */
    public void addDescription(Description desc)
    {
      if (this.descVector == null)
        this.descVector = new Vector();
      this.descVector.add(desc);
    }
  
    /**
     * Sets the description list to the current one. Ignores any object in the
     * collection that is not an "instanceof" the Description class.
     *
     * @param descs Descriptions of Description objects to set
     */
    public void setDescriptionVector(Vector descs)
    {
      this.descVector = descs;
    }
  
    /**
     * Returns the descriptions.
     *
     * @return the descriptions. If the aren't any descriptions, an empty
     *  enumeration is returned.
     */
    public Vector getDescriptionVector()
    {
      return this.descVector;
    }
  
    /**
     * Sets the AccessPoint of this BindingTemplate. If the new AccessPoint is
     * not null and if this BindingTemplate also contains a HostingRedirector,
     * that HostingRedirector is set to null.
     *
     * @param point The new AccessPoint of this BindingTemplate.
     */
    public void setAccessPoint(AccessPoint point)
    {
      this.accessPoint = point;
    }
  
    /**
     * Returns the accesspoint of this binding template.
     *
     * @return The accesspoint of this binding template, or null if the hosting
     *  redirector of this binding template has been set.
     */
    public AccessPoint getAccessPoint()
    {
      return this.accessPoint;
    }
  
    /**
     * Sets the hosting redirector of this BindingTemplate. If the new
     * HostingRedirector is not null and if this BindingTemplate also contains
     * an AccessPoint, that AccessPoint is set to null.
     *
     * @param director The new HostingRedirector of this BindingTemplate.
     */
    public void setHostingRedirector(HostingRedirector director)
    {
      this.hostingRedirector = director;
    }
  
    /**
     * Returns the hosting redirector of this binding template.
     *
     * @return The hosting redirector of this BindingTemplate, or null if the
     *  AccessPoint of this BindingTemplate has been set.
     */
    public HostingRedirector getHostingRedirector()
    {
      return this.hostingRedirector;
    }
  
  
    /**
     * Returns the tModelInstanceDetails of this binding template.
     *
     * @return The tModelInstanceDetails of this binding template. If this binding
     * template doesn't contain any tModelInstanceDetails, an empty enumeration is returned.
     */
    public TModelInstanceDetails getTModelInstanceDetails()
    {
      return this.tModelInstanceDetails;
    }
  
    /**
     * Sets the tModelInstanceDetails of this binding template.
     */
    public void setTModelInstanceDetails(TModelInstanceDetails details)
    {
      this.tModelInstanceDetails = details;
    }
  
    /**
     * Add a category to the categorybag of this binding template.
     * @param keyref The category to add.
     */
    public void addCategory(KeyedReference ref)
    {
      // just return if the KeyedReference parameter is null (nothing to add)
      if (ref == null)
        return;
  
      // make sure the CategoryBag has been initialized
      if (this.categoryBag == null)
        this.categoryBag = new CategoryBag();
  
      this.categoryBag.addKeyedReference(ref);
    }
  
    /**
     * Returns the categorybag of this binding template. If this binding
     * template doesn't contain any categories, an empty enumeration is
     * returned.
     *
     * @return The categorybag of this binding template.
     */
    public CategoryBag getCategoryBag()
    {
      return this.categoryBag;
    }
  
    /**
     * Set the categorybag of this binding template to the given one.
     *
     * @param bag The new categorybag.
     */
    public void setCategoryBag(CategoryBag bag)
    {
      this.categoryBag = bag;
    }
  }
  
  
  1.1                  ws-juddi/src/java/org/apache/juddi/datatype/binding/BindingTemplates.java
  
  Index: BindingTemplates.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "jUDDI" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.juddi.datatype.binding;
  
  import java.util.Vector;
  
  import org.apache.juddi.datatype.RegistryObject;
  
  /**
   * @author Steve Viens (sviens@apache.org)
   */
  public class BindingTemplates implements RegistryObject
  {
    Vector bindingTemplateVector;
  
    /**
     * Constructs a new empty BindingTemplates instance.
     */
    public BindingTemplates()
    {
    }
  
    /**
     *
     */
    public BindingTemplates(int size)
    {
      this.bindingTemplateVector = new Vector(size);
    }
  
    /**
     *
     */
    public void addBindingTemplate(BindingTemplate binding)
    {
      if (this.bindingTemplateVector == null)
        this.bindingTemplateVector = new Vector();
      this.bindingTemplateVector.add(binding);
    }
  
    /**
     *
     */
    public Vector getBindingTemplateVector()
    {
      return this.bindingTemplateVector;
    }
  
    /**
     *
     */
    public void setBindingTemplateVector(Vector bindings)
    {
      this.bindingTemplateVector = bindings;
    }
  }
  
  
  1.1                  ws-juddi/src/java/org/apache/juddi/datatype/binding/HostingRedirector.java
  
  Index: HostingRedirector.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "jUDDI" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.juddi.datatype.binding;
  
  import org.apache.juddi.datatype.BindingKey;
  import org.apache.juddi.datatype.RegistryObject;
  
  /**
   * The HostingRedirector in the bindingTemplate is used to indicate that the
   * bindingTemplate entry is a pointer to a different bindingTemplate entry.
   * The value in this is seen when a business or entity wants to expose a
   * service description (ie advertise a service that fulfills a specific
   * purpose) that is actually a service that is described in a separate
   * bindingTemplate record. This might occur when a service is remotely hosted
   * or when many service descriptions could benefit from a single service
   * description.
   *
   * @author Steve Viens (sviens@apache.org)
   */
  public class HostingRedirector implements RegistryObject
  {
    // BindingKey to a different BindingTemplate
    String bindingKey;
  
    /**
     * Constructs a new initialized HostingRedirector.
     */
    public HostingRedirector()
    {
    }
  
    /**
     * Constructs a new HostingRedirector with a given String.
     *
     * @param key The binding key.
     */
    public HostingRedirector(String key)
    {
      setBindingKey(key);
    }
  
    /**
     * Sets the key of this HostingRedirector to the given key.
     *
     * @param key The new key of this HostingRedirector.
     */
    public void setBindingKey(BindingKey key)
    {
      if ((key != null) && (key.getValue() != null))
        setBindingKey(key.getValue());
    }
  
    /**
     * Sets the key of this HostingRedirector to the given key.
     *
     * @param key The new key of this HostingRedirector.
     */
    public void setBindingKey(String key)
    {
      this.bindingKey = key;
    }
  
    /**
     * Returns the key of this HostingRedirector.
     *
     * @return The key of this HostingRedirector.
     */
    public String getBindingKey()
    {
      return this.bindingKey;
    }
  }
  
  
  1.1                  ws-juddi/src/java/org/apache/juddi/datatype/binding/InstanceDetails.java
  
  Index: InstanceDetails.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "jUDDI" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.juddi.datatype.binding;
  
  import java.util.Vector;
  
  import org.apache.juddi.datatype.Description;
  import org.apache.juddi.datatype.OverviewDoc;
  import org.apache.juddi.datatype.RegistryObject;
  
  /**
   * Holds service-instance specific information that is required to either
   * understand the service implementation details relative to a specific
   * tModelKey reference, or to provide further parameter and settings support.
   * If present this element should not be empty.
   *
   * @author Steve Viens (sviens@apache.org)
   */
  public class InstanceDetails implements RegistryObject
  {
    // Optional repeating element. This language-quailified string is
    // intended for holding a description of the purpose and/or use of the
    // particular InstanceDetails entry.
    Vector descVector;
  
    // Optional, used to house references to remote descriptive or instructions
    // related to proper use of a bindingTemplate technical sub-element.
    OverviewDoc overviewDoc;
  
    // Optional, used to contain settings parameters or a URL reference to a
    // file that contains settings or parameters required to use a specific
    // facet of a bindingTemplate description. If used to house the parameters
    // themselves, the suggested content is a namespace qualifed XML string -
    // using a namespace outside of the XML schema. If used to house a URL
    // pointer to a file, the suggested format is a URL that is suitable for
    // retrieving the settings or parameters via HTTP GET.
    String instanceParms;
  
    /**
     * Construct a new empty instanceDetails object.
     */
    public InstanceDetails()
    {
    }
  
    /**
     * Adds the given description. If there was already a description with the
     * same language-code as the new description, an exception will be thrown.
     *
     * @param desc The description to add.
     *  languagecode.
     */
    public void addDescription(Description desc)
    {
      if (this.descVector == null)
        this.descVector = new Vector();
      this.descVector.add(desc);
    }
  
    /**
     * Sets the description list to the current one. Ignores any object in the
     * collection that is not an "instanceof" the Description class.
     *
     * @param descs Collection of Description objects to set
     */
    public void setDescriptionVector(Vector descs)
    {
      this.descVector = descs;
    }
  
    /**
     * Returns the descriptions.
     *
     * @return the descriptions.
     */
    public Vector getDescriptionVector()
    {
      return this.descVector;
    }
  
    /**
     * Sets the overview document of this instanceDetails to the given overview
     * document.
     *
     * @param doc The new overview document, or null if the instanceDetails
     *  doesn't have an overview document anymore.
     */
    public void setOverviewDoc(OverviewDoc doc)
    {
      this.overviewDoc = doc;
    }
  
    /**
     * Returns the overview document of this instanceDetails.
     *
     * @return The overview document of this instanceDetails, or null if this
     *  instanceDetails doesn't have an overvieuw document.
     */
    public OverviewDoc getOverviewDoc()
    {
      return this.overviewDoc;
    }
  
    /**
     * Sets the instance parameters of this instanceDetails to the given instance
     * parameters.
     *
     * @param parms The new instance parameters, or null if this instanceDetails
     *  doesn't have instance parameters anymore.
     */
    public void setInstanceParms(String parms)
    {
      this.instanceParms = parms;
    }
  
    /**
     * Sets the instance parameters of this instanceDetails to the given instance
     * parameters.
     *
     * @param parms The new instance parameters, or null if this instanceDetails
     *  doesn't have instance parameters anymore.
     */
    public void setInstanceParms(InstanceParms parms)
    {
      if ((parms != null) && (parms.getValue() != null))
        setInstanceParms(parms.getValue());
    }
  
    /**
     * Returns the instance parameters of this instanceDetails as a String.
     *
     * @return An InstanceParms instance containing the value of the instance
     *  parameters of this instanceDetails, or null if this instanceDetails
     *  doesn't have instance parameters.
     */
    public InstanceParms getInstanceParms()
    {
      if (this.instanceParms != null)
        return new InstanceParms(this.instanceParms);
      else
        return null;
    }
  
    /**
     * Returns the instance parameters of this instanceDetails as a String.
     *
     * @return A String containing the text value of the instance parameters
     *  of this instanceDetails, or null if this instanceDetails doesn't have
     *  instance parameters.
     */
    public String getInstanceParmsString()
    {
      return this.instanceParms;
    }
  }
  
  
  1.1                  ws-juddi/src/java/org/apache/juddi/datatype/binding/InstanceParms.java
  
  Index: InstanceParms.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "jUDDI" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.juddi.datatype.binding;
  
  import org.apache.juddi.datatype.RegistryObject;
  
  /**
   * @author Steve Viens (sviens@apache.org)
   */
  public class InstanceParms implements RegistryObject
  {
    String parmValue;
  
    /**
     *
     */
    public InstanceParms()
    {
    }
  
    /**
     *
     */
    public InstanceParms(String value)
    {
      this.parmValue = value;
    }
  
    /**
     *
     */
    public void setText(String value)
    {
      this.parmValue = value;
    }
  
    /**
     *
     */
    public String getValue()
    {
      return this.parmValue;
    }
  }
  
  
  1.1                  ws-juddi/src/java/org/apache/juddi/datatype/binding/TModelInstanceDetails.java
  
  Index: TModelInstanceDetails.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "jUDDI" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.juddi.datatype.binding;
  
  import java.util.Vector;
  
  import org.apache.juddi.datatype.RegistryObject;
  
  /**
   * Represents the "technical fingerprint". A set of 0..n references to
   * tModelInstanceInfos that are all completely supported by this web service.
   *
   * @author Steve Viens (sviens@apache.org)
   */
  public class TModelInstanceDetails implements RegistryObject
  {
    // tModelInstanceInfos hold the technical service description
    // information related to this businessService.
    Vector tModelInstanceInfoVector;
  
    /**
     * Constructs a new empty TModelInstanceDetails.
     */
    public TModelInstanceDetails()
    {
    }
  
    /**
     *
     */
    public void addTModelInstanceInfo(TModelInstanceInfo info)
    {
      if (this.tModelInstanceInfoVector == null)
        this.tModelInstanceInfoVector = new Vector();
      this.tModelInstanceInfoVector.add(info);
    }
  
    /**
     *
     */
    public Vector getTModelInstanceInfoVector()
    {
      return this.tModelInstanceInfoVector;
    }
  
    /**
     *
     */
    public void setTModelInstanceInfoVector(Vector infos)
    {
      this.tModelInstanceInfoVector = infos;
    }
  }
  
  
  1.1                  ws-juddi/src/java/org/apache/juddi/datatype/binding/TModelInstanceInfo.java
  
  Index: TModelInstanceInfo.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "jUDDI" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package org.apache.juddi.datatype.binding;
  
  import java.util.Vector;
  
  import org.apache.juddi.datatype.Description;
  import org.apache.juddi.datatype.RegistryObject;
  import org.apache.juddi.datatype.TModelKey;
  
  /**
   * A TModelInstanceInfo object represents the BindingTemplate instance
   * specific details for a single TModel by reference.<p>
   *
   * A set of these is held by the TModelInstanceDetails Map. When taken as a
   * group they form a technically descriptive fingerprint by virtue of the
   * unordered list of tModelKey references that they form. Each singular
   * TModelInstanceInfo refers to a single tModel, and its presence in a
   * bindingTemplate.tModelInstanceDetails implies that this containing web
   * service supports the tModel that is referenced.
   *
   * @author Steve Viens (sviens@apache.org)
   */
  public class TModelInstanceInfo implements RegistryObject
  {
    // Required attribute. This is the unique key referenced that implies that
    // the service being described has implementation details that are specified
    // by the specifications associated with the tModel that is referenced.
    String tModelKey;
  
    // Optional repeating element. This is one or more language qualified text
    // descriptions that designate what role a TModel referenc plays in the
    // overall service description.
    Vector descVector;
  
    // Optional, can be used when tModel reference specific settings or other
    // descriptive information are required to either describe a tModel specific
    // component of a service description or support services that require
    // additional technical data support (eg, via settings or other handshake
    // support). If this element is supplied it should not be empty.
    InstanceDetails instanceDetails;
  
    /**
     * Constructs a new empty TModelInstanceDetails.
     */
    public TModelInstanceInfo()
    {
    }
  
    /**
     * Constructs a new empty TModelInstanceDetails.
     */
    public TModelInstanceInfo(String key)
    {
      this.tModelKey = key;
    }
  
    /**
     * Sets the tModel key of this tModelInstanceInfo to the given key.
     *
     * @param key The key of the tModel this tModelInstanceInfo is
     *  referencing to.
     */
    public void setTModelKey(TModelKey key)
    {
      if ((key != null) && (key.getValue() != null))
        this.tModelKey = key.getValue();
    }
  
    /**
     * Sets the tModel key of this tModelInstanceInfo to the given key.
     *
     * @param key The key of the tModel this tModelInstanceInfo is
     *  referencing to.
     */
    public void setTModelKey(String key)
    {
      this.tModelKey = key;
    }
  
    /**
     * Returns the tModel key of this tModelInstanceInfo.
     *
     * @return The tModel key of this tModelInstanceInfo.
     */
    public String getTModelKey()
    {
      return this.tModelKey;
    }
  
    /**
     * Add a Description to the collection of Descriptions.
     *
     * @param desc The Description to add.
     */
    public void addDescription(Description desc)
    {
      if (this.descVector == null)
        this.descVector = new Vector();
      this.descVector.add(desc);
    }
  
    /**
     * Sets the Description intance to the one one passed in.
     *
     * @param descs Descriptions of Description objects to set
     */
    public void setDescriptionVector(Vector descs)
    {
      this.descVector = descs;
    }
  
    /**
     * Returns the descriptions.
     *
     * @return the descriptions. If the aren't any descriptions, an empty
     *  enumeration is returned.
     */
    public Vector getDescriptionVector()
    {
      return this.descVector;
    }
  
    /**
     * Sets the instanceDetails of this tModelInstanceInfo to the given
     * instanceDetails.
     *
     * @param details The instanceDetails of this tModelInstanceInfo, or null if
     *  this tModelInstanceInfo doesn't have any instanceDetails.
     */
    public void setInstanceDetails(InstanceDetails details)
    {
      this.instanceDetails = details;
    }
  
    /**
     * Returns the instanceDetails of this tModelInstanceInfo.
     *
     * @return The instanceDetails of this tModelInstanceInfo, or null if this
     *  tModelInstanceInfo doesn't have an instanceDetails.
     */
    public InstanceDetails getInstanceDetails()
    {
      return this.instanceDetails;
    }
  }
  
  

Mime
View raw message