Types of keyValues Taxonomy: Principles, Creation and Validation

keyedReference tModelKey=uddi:systinet.com:isOrderedBy keyValue=uddi:systinet.com:comparator:numeric Figure 42. Example of Numeric Categorization Figure 42 shows how the demo:location:floor taxonomy from Demo data can be assigned numeric key values. Important If you change type of keyValues of the taxonomy and there are entities in the Oracle Service Registry that were already categorized with the taxonomy, the Oracle Service Registry administrator must execute the task Transform keyed references . The button for executing this task is located in the Registry Control under the Manage tab, Registry Management link. See Administrators Guide, Section 1.1, Accessing Registry Management • To learn how to make this assignment using the Registry Control , see Users Guide, Section Adding a Category . • See Users Guide, Section 5.5.5, Searching how to search UDDI data structures using range queries with Registry Control. • See Administrators Guide , Section 1.5.3, Editing Taxonomies how to edit taxonomy type. Custom Ordinal Types You can define your custom ordinal types. To demonstrate possible extensions, Oracle Service Registry contains two demo comparators: • systinet-com:comparator:date • systinet-com:comparator:stringToLowerCase Lets assume you want to create a taxonomy with date values in keyValues. You must mark the taxonomy tModel that is, add the following keyedReference into its categoryBag by keyedReference tModelKey=uddi:systinet.com:isOrderedBy keyValue=uddi:systinet.com:comparator:date . It is quite easy because there is a demo comparator for date in the registry. Imagine the date comparator is not present. Take the following steps to create it in the registry: Page 215 Custom Ordinal Types 1. Create a transformer service that transforms the date value into a string or numeric value. The transformer service must implement org.systinet.uddi.client.transformer.kr.TransformerKeyedReferenceApi and add this class to the Oracle Service Registry class path. 2. Create a new comparator tModel for date. The tModel must be categorized as a comparator using the systinet- com:comparator taxonomy. The comparator must refer to the transformer service. This reference is specified by the taxonomy IsTransformedBy where uddi:cba104c0-fb5c-11d8-8761-eb2505508761 is the key of the bindingTemplate with the specification of the transformer service. Important If you change implementation of the of the transformer service of the taxonomy and there are entities in the Oracle Service Registry that were already categorized with the taxonomy, the Oracle Service Registry administrator must execute the task Transform keyed references. The button for executing this task is located in the Registry Control under the Manage tab, Registry Management link. See Administrators Guide, Section 1.1, Accessing Registry Management Figure 43 shows the tModel references for date categorization ordering. It describes a purchase order document that has been mapped to Oracle Service Registry via XML-to-UDDI functionality, and then categorized by the acceptancedate taxonomy. The categorization taxonomy must refer to the comparator tModel uddi:systinet.com:comparator:date that references a bindingTemplate with the location of the date transformation service. Figure 43. Example of Custom Categorization date Page 216 Custom Ordinal Types The transformer service is called whenever the appropriate keyedReference is processed. If any entity contains the keyedReference with a taxonomy tModel whose type is custom then the transformer service is called to discover the correct that is, transformed keyValue of the keyedReference. Such transformed values are stored into the database. If you want to find entities by this keyedReference the keyedReference with the same taxonomy tModel, the service is called again to get the transformed value. Transformed values are used for the saving and searching of keyedReferences. See Administrators Guide , Section 1.5.3, Editing Taxonomies how to edit taxonomy type.

5.4.5. Taxonomy API

This section demonstrates the basics of taxonomy API and taxonomy persistence format. A comprehensive description of the Taxonomy API can be found in the Developers Guide, Section 2.2.2, Taxonomy . Note For clarity, we use an XML representation, but you can achieve the same results with Java objects. taxonomy xmlns=http:systinet.comudditaxonomyv35.0 xmlns:uddi=urn:uddi-org:api_v3 check=false tModel tModelKey=uddi:systinet.com:demo:myTaxonomy uddi:nameMy taxonomyuddi:name uddi:descriptionCategory systemuddi:description tModel compatibilityBag compatibilitybusinessEntitycompatibility compatibilityBag categorizationBag categorizationcategorizationcategorization categorizationBag taxonomy Each taxonomy, in order to be saved, requires a valid tModel. While it must contain a tModelKey and a name, you do not need to set the content of the categoryBag. • The Taxonomy attribute check determines whether the taxonomy will be checked or not. • The compatibilityBag is an interface to Systinets uddi:systinet.com:taxonomy:categorization taxonomy, which is used to limit usage of the selected taxonomy within the four main UDDI structure types. In this way you can enforce that your taxonomy can be used only within the UDDI structures of your choice and not in others. • The categorizationBag is used to declare the type of the taxonomy, for example, whether it is a categorization, categorizationGroup, identifier or relationship taxonomy. Note that values may be combined. Lets enhance the previous example and convert the taxonomy from unchecked to checked. Checked taxonomies must contain Validation. In this example, the taxonomy is checked by the Custom Validation Web service located at http:www.foo.comMyValidationService.wsdl . taxonomy xmlns=http:systinet.comudditaxonomyv35.0 xmlns:uddi=urn:uddi-org:api_v3 check=true tModel tModelKey=uddi:foo.com:demo:myTaxonomy Page 217

5.4.5. Taxonomy API

uddi:nameMy taxonomyuddi:name uddi:descriptionCategory systemuddi:description tModel compatibilityBag compatibilitybusinessEntitycompatibility compatibilityBag categorizationBag categorizationcategorizationcategorization categorizationBag validation bindingTemplate bindingKey= serviceKey= xmlns=urn:uddi-org:api_v3 accessPoint useType=endPoint http:www.foo.comMyValidationService.wsdl accessPoint tModelInstanceDetails tModelInstanceInfo tModelKey=uddi:uddi.org:v3_valueSetValidation tModelInstanceInfo tModelKey=uddi:systinet.com:demo:myTaxonomy tModelInstanceDetails bindingTemplate validation taxonomy The validation element must hold the bindingTemplate identifying the validation Web service or categories structures. In this example we chose bindingTemplate. It must contain complete accessPoint and tModelInstanceDetails must hold the Valueset_validation API and tModelKey of the saved taxonomy. If the serviceKey is specified and if the businessService already exists, it must be part of the Operational Business Entity. Important Be aware that the service will be replaced during the save_taxonomy process. If you can provide a list of allowed values, you do not need to implement your own validation Web service. Just provide the allowed values inside the categories structure as shown below and the Internal Validation Service will be responsible for validation of the keyedReferences. taxonomy xmlns=http:systinet.comudditaxonomyv35.0 xmlns:uddi=urn:uddi-org:api_v3 check=true tModel tModelKey=uddi:foo.com:demo:myTaxonomy uddi:nameMy taxonomyuddi:name uddi:descriptionCategory systemuddi:description tModel compatibilityBag compatibilitybusinessEntitycompatibility compatibilityBag categorizationBag categorizationcategorizationcategorization categorizationBag validation categories category keyName=Value A keyValue=A Page 218

5.4.5. Taxonomy API