Service Registry 3 2005Q4 開発者ガイド

オブジェクトの名前または説明の取得

オブジェクトの名前と説明は、どちらも InternationalString オブジェクトです。InternationalString オブジェクトには LocalizedString オブジェクトの集合が格納されます。RegistryObject.getName メソッドおよび RegistryObject.getDescription メソッドは、デフォルトロケールの LocalizedString オブジェクトを返します。その後、LocalizedString オブジェクトの String 値を取得できます。これらのメソッドを使用するコードの例を次に示します。

String name = ro.getName().getValue();
String description = ro.getDescription().getValue();

特定のロケールの値を取得するには、Locale 引数を指定して getName メソッドまたは getDescription メソッドを呼び出します。

サンプルの多くには、オブジェクトの名前、説明、および一意の識別子を取得する private のユーティリティーメソッドが含まれています。たとえば、<INSTALL>ー/registry/samples/get-objects/src ディレクトリにある JAXRGetMyObjects.java を参照してください。