background image

Publishing a Classification Scheme

<< Running the JAXRPublish Example | Deleting a Classification Scheme >>
<< Running the JAXRPublish Example | Deleting a Classification Scheme >>
R
UNNING THE
E
XAMPLES
203
Publishing a Classification Scheme
To publish organizations with postal addresses, you must first publish a classifi-
cation scheme for the postal address.
To run the
JAXRSaveClassificationScheme
program, use the target
run-save-
scheme
:
asant run-save-scheme
The program returns a UUID string, which you will use in the next section.
Running the Postal Address Examples
Before you run the postal address examples, perform these steps:
1. Open the file
src/postalconcepts.xml
in an editor.
2. Wherever you see the string
uuid-from-save
, replace it with the UUID
string returned by the
run-save-scheme
target (including the
uuid:
pre-
fix).
For a given registry, you only need to publish the classification scheme and edit
postalconcepts.xml
once. After you perform those steps, you can run the
JAXRPublishPostal
and
JAXRQueryPostal
programs multiple times.
1. Run the
JAXRPublishPostal
program. Specify the string you entered in
the
postalconcepts.xml
file, including the
uuid:
prefix, as input to the
run-publish-postal
target:
asant -Duuid-string=uuidstring run-publish-postal
The
uuidstring
would look something like this:
uuid:938d9ccd-a74a-4c7e-864a-e6e2c6822519
The program output displays the string value of the key of the new organi-
zation.
2. Run the
JAXRQueryPostal
program. The
run-query-postal
target spec-
ifies the
postalconcepts.xml
file in a
<sysproperty>
tag.
As input to the
run-query-postal
target, specify both a
query-string
argument and a
uuid-string
argument on the command line to search
the registry for the organization published by the
run-publish-postal
target:
asant -Dquery-string=coffee
-Duuid-string=uuidstring run-query-postal