-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Form Recognizer] Support new features on Document Page (#34317)
- Loading branch information
Showing
28 changed files
with
1,051 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 0 additions & 46 deletions
46
...azure/ai/formrecognizer/documentanalysis/implementation/models/DocumentSignatureType.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 0 additions & 55 deletions
55
...azure/ai/formrecognizer/documentanalysis/implementation/models/DocumentTableCellKind.java
This file was deleted.
Oops, something went wrong.
46 changes: 0 additions & 46 deletions
46
...in/java/com/azure/ai/formrecognizer/documentanalysis/implementation/models/FontStyle.java
This file was deleted.
Oops, something went wrong.
46 changes: 0 additions & 46 deletions
46
...n/java/com/azure/ai/formrecognizer/documentanalysis/implementation/models/FontWeight.java
This file was deleted.
Oops, something went wrong.
54 changes: 54 additions & 0 deletions
54
...zure/ai/formrecognizer/documentanalysis/implementation/util/DocumentAnnotationHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
package com.azure.ai.formrecognizer.documentanalysis.implementation.util; | ||
|
||
import com.azure.ai.formrecognizer.documentanalysis.models.DocumentAnnotation; | ||
import com.azure.ai.formrecognizer.documentanalysis.models.DocumentAnnotationKind; | ||
import com.azure.ai.formrecognizer.documentanalysis.models.Point; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* The helper class to set the non-public properties of an {@link DocumentAnnotation} instance. | ||
*/ | ||
public final class DocumentAnnotationHelper { | ||
private static DocumentAnnotationAccessor accessor; | ||
|
||
private DocumentAnnotationHelper() { | ||
} | ||
|
||
/** | ||
* Type defining the methods to set the non-public properties of an {@link DocumentAnnotation} instance. | ||
*/ | ||
public interface DocumentAnnotationAccessor { | ||
void setPolygon(DocumentAnnotation documentAnnotation, List<Point> polygon); | ||
|
||
void setKind(DocumentAnnotation documentAnnotation, DocumentAnnotationKind kind); | ||
|
||
|
||
|
||
void setConfidence(DocumentAnnotation documentAnnotation, float confidence); | ||
} | ||
|
||
/** | ||
* The method called from {@link DocumentAnnotation} to set it's accessor. | ||
* | ||
* @param documentAnnotationAccessor The accessor. | ||
*/ | ||
public static void setAccessor(final DocumentAnnotationHelper.DocumentAnnotationAccessor documentAnnotationAccessor) { | ||
accessor = documentAnnotationAccessor; | ||
} | ||
|
||
static void setPolygon(DocumentAnnotation documentAnnotation, List<Point> points) { | ||
accessor.setPolygon(documentAnnotation, points); | ||
} | ||
|
||
static void setKind(DocumentAnnotation documentAnnotation, DocumentAnnotationKind kind) { | ||
accessor.setKind(documentAnnotation, kind); | ||
} | ||
|
||
static void setConfidence(DocumentAnnotation documentAnnotation, float confidence) { | ||
accessor.setConfidence(documentAnnotation, confidence); | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
...m/azure/ai/formrecognizer/documentanalysis/implementation/util/DocumentBarcodeHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
package com.azure.ai.formrecognizer.documentanalysis.implementation.util; | ||
|
||
import com.azure.ai.formrecognizer.documentanalysis.models.DocumentBarcode; | ||
import com.azure.ai.formrecognizer.documentanalysis.models.DocumentBarcodeKind; | ||
import com.azure.ai.formrecognizer.documentanalysis.models.DocumentSpan; | ||
|
||
/** | ||
* The helper class to set the non-public properties of an {@link DocumentBarcode} instance. | ||
*/ | ||
public final class DocumentBarcodeHelper { | ||
private static DocumentBarcodeAccessor accessor; | ||
|
||
private DocumentBarcodeHelper() { | ||
} | ||
|
||
/** | ||
* Type defining the methods to set the non-public properties of an {@link DocumentBarcode} instance. | ||
*/ | ||
public interface DocumentBarcodeAccessor { | ||
void setSpan(DocumentBarcode documentBarcode, DocumentSpan spans); | ||
|
||
void setKind(DocumentBarcode documentBarcode, DocumentBarcodeKind kind); | ||
|
||
void setValue(DocumentBarcode documentBarcode, String value); | ||
|
||
|
||
void setConfidence(DocumentBarcode documentBarcode, float confidence); | ||
} | ||
|
||
/** | ||
* The method called from {@link DocumentBarcode} to set it's accessor. | ||
* | ||
* @param documentBarcodeAccessor The accessor. | ||
*/ | ||
public static void setAccessor(final DocumentBarcodeHelper.DocumentBarcodeAccessor documentBarcodeAccessor) { | ||
accessor = documentBarcodeAccessor; | ||
} | ||
|
||
static void setSpan(DocumentBarcode documentBarcode, DocumentSpan span) { | ||
accessor.setSpan(documentBarcode, span); | ||
} | ||
|
||
static void setKind(DocumentBarcode documentBarcode, DocumentBarcodeKind kind) { | ||
accessor.setKind(documentBarcode, kind); | ||
} | ||
|
||
static void setConfidence(DocumentBarcode documentBarcode, float confidence) { | ||
accessor.setConfidence(documentBarcode, confidence); | ||
} | ||
|
||
static void setValue(DocumentBarcode documentBarcode, String value) { | ||
accessor.setValue(documentBarcode, value); | ||
} | ||
} |
Oops, something went wrong.