background image

Running the JAXRPublish Example

<< Compiling the Examples | Publishing a Classification Scheme >>
<< Compiling the Examples | Publishing a Classification Scheme >>
202
J
AVA
API
FOR
XML R
EGISTRIES
Running the JAXRPublish Example
To run the
JAXRPublish
program, use the
run-publish
target with no com-
mand-line arguments:
asant run-publish
The program output displays the string value of the key of the new organization.
After you run the
JAXRPublish
program but before you run
JAXRDelete
, you
can run
JAXRQuery
to look up the organization you published.
Running the JAXRQuery Example
To run the
JAXRQuery
example, use the
asant
target
run-query
. Specify a
query-string
argument on the command line to search the registry for organi-
zations whose names contain that string. For example, the following command
line searches for organizations whose names contain the string
"coffee"
(searching is not case-sensitive):
asant -Dquery-string=coffee run-query
Running the JAXRQueryByNAICSClassification
Example
After you run the
JAXRPublish
program, you can also run the
JAXRQueryByNA-
ICSClassification
example, which looks for organizations that use the All
Other Specialty Food Stores classification, the same one used for the organiza-
tion created by
JAXRPublish
. To do so, use the
asant
target
run-query-naics
:
asant run-query-naics
Running the JAXRDelete Example
To run the
JAXRDelete
program, specify the key string displayed by the
JAXR-
Publish
program as input to the
run-delete
target:
asant -Dkey-string=keyString run-delete