annotation-express-add-doc-list
コレクション内の複数の文書にある指定ユーザーに属するコンテンツを標準アノテーションとしてエンキューします。アノテーションの名前は、<content> ノードの name 属性で指定されます。各ユーザーは、標準アノテーションの複数インスタンスを各文書に関連付けることができます。この関数の SOAP 名は AnnotationExpressAddDocList です。
構文
void annotation-express-add-doc-list(collection, subcollection, content, documents, username, acl, synchronization, priority, datesecs);
nmtoken collection;
enum subcollection;
content nodeset content;
document nodeset documents;
string username;
string acl;
enum synchronization;
int priority;
int datesecs;
パラメーター
- nmtoken collection - アノテーションを追加する先の文書を保持するコレクションの名前。(必須)
- enum subcollection - エンキューする先のサブコレクション。デフォルト値: live。指定可能な値: live|staging。
- content nodeset content - 文書に追加される <content> ノード。少なくとも name 属性と値が必要です。(必須)
- document nodeset documents - すべての結果に指定されたコンテンツが追加される <document> ノード。各 <document> には少なくとも @vse-key 属性が必要です。(必須)
- string username - このアノテーションが属するユーザーの名前。 (必須)
- string acl - 使用する ACL。(必須)
- enum synchronization - 使用する同期モード。デフォルト値: indexed-no-sync。指定可能な値: enqueued|indexed|none|to-be-crawled|to-be-indexed|indexed-no-sync|none。
- int priority - 同時にクロールされる他の処理との関連におけるこのコンテンツのエンキューの優先順位。デフォルト値: 1
- int datesecs - アノテーションが実行済みとしてマークされる、エポック以降の日時 (秒)。設定されない場合、現在時刻が使用されます。バックアップ・ファイルからアノテーションをリストアする際に有用です。
例外
- annotation-content-missing-name-attribute
- annotation-content-missing-value
- annotation-document-missing-identifier
- search-collection-invalid-name
- search-collection-enqueue
認証
ping を除くすべての Watson™ Explorer Engine API 関数と同様に、annotation-express-add-doc-list 関数には認証が必要です。
REST を使用する場合、HTTP または HTTPS を介して単に v.username および v.password を CGI パラメーターとして渡し、annotation-express-add-doc-list 関数への REST 呼び出しを認証することができます。
SOAP API を使用する場合、エンドポイントで資格情報をパラメーターとして渡すか、すべての Watson Explorer Engine 関数でサポートされている認証方式を活用することができます。いずれも、関数の実行に使用されるユーザー名とパスワードを指定するために認証オブジェクトに渡すことができる setAuthentication メソッドを提供します。annotation-express-add-doc-list 関数への SOAP 呼び出しを Java で実行する例は次のとおりです。
Authentication authentication = new Authentication();
authentication.setUsername("joe-user");
authentication.setPassword("joes-password");
AnnotationExpressAddDocList foo = new AnnotationExpressAddDocList();
foo.setAuthentication(authentication);
通常、個々のアプリケーション全体で 1 つの認証オブジェクトが再使用されます。