UiPath Documentation
activities
latest
false
Document Understanding アクティビティ
重要 :
このコンテンツの一部は機械翻訳によって処理されており、完全な翻訳を保証するものではありません。 新しいコンテンツの翻訳は、およそ 1 ~ 2 週間で公開されます。

ExtractionResultHandler Class

ExtractionResultHandler entry point of the V1 navigator, with the constructor, factory and conversion methods, and the field navigation members it inherits.

定義

  • 名前空間: UiPath.DocumentProcessing.Contracts.Extensions.Navigator.V1
  • アセンブリ: UiPath.DocumentProcessing.Contracts
  • Inherits: ComponentCollectionFacade

説明

ExtractionResultHandler is the entry point of the V1 navigator. It provides a fluent, strongly-typed way to navigate and edit the fields of an ExtractionResult without manually casting raw ResultsDataPoint and ResultsValue objects.

A handler is created from an ExtractionResult and wraps the field collection at ExtractionResult.ResultsDocument.Fields. The inherited navigation methods then reach each field as a typed facade:

Because the handler inherits from ComponentCollectionFacade, the navigation methods listed under Inherited members are available directly on the handler.

メンバー

コンストラクター

コンストラクター説明
ExtractionResultHandler(ExtractionResult extractionResult)Initializes a new navigator over the fields of the specified extraction result (ResultsDocument.Fields).

Factory and conversion methods

All methods in this section are static.

メソッド戻り値説明
FromExtractionResult(ExtractionResult extractionResult)ExtractionResultHandlerCreates a navigator from an extraction result.
FromTable(ResultsDataPoint tableDataPoint)TableDataPointWraps a table data point in a table facade.
FromFieldGroup(ResultsDataPoint fieldGroupDataPoint)FieldGroupDataPointWraps a field group data point in a field group facade.
FromBasicDataPoint(ResultsDataPoint basicDataPoint)BasicDataPointWraps a basic data point in a basic field facade.
FromDataPoint(ResultsDataPoint dataPoint)WildcardDataPointWraps any data point in a wildcard facade.
FromFieldGroupValue(ResultsValue resultsValue)FieldGroupValueWraps a field group value in a field group value facade.
FromTableValue(ResultsValue tableValue)TableValueWraps a table value in a table value facade.
FromTableRow(ResultsValue tableRow)TableRowWraps a table row value in a table row facade.
FromBasicValue(ResultsValue basicValue)BasicValueWraps a basic value in a basic value facade.

Inherited members

The following methods are inherited from ComponentCollectionFacade and are available directly on ExtractionResultHandler. The fieldLookup and tableLookup parameters follow the field lookup resolution rules in FieldLookupBase.

メソッド戻り値説明
GetFields(Func<ResultsDataPoint, bool> condition = null, bool recursive = false)WildcardDataPointCollectionReturns the fields matching condition, or all fields when condition is null. When recursive is true, nested fields are included.
GetSimpleFields()BasicDataPoint[]Returns all basic (non-complex) fields.
GetSimpleField(string fieldLookup)BasicDataPointReturns the basic field matching the lookup.
GetTables()TableDataPoint[]Returns all table fields.
GetTable(string tableLookup)TableDataPointReturns the table field matching the lookup.
GetTableValue(string tableLookup)TableValueReturns the value of the table field matching the lookup.
GetFieldGroups()FieldGroupDataPoint[]Returns all field group fields.
GetFieldGroup(string fieldLookup)FieldGroupDataPointReturns the field group field matching the lookup.
GetFieldGroupValue(string fieldLookup, int index)FieldGroupValueReturns the field group instance at index for the field matching the lookup.

When the Generate Data Type property of the Extract Document Data activity is off, you can obtain a handler directly from the activity output through the Handler property: var handler = DocumentData.Data.Handler;.

The following example creates a handler from an ExtractionResult and uses the navigation methods to read date values, a field group instance, and one of its child fields.

using UiPath.DocumentProcessing.Contracts.Taxonomy;
using UiPath.DocumentProcessing.Contracts.Extensions.Navigator.V1;

// Create a navigator over the fields of an extraction result.
var handler = new ExtractionResultHandler(extractionResult);

// Get all date values across the document (recursive to include nested fields).
foreach (var dateField in handler.GetFields(dp => dp.FieldType == FieldType.Date, recursive: true).BasicFields)
{
    foreach (var dateValue in dateField.Values)
    {
        Console.WriteLine($"{dateField.FieldName}: {dateValue.Value}");
    }
}

// Get the 3rd instance of the "ShippingDetails" field group (index is zero-based).
var shippingInstance = handler.GetFieldGroupValue("ShippingDetails", 2);

// From that instance, read a child field value.
var city = shippingInstance.GetSimpleField("City");
string cityText = city?.Value?.Value;
using UiPath.DocumentProcessing.Contracts.Taxonomy;
using UiPath.DocumentProcessing.Contracts.Extensions.Navigator.V1;

// Create a navigator over the fields of an extraction result.
var handler = new ExtractionResultHandler(extractionResult);

// Get all date values across the document (recursive to include nested fields).
foreach (var dateField in handler.GetFields(dp => dp.FieldType == FieldType.Date, recursive: true).BasicFields)
{
    foreach (var dateValue in dateField.Values)
    {
        Console.WriteLine($"{dateField.FieldName}: {dateValue.Value}");
    }
}

// Get the 3rd instance of the "ShippingDetails" field group (index is zero-based).
var shippingInstance = handler.GetFieldGroupValue("ShippingDetails", 2);

// From that instance, read a child field value.
var city = shippingInstance.GetSimpleField("City");
string cityText = city?.Value?.Value;
  • 定義
  • 説明
  • メンバー
  • コンストラクター
  • Factory and conversion methods
  • Inherited members

このページは役に立ちましたか?

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得