Finding objects by external link does not require the use of a classification scheme, but it does require you to specify a valid URI. The arguments to the createExternalLink method are a URI and a description.
If the link you specify is outside your firewall, you must also specify the system properties http.proxyHost and http.proxyPort when you run the program so that JAXR can determine the validity of the URI.
The following code fragment finds all organizations that have a specified ExternalLink object.
ExternalLink extLink = blcm.createExternalLink("http://java.sun.com/", "Sun Java site"); Collection extLinks = new ArrayList(); extLinks.add(extLink); BulkResponse response = bqm.findObjects("Organization", null, null, null, null, null, extLinks); Collection objects = response.getCollection();
For an example of finding objects by external link, see JAXRSearchByExternalLink.java in the directory<INSTALL>/registry/samples/search-external-link/src, which searches for objects that have a specified external link. The http.proxyHost and http.proxyPort properties are specified in the run target in the build.xml file.
To obtain results from this example, first run the publish-object example described in Adding Classifications: Example.