background image

Using Taxonomies in JAXR Clients

<< Removing Data from the Registry | Defining a Taxonomy >>
<< Removing Data from the Registry | Defining a Taxonomy >>
194
J
AVA
API
FOR
XML R
EGISTRIES
Using Taxonomies in JAXR Clients
In the JAXR API, a taxonomy is represented by a
ClassificationScheme
object. This section describes how to use the implementation of JAXR in the
Application Server to perform these tasks:
· To define your own taxonomies
· To specify postal addresses for an organization
Defining a Taxonomy
The JAXR specification requires that a JAXR provider be able to add user-
defined taxonomies for use by JAXR clients. The mechanisms clients use to add
and administer these taxonomies are implementation-specific.
The implementation of JAXR in the Application Server uses a simple file-based
approach to provide taxonomies to the JAXR client. These files are read at run-
time, when the JAXR provider starts up.
The taxonomy structure for the Application Server is defined by the JAXR Pre-
defined Concepts DTD, which is declared both in the file
jaxrconcepts.dtd
and, in XML schema form, in the file
jaxrconcepts.xsd
. The file
jaxrcon-
cepts.xml
contains the taxonomies for the implementation of JAXR in the
Application Server. All these files are contained in the
<JAVAEE_HOME>/lib/
appserv-ws.jar
file. This JAR file also includes files that define the well-
known taxonomies used by the implementation of JAXR in the Application
Server:
naics.xml
,
iso3166.xml
, and
unspsc.xml
.
The entries in the
jaxrconcepts.xml
file look like this:
<PredefinedConcepts>
<JAXRClassificationScheme id="schId" name="schName">
<JAXRConcept id="schId/conCode" name="conName"
parent="parentId" code="conCode">
</JAXRConcept>
...
</JAXRClassificationScheme>
</PredefinedConcepts>
The taxonomy structure is a containment-based structure. The element
Pre-
definedConcepts
is the root of the structure and must be present. The
JAXR-
ClassificationScheme
element is the parent of the structure, and the