Ruddi™ UDDI Client API
1.0

inspireit.uddi.util
Class KeysUtil

java.lang.Object
  |
  +--inspireit.uddi.util.KeysUtil

public class KeysUtil
extends java.lang.Object

KeysUtil is a utility class to manage UDDI keys. This class is (for example) capable of turning an UDDI V3.0 key into an UDDI V2.0-compliant UDDI key.

Author:
Bertrand Fontaine, INSPIRE IT $Revision: 1.2 $

Field Summary
protected static java.util.Hashtable keyMap23
          A UDDI V2.0-UDDI V3.0 mapping table for keys of standardized TModels.
protected static java.util.Hashtable keyMap32
          A UDDI V3.0-UDDI V2.0 mapping table for keys of standardized TModels.
 
Constructor Summary
KeysUtil()
           
 
Method Summary
protected static java.lang.String computeV2Key(java.lang.String v3Key)
          Computes a UDDI V2.0 key from a UDDI V3.0 key.
static boolean isV1(UDDIKey uddiKey)
          Checks whether a UDDIKey has a UDDI V1.0 format.
static boolean isV2(UDDIKey uddiKey)
          Checks whether a UDDIKey has a UDDI V2.0 format.
static boolean isV3(UDDIKey uddiKey)
          Checks whether a UDDIKey has a UDDI V3.0 format.
static UDDIKey makesV1(UDDIKey uddiKey)
          Makes a UDDIKey compliant with UDDI V1.0.
static UDDIKey makesV2(UDDIKey uddiKey)
          Makes a UDDIKey compliant with UDDI V2.0.
static UDDIKey makesV3(UDDIKey uddiKey)
          Makes a UDDIKey compliant with UDDI V3.0.If the key is not recognized as a valid key, it is returned "as is".
static BindingKey turnV2ToV3(BindingKey bindingKey)
          Turns an UDDI V2.0 or V1.0 BindingKey to an UDDI V3.0 BindingKey.
static BusinessKey turnV2ToV3(BusinessKey businessKey)
          Turns an UDDI V2.0 or V1.0 BusinessKey to an UDDI V3.0 BusinessKey.
static ServiceKey turnV2ToV3(ServiceKey serviceKey)
          Turns an UDDI V2.0 or V1.0 ServiceKey to an UDDI V3.0 ServiceKey.
static TModelKey turnV2ToV3(TModelKey tModelKey)
          Turns an UDDI V2.0 or V1.0 TModelKey to an UDDI V3.0 TModelKey.
static BindingKey turnV3ToV2(BindingKey bindingKey)
          Turns an UDDI V3.0 BindingKey to an UDDI V2.0 BindingKey.
static BusinessKey turnV3ToV2(BusinessKey businessKey)
          Turns an UDDI V3.0 BusinessKey to an UDDI V2.0 BusinessKey.
static ServiceKey turnV3ToV2(ServiceKey serviceKey)
          Turns an UDDI V3.0 ServiceKey to an UDDI V2.0 ServiceKey.
static TModelKey turnV3ToV2(TModelKey tModelKey)
          Turns an UDDI V3.0 TModelKey to an UDDI V2.0 TModelKey.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

keyMap32

protected static java.util.Hashtable keyMap32
A UDDI V3.0-UDDI V2.0 mapping table for keys of standardized TModels.


keyMap23

protected static java.util.Hashtable keyMap23
A UDDI V2.0-UDDI V3.0 mapping table for keys of standardized TModels.

Constructor Detail

KeysUtil

public KeysUtil()
Method Detail

isV3

public static boolean isV3(UDDIKey uddiKey)
Checks whether a UDDIKey has a UDDI V3.0 format. It is assumed that the key follows the recommandation stated in the UDDI V3.0 spec.

Returns:
whether a UDDIKey has a UDDI V3.0 format

isV2

public static boolean isV2(UDDIKey uddiKey)
Checks whether a UDDIKey has a UDDI V2.0 format.

Returns:
whether a UDDIKey has a UDDI V2.0 format

isV1

public static boolean isV1(UDDIKey uddiKey)
Checks whether a UDDIKey has a UDDI V1.0 format.

Returns:
whether a UDDIKey has a UDDI V1.0 format

makesV3

public static UDDIKey makesV3(UDDIKey uddiKey)
Makes a UDDIKey compliant with UDDI V3.0.If the key is not recognized as a valid key, it is returned "as is".

Returns:
a derived UDDI3.0-compliant UDDIKey or null if an invalid V2.0 or V1.0 key was passed

turnV2ToV3

public static BusinessKey turnV2ToV3(BusinessKey businessKey)
Turns an UDDI V2.0 or V1.0 BusinessKey to an UDDI V3.0 BusinessKey.

Parameters:
businessKey - An UDDI V2.0 or V1.0 BusinessKey.
Returns:
the corresponding UDDI V3.0 BusinessKey

turnV2ToV3

public static ServiceKey turnV2ToV3(ServiceKey serviceKey)
Turns an UDDI V2.0 or V1.0 ServiceKey to an UDDI V3.0 ServiceKey.

Parameters:
serviceKey - An UDDI V2.0 or V1.0 ServiceKey.
Returns:
the corresponding UDDI V3.0 ServiceKey

turnV2ToV3

public static BindingKey turnV2ToV3(BindingKey bindingKey)
Turns an UDDI V2.0 or V1.0 BindingKey to an UDDI V3.0 BindingKey.

Parameters:
bindingKey - An UDDI V2.0 or V1.0 BindingKey.
Returns:
the corresponding UDDI V3.0 BindingKey

turnV2ToV3

public static TModelKey turnV2ToV3(TModelKey tModelKey)
Turns an UDDI V2.0 or V1.0 TModelKey to an UDDI V3.0 TModelKey.

Parameters:
tModelKey - An UDDI V2.0 or V1.0 TModelKey.
Returns:
the corresponding UDDI V3.0 TModelKey

makesV2

public static UDDIKey makesV2(UDDIKey uddiKey)
Makes a UDDIKey compliant with UDDI V2.0. If the key is not recognized as a valid key, it is returned "as is".

Returns:
a derived UDDI2.0-compliant UDDIKey or the original key

turnV3ToV2

public static BusinessKey turnV3ToV2(BusinessKey businessKey)
Turns an UDDI V3.0 BusinessKey to an UDDI V2.0 BusinessKey.

Parameters:
businessKey - An UDDI V3.0 BusinessKey.
Returns:
the corresponding UDDI V2.0 BusinessKey

turnV3ToV2

public static ServiceKey turnV3ToV2(ServiceKey serviceKey)
Turns an UDDI V3.0 ServiceKey to an UDDI V2.0 ServiceKey.

Parameters:
serviceKey - An UDDI V3.0 ServiceKey.
Returns:
the corresponding UDDI V2.0 ServiceKey

turnV3ToV2

public static BindingKey turnV3ToV2(BindingKey bindingKey)
Turns an UDDI V3.0 BindingKey to an UDDI V2.0 BindingKey.

Parameters:
bindingKey - An UDDI V3.0 BindingKey.
Returns:
the corresponding UDDI V2.0 BindingKey

turnV3ToV2

public static TModelKey turnV3ToV2(TModelKey tModelKey)
Turns an UDDI V3.0 TModelKey to an UDDI V2.0 TModelKey.

Parameters:
tModelKey - An UDDI V3.0 TModelKey.
Returns:
the corresponding UDDI V2.0 TModelKey

makesV1

public static UDDIKey makesV1(UDDIKey uddiKey)
Makes a UDDIKey compliant with UDDI V1.0.

Returns:
a derived UDDI V1.0-compliant UDDIKey or null if an invalid V3.0 or V2.0 key was passed

computeV2Key

protected static java.lang.String computeV2Key(java.lang.String v3Key)
Computes a UDDI V2.0 key from a UDDI V3.0 key. Implements the algorithm described in the UDDI V3.0 specification, chapter "Multi-Version Support".

Returns:
the UDDI V2.0 key corresponding to the UDDI V3.0 key

Ruddi™ UDDI Client API
1.0

Download now! | Submit a bug or feature
(c) 2003 INSPIRE IT
Bld Brand Whitlock 109
1200 Brussels, Belgium
All Rights Reserved.