Chapter 9. Adding custom Category_Identifier systems for Organizations_Services_Endpoints

Version 1 by Sandra TRINO
on Feb 15, 2010 10:09.

compared with
Version 2 by Sandra TRINO
on Feb 15, 2010 11:43.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (46)

View Page History

\\
Petals Master allows to add custom Category and Identifier systems for Organizations, Services and Endpoints to the registry at startup.
Standard UDDI Category and Identifier systems are registered at Petals Master startup thanks to an XML dataset available in "$\{petals-master-root\}/WEB-INF/classes/tmodel/" and called "base-tmodels.xml". You could add your custom Category and Identifier systems thanks to this file. Once added, they will be available in UI and WS API and then, they could be used with Services, Endpoints and Organizations.
\\
{color:#cc0000}*Caution*{color} {color:#cc0000}{*}Caution{*}{color}\\
\\
Don't remove standard TModels from "base-tmodels.xml". They are Petals Master requirements.
\\
h1.{color:#003f80}*9.1.*{color} {color:#003f80}*Adding*{color} {color:#003f80}*custom*{color} {color:#003f80}*categorisation*{color} {color:#003f80}*system*{color} {color:#003f80}*and*{color} {color:#003f80}*associated*{color} {color:#003f80}*values*{color}

h1. {color:#003f80}{*}9.1.*{color} {color:#003f80}{*}Adding{*}{color} {color:#003f80}{*}custom{*}{color} {color:#003f80}{*}categorization{*}{color} {color:#003f80}{*}system{*}{color} {color:#003f80}{*}and{*}{color} {color:#003f80}{*}associated{*}{color} {color:#003f80}{*}values{*}{color}

\\
Here is a code snippet allowing to add a custom category to Petals Master registry at startup :
\\
<tModel -tModelKey="uddi:dragon.org:myCustomCategory">
- - - - - -<name>My -Custom -Category</name>
- - - - - -<description -xml:lang="en">
- - - - - - - -Describe -my -custom -category
- - - - - -</description>
- - - - - -<overviewDoc>
- - - - - - - - - -<overviewURL -useType="text">
[-|http://dragon.org/MyCustomCategoryFullDescription.txt] - - - - - - - - - - - - -http://dragon.org/MyCustomCategoryFullDescription.txt
- - - - - - - - - -</overviewURL>
- - - - - -</overviewDoc>
- - - - - -<overviewDoc>
- - - - - - - - - -<overviewURL -useType="valueSet">
[-|http://dragon.org/MyCustomCategory-valueSet.txt] - - - - - - - - - - - - -http://dragon.org/MyCustomCategory-valueSet.txt
- - - - - - - - - -</overviewURL>
- - - - - -</overviewDoc>
- - - - - -<categoryBag>
- - - - - - - - - -<keyedReference -keyName="uddi-org:types:categorization"
- - - - - - - - - - - - - -keyValue="categorization"
- - - - - - - - - - - - - -tModelKey="uddi:uddi.org:categorization:types"/>
- - - - - - - - - -<keyedReference -keyName="uddi-org:types:valueSet" -keyValue="valueSet"
- - - - - - - - - - - - - -tModelKey="uddi:uddi.org:categorization:types"/>
- - - - - - - - - -<keyedReference -keyName="dragon.org:category:type" -keyValue="all"
- - - - - - - - - - - - - -tModelKey="uddi:uddi.org:categorization:general_keywords"/>
- - - - - -</categoryBag>
{code:lang=xml}<tModel tModelKey="uddi:dragon.org:myCustomCategory">
<name>My Custom Category</name>
<description xml:lang="en"> Describe my custom category </description>
</tModel>\\ <overviewDoc>
<overviewURL useType="text">
\\ http://dragon.org/MyCustomCategoryFullDescription.txt
</overviewURL>
</overviewDoc>
<overviewDoc>
<overviewURL useType="valueSet">
http://dragon.org/MyCustomCategory-valueSet.txt
</overviewURL>
</overviewDoc>
<categoryBag>
<keyedReference keyName="uddi-org:types:categorization"
keyValue="categorization"
tModelKey="uddi:uddi.org:categorization:types"/>
<keyedReference keyName="uddi-org:types:valueSet"
keyValue="valueSet"
tModelKey="uddi:uddi.org:categorization:types"/>
<keyedReference keyName="dragon.org:category:type"
keyValue="all"
tModelKey="uddi:uddi.org:categorization:general_keywords"/>
</categoryBag>
</tModel>{code}
The *tModel* element : a category system is a TModel in UDDI taxonomy. You could specify a key for this TModel with the *tModelKey* attribute. If you don't specify any key, Petals Master will generate a key for you. Keys must have the following form "uddi:$\{root.domain\}:{_}anythingElse{_}". "uddi:$\{root.domain\}:_anythingElse_". For exeample, if the root domain specified in dragon.properties file is "mycompany.com", a valid key is "uddi:mycompany.com:foobar". If the key is generated by Petals Master, it will have the following form "uddi:$\{root.domain\}:{_}uuid{_}" "uddi:$\{root.domain\}:_uuid_" where _uuid_ is an auto-generated unique identifier.
\\
{color:#cc0000}*Caution*{color} {color:#cc0000}{*}Caution{*}{color}
\\
if you specify your own keys, you're in charge of the unicity.
\\
The *name* element : the name of the category system. Will be used to represent the category system in UI.
\\
The *description* element : a human readable description of this category system. You could specify the language used for this description. Language is specified with a two letters country code as specified in the [{color:#003f80}{+}iso3166 specification{+}{color}. |http://www.iso.org/iso/fr/country_codes/iso_3166_code_lists.htm]
\\

*overviewDoc* elements : they have two main purposes. A descriptive purpose. In this case, it will embed an *overviewUrl* element of *useType* "text", that point to a description URL. It will be used to provide a more detailed description of the category system. overviewDoc could also be used to specify a value set for this category system. In this case, it will embed an *overviewUrl* element of *useType* "valueSet", that point to a file listing all values and their related description. This value set file is a text file, each line is a "{_}value{_}" _"description{_}" "_value_" _"description_" couple separated by ";" character :
\\
value1;description -1 value2;description -2 value3;description -3
value1;description \-1

value2;description \-2

value3;description \-3

...
\\
The *categoryBag* element : used to classify the categorization system. The first *keyedReference* embeded element must be unchanged, it specifies that this tModel is a category tModel. The second one is optional but required if you have associated a value set to this category (using the overviewDoc element of useType "valueSet"). The last keyedReference embeded element is used to specified to which entities this categorization system applies (allowed keyValue attribute are, "all" to specify that this category applies to Organization, Services and Endpoint, "businessService" applies only to Services, "businessEntity" applies only to Organizations and "bindingTemplate" applies only to Endpoints.
\\
h1.{color:#003f80}*9.2.*{color} {color:#003f80}*Adding*{color} {color:#003f80}*custom*{color} {color:#003f80}*identification*{color} {color:#003f80}*system*{color}

h1. {color:#003f80}{*}9.2.*{color} {color:#003f80}{*}Adding{*}{color} {color:#003f80}{*}custom{*}{color} {color:#003f80}{*}identification{*}{color} {color:#003f80}{*}system{*}{color}

\\
Here is a code snippet allowing to add a custom identifier to Petals Master registry at startup :
\\
<tModel -tModelKey="uddi:dragon.org:myCustomIdentifier">
- - - - - -<name>My -Custom -Identifier</name>
- - - - - -<description -xml:lang="en">
- - - - - - - -Describe -my -custom -identifier
- - - - - -</description>
- - - - - -<overviewDoc>
- - - - - - - - - -<overviewURL -useType="text">
[-|http://dragon.org/MyCustomIdentifierFullDescription.txt] - - - - - - - - - - - - -http://dragon.org/MyCustomIdentifierFullDescription.txt
- - - - - - - - - -</overviewURL>
- - - - - -</overviewDoc>
- - - - - -<categoryBag>
- - - - - - - - - -<keyedReference -keyName="uddi-org:types:identifier"
- - - - - - - - - - - - - - - -keyValue="identifier"
- - - - - - - - - - - - - - - -tModelKey="uddi:uddi.org:categorization:types"/>
- - - - - - - - - -<keyedReference -keyName="dragon.org:category:type" -keyValue="businessEntity"
- - - - - - - - - - - - - -tModelKey="uddi:uddi.org:categorization:general_keywords"/>
- - - - - -</categoryBag>
{code:lang=xml}<tModel tModelKey="uddi:dragon.org:myCustomIdentifier">
<name>My Custom Identifier</name>
<description xml:lang="en">Describe my custom identifier</description>
</tModel> <overviewDoc>
<overviewURL useType="text">
\\ http://dragon.org/MyCustomIdentifierFullDescription.txt
</overviewURL>
</overviewDoc>
<categoryBag>
<keyedReference keyName="uddi-org:types:identifier"
keyValue="identifier"
tModelKey="uddi:uddi.org:categorization:types"/>
<keyedReference keyName="dragon.org:category:type"
keyValue="businessEntity"
tModelKey="uddi:uddi.org:categorization:general_keywords"/>
</categoryBag>
</tModel> {code}
The *tModel* element : an identifier system is a TModel in UDDI taxonomy. You could specify a key for this TModel with the *tModelKey* attribute. If you don't specify any key, Petals Master will generate a key for you. Keys must have the following form "uddi:$\{root.domain\}:{_}anythingElse{_}". "uddi:$\{root.domain\}:_anythingElse_". For exemple, if the root domain specified in *dragon.properties* file is "mycompany.com", a valid key is "uddi:mycompany.com:foobar". If the key is generated by Petals Master, it will have the following form "uddi:$\{root.domain\}:{_}uuid{_}" "uddi:$\{root.domain\}:_uuid_" where _uuid_ is an auto-generated unique identifier.\\ identifier.&nbsp;
\\
{color:#cc0000}*Caution*{color} {color:#cc0000}{*}Caution{*}{color}
\\
&nbsp;
if you specify your own keys, you're in charge of the unicity.&nbsp;
\\
The *name* element : the name of the identifier system. Will be used to represent the identifier system in UI.&nbsp;
\\
The *description* element : a human readable description of this identifier system. You could specify the language used for this description. Language is specified with a two letters country code as specified in the [{color:#003f80}{+}iso3166 specification{+}{color}.|http://www.iso.org/iso/fr/country_codes/iso_3166_code_lists.htm]
\\

&nbsp;
*overviewDoc* elements : in the identifier case, they have only one main purpose, a descriptive purpose. In this case, it will embed an *overviewUrl* element of *useType* "text", that point to a description URL. It will be used to provide a more detailed description of the identifier system.&nbsp;
\\
The *categoryBag* element : used to classify the identifier system. The first *keyedReference* embeded element must be unchanged, it specifies that this tModel is a category tModel. The second one must be unchanged too because identifier tmodels only apply to Organizations.