Finding Organizations by Classification
Q
UERYING A
R
EGISTRY
183
BulkResponse response =
bqm.findOrganizations(findQualifiers, namePatterns, null,
null, null, null);
Collection orgs = response.getCollection();
Finding Organizations by Classification
To find organizations by classification, you establish the classification within a
particular classification scheme and then specify the classification as an argu-
ment to the
findOrganizations
method.
The following code fragment finds all organizations that correspond to a particu-
lar classification within the NAICS taxonomy. (You can find the NAICS codes at
has a well-known universally unique identifier (UUID) that is defined by the
UDDI specification. The
getRegistryObject
method finds an object based
String uuid_naics =
"uuid:C0B9FE13-179F-413D-8A5B-5004DB8E5BB2";
ClassificationScheme cScheme =
(ClassificationScheme) bqm.getRegistryObject(uuid_naics,
LifeCycleManager.CLASSIFICATION_SCHEME);
InternationalString sn = blcm.createInternationalString(
"All Other Specialty Food Stores"));
String sv = "445299";
Classification classification =
blcm.createClassification(cScheme, sn, sv);
Collection<Classification> classifications =
new ArrayList<Classification>();
classifications.add(classification);
BulkResponse response = bqm.findOrganizations(null, null,
classifications, null, null, null);
Collection orgs = response.getCollection();
You can also use classifications to find organizations that offer services based on
technical specifications that take the form of WSDL (Web Services Description
Language) documents. In JAXR, a concept is used as a proxy to hold the infor-
mation about a specification. The steps are a little more complicated than in the
preceding example, because the client must first find the specification concepts
and then find the organizations that use those concepts.
The following code fragment finds all the WSDL specification instances used
within a given registry. You can see that the code is similar to the NAICS query