ingestManagedAttributeValues操作

ingestManagedAttributeValues操作によって、データ・ドメインに管理値をロードできます。

ingestManagedAttributeValues構造内では、ingestManagedAttributeValue要素によって、各管理値が属する管理属性を指定します。管理属性がデータ・ドメインに存在しない場合、サービスによって自動的に管理属性が作成されます。

ingestManagedAttributeValues操作を使用して、データ・ドメインに外部管理分類(EMT)をロードできます。外部管理分類は、ロードされると、管理属性および管理値として追加されます。

ingestManagedAttributeValuesリクエストの構文

ingestManagedAttributesValues操作リクエストでは、次の書式を使用します。
<ingestManagedAttributeValues>
   <managedAttributeValue displayName="dName" spec="maValueSpec" 
         parentSpec="pSpec" managedAttribute="maName">
      <synonym>synName</synonym>
      <properties>
         <propName type="mdex:string">propValue</propName>
      </properties>
   </managedAttributeValue>
</ingestManagedAttributeValues>
ManagedAttributeValue要素によって、1つの管理値を定義します。属性とサブ要素の意味は次のとおりです。
要素/属性 用途
managedAttribute 管理値が属する管理属性の名前。名前はNCName書式を使用する必要があります。
displayName ユーザー・インタフェースでの表示名として使用可能な管理値の名前。名前にNCName書式を使用する必要はありません。
parentSpec この管理値の親ID (管理属性spec)を指定します。ルート管理値の場合、IDとしてスラッシュ(/)を使用します。子管理値の場合、親管理値の一意のIDを指定します。
spec 管理値の一意の文字列識別子。リクエストの識別子を提供するのはクライアントの役割です。
synonym オプションでシノニムの名前を定義します。シノニムを管理値に追加すると、ユーザーは、他のテキスト文字列で検索しても、元の管理値の名前で検索した場合と同じレコードを取得できます。シノニムは、ルートと子管理値の両方に追加できます。
properties オプションで管理値のプロパティを定義します。管理値のプロパティは、特定の管理値に関するわかりやすい情報を提供するもので、アプリケーションによる表示目的で使用されます。

管理属性値の追加の例

たとえば、Component管理属性が存在するものと想定し、次の例では、それに3つの管理値(Derailleur、TireおよびMichelin)を追加しています。
<soapenv:Envelope 
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:ns="http://www.endeca.com/MDEX/ingest/2/0">
   <soapenv:Header/>
   <soapenv:Body>
     <ns:ingestManagedAttributeValues>
       <ns:managedAttributeValue displayName="derailleur gears" spec="Derailleur" parentSpec="/" 
           managedAttribute="Component">
         <ns:synonym>Chain</ns:synonym>
         <ns:synonym>Gear</ns:synonym>
       </ns:managedAttributeValue>
       <ns:managedAttributeValue displayName="bicycle tires" spec="Tire" parentSpec="/" 
           managedAttribute="Component">
         <ns:properties>
           <myStrProp type="mdex:string">source:CAS</myStrProp>
         </ns:properties>
       </ns:managedAttributeValue>
       <ns:managedAttributeValue displayName="Michelin brand" spec="Michelin"
           parentSpec="Tire" managedAttribute="Component">
       </ns:managedAttributeValue>
     </ns:ingestManagedAttributeValues>
   </soapenv:Body>
</soapenv:Envelope>

この例で、Derailleur管理値およびTire管理値はComponent管理属性のルートにあり、Michelin管理値はTire管理値の子になります。2つのシノニムがDerailleur管理値に対して作成され、stringプロパティ(myStrProp)がTire管理値に対して作成されていることにも注意してください。

まだComponent管理属性が存在していない場合は、リクエストによって作成されます(PDRおよびDDRにはデフォルト設定を使用)。