background image

Specifying Postal Addresses

<< Taxonomy structure | Create a postal address >>
<< Taxonomy structure | Create a postal address >>
U
SING
T
AXONOMIES IN
JAXR C
LIENTS
197
4. To add the user-defined taxonomy structure to the JAXR provider, specify
the connection property
com.sun.xml.registry.userTaxonomyFile-
names
in your client program. You set the property as follows:
props.setProperty
("com.sun.xml.registry.userTaxonomyFilenames",
"c:\mydir\xxx.xml|c:\mydir\xxx2.xml");
Use the vertical bar (
|
) as a separator if you specify more than one file
name.
Specifying Postal Addresses
The JAXR specification defines a postal address as a structured interface with
attributes for street, city, country, and so on. The UDDI specification, on the
other hand, defines a postal address as a free-form collection of address lines,
each of which can also be assigned a meaning. To map the JAXR
Postal-
Address
format to a known UDDI address format, you specify the UDDI format
as a
ClassificationScheme
object and then specify the semantic equivalences
between the concepts in the UDDI format classification scheme and the com-
ments in the JAXR
PostalAddress
classification scheme. The JAXR
Postal-
Address
classification scheme is provided by the implementation of JAXR in the
Application Server.
In the JAXR API, a
PostalAddress
object has the fields
streetNumber
,
street
,
city
,
state
,
postalCode
, and
country
. In the implementation of JAXR in the
Application Server, these are predefined concepts in the
jaxrconcepts.xml
file,
within the
ClassificationScheme
named
PostalAddressAttributes
.
To specify the mapping between the JAXR postal address format and another
format, you set two connection properties:
· The
javax.xml.registry.postalAddressScheme
property, which spec-
ifies a postal address classification scheme for the connection
· The
javax.xml.registry.semanticEquivalences
property, which
specifies the semantic equivalences between the JAXR format and the
other format
For example, suppose you want to use a scheme named
MyPostalAddress-
Scheme
, which you published to a registry with the UUID
uuid:f7922839-
f1f7-9228-c97d-ce0b4594736c
.
<JAXRClassificationScheme id="uuid:f7922839-f1f7-9228-c97d-
ce0b4594736c" name="MyPostalAddressScheme">