Grooper.Core.TableInstance

Represents an instance of a Data Table object on a document. A TableInstance exists as the child of a Document Instance or Section Instance, and contains one or more Table Row Instance objects as children.


Inherits from: Grooper.Core.FieldContainerInstance

Constructors

Signature Description
New (Owner As ConnectedObject, Table As DataTable)
Parameters
Owner
          Type: ConnectedObject
          
 
Table
          Type: DataTable
          

Fields

Field Name Field Type Description
Angle As System.Double System.Double
Database As Grooper.GrooperDb Grooper.GrooperDb
DataElementId As System.Guid System.Guid
ExtractorId As System.Guid System.Guid
InstanceNo As System.Int32 System.Int32
LinkedControl As Grooper.Core.IIndexPanelControl Grooper.Core.IIndexPanelControl
NoExpand As System.Boolean System.Boolean
Tag As System.Object System.Object

Properties

Property Name Property Type Description
AllChildren System.Collections.Generic.IEnumerable(Of T) Enumerates all children of this instance.
AllChildrenOfType(TypeToFind As Type) System.Collections.Generic.IEnumerable(Of T) Enumerates all descendants of this instance which are of the indicated type.
Parameters
TypeToFind
          Type: Type
          The type of descendants to find.
AllFields System.Collections.Generic.IEnumerable(Of T) Enumerates all FieldInstance objects which are descendants of this instance.
AllValues System.Collections.Generic.IEnumerable(Of T) Enumerates all FieldInstance objects which are descendants of this instance.
BatchFolder Grooper.Core.BatchFolder The Batch Folder object with which this instance is associated.
BatchObject Grooper.Core.BatchObject The Batch Folder object with which this instance is associated.
Cells(Row As Int32, Column As Int32) Grooper.Core.TableCellInstance Returns a cell by the row and column indexes.
Parameters
Row
          Type: Int32
          The 0-based row index.
 
Column
          Type: Int32
          The 0-based column index.
Cells(Row As Int32, ColumnName As String) Grooper.Core.TableCellInstance Returns a cell by the row index and column name.
Parameters
Row
          Type: Int32
          The 0-based row index.
 
ColumnName
          Type: String
          The column name.
CellValue(Row As Int32, Column As Int32) System.String Gets or sets a cell value by the row and column indexes.
Parameters
Row
          Type: Int32
          The 0-based row index.
 
Column
          Type: Int32
          The 0-based column index.
CellValue(Row As Int32, ColumnName As String) System.String Gets or sets a cell value by the row index and column name.
Parameters
Row
          Type: Int32
          The 0-based row index.
 
ColumnName
          Type: String
          The column name.
CenterPoint Grooper.PointExF Returns the center point of the region associated with this instance.
ChildrenAtLevel(Level As Int32) System.Collections.Generic.IEnumerable(Of T) Returns all children the specified number of levels below this item.
Parameters
Level
          Type: Int32
          The number of levels. A value of 1 will return the immediate children of this item.
ChildrenOfType(TypeToFind As Type) System.Collections.Generic.IEnumerable(Of T) Enumerates all direct children of this instance which are of the indicated type.
Parameters
TypeToFind
          Type: Type
          The type of children to find.
ColumnCount System.Int32 Returns the number of columns in this table.
ColumnNames System.Collections.Generic.IEnumerable(Of T) Enumerates the column names in this table.
Confidence System.Double The confidence level assigned to this instance.
ContentType Grooper.Core.ContentType The Content Type of the Batch Folder associated with this Data Instance.
Count System.Int32 Returns the number of child instances.
DataElement Grooper.Core.DataElement Returns the Data Element associated with this instance.
DataElementProfile Grooper.Core.DataElementProfile Returns the DataElementProfile for the element / content type associated with this instance.
DataModel Grooper.Core.DataModel Returns the Data Model associated with this instance.
DocumentInstance Grooper.Core.DocumentInstance Returns the root DocumentInstance.
EndIndex System.Int32 Returns the ending index (Index + Length - 1)
ErrorCount System.Int32 Returns the number of fields below this instance which are currently set to an error status.
ExtractionTime System.String The elapsed time taken to extract this element.
Fields System.Collections.Generic.IEnumerable(Of T) Enumerates FieldInstance objects which are direct children of this instance.
Fields(Name As String) Grooper.Core.FieldInstance Returns a child FieldInstance by name. If no child field exists with the specified name, null will be returned.
Parameters
Name
          Type: String
          The name of the field.
Fields(Id As Guid) Grooper.Core.FieldInstance Returns a child FieldInstance using the ID of the associated Data Field object.
Parameters
Id
          Type: Guid
          The ID of the field.
FirstPage System.Int32 Returns the 0-based index of the first page on which this instance appears.
HasOcrParity System.Boolean Indicates whether the instance has parity between the length of the string value and the number of OcrItems.
HasReferenceProperties System.Boolean Returns true if the object has properties which reference Grooper Node objects.
HasZoneInfo System.Boolean Indicates whether this instance has a region associated with it.
HighlightColor System.Drawing.Color Returns the color to be used for highlighting this instance.
Index System.Int32 The starting index of this instance within the parent instance.
IsEmpty System.Boolean Returns true if all properties with a ViewableAttribute are set to their default value.
IsValid System.Boolean Indicates whether all descendant fields and/or table cells are valid.
IsWriteable System.Boolean Returns true if the object is writable, or false if it is not.
Item(index As Int32) Grooper.Core.DataInstance Returns the child instance at a specific index.
Parameters
index
          Type: Int32
          The 0-based index of the child instance.
LastPage System.Int32 Returns the 0-based index of the last page on which this instance appears.
Length System.Int32 The length of this instance, in characters, within the parent instance. Please note that length represents the length of the element within the parent instance. It does not necessarily indicate the number of characters in the Value property or the number of items in the OcrResults object.
Location Grooper.RectangleExF The location of this instance on the page.
Name System.String The name of this data instance.
Owner Grooper.ConnectedObject Returns the node that owns the connected object, if any.
OwnerNode Grooper.GrooperNode Returns the node that owns the connected object, if any.
PageCount System.Int32 Returns the number of pages referenced in the OCR data.
PageIndex System.Int32 The 0-based page index on which the starting character of this data element appears.
PageNo System.Int32 The 1-based page number on which this item appears.
Parent Grooper.Core.DataInstance Returns the parent instance of this instance.
ParentElement Grooper.Core.DataElementInstance Returns the parent instance.
ParentSection Grooper.Core.SectionInstance Returns the section that contains this item, or null/Nothing if this item is not in a section.
Resolution System.Int32 The resolution, in DPI, of the source document associated with this instance.
Root Grooper.GrooperRoot Returns the root node
RowCount System.Int32 Returns the number of rows in this table.
Rows System.Collections.Generic.IEnumerable(Of T) Enumerates the rows in this table.
Rows(Index As Int32) Grooper.Core.TableRowInstance Returns a row by index.
Parameters
Index
          Type: Int32
          
TypeDisplayName System.String The type display name of the Data Instance.
TypeName System.String The type name of the Data Instance.
Value System.String The value of this data instance.
Visible System.Boolean Indicates whether a the user interface element associated with this data element is visible. If a Field Profile exists for this element, and the 'Visible' property of that profile has a value, then this value is returned. Otherwise, the 'Visible' property of the Data Field object is returned.
VisibleValues System.Collections.Generic.IEnumerable(Of T) Enumerates all FieldInstance objects which are descendants of this instance.

Methods

Method Name Description
Add(item As DataInstance) Appends a new child instance to the children of this instance.
Parameters
item
          Type: DataInstance
          The item to add.
AddNewRow() As TableRowInstance Adds a new blank row at the end this table.
AddRange(Items As IEnumerable(Of DataInstance)) Adds a list of items to the collection.
Parameters
Items
          Type: IEnumerable`1
          The items to add.
Append(Instance As DataInstance) Appends the content of the provided instance to this instance.
Parameters
Instance
          Type: DataInstance
          The instance to append.
Append(PageNo As Int32, Instance As DataInstance) Appends the content of the provided instance to this instance, setting the Page No property of all OCR Items to the indicated page number.
Parameters
PageNo
          Type: Int32
          The page number being appended.
 
Instance
          Type: DataInstance
          The DataInstance to append.
Append(PageIndex As Int32, ch As Char) Appends a single character to the instance content.
Parameters
PageIndex
          Type: Int32
          
 
ch
          Type: Char
          
Append(PageIndex As Int32, LiteralValue As String) Appends a string value to the instance content.
Parameters
PageIndex
          Type: Int32
          
 
LiteralValue
          Type: String
          
Clear() Deletes all children of this instance.
ClearCache()
Contains(item As DataInstance) As Boolean Determines if the specified instance is a child of this instance.
Parameters
item
          Type: DataInstance
          
FindChild(Id As Guid) As DataInstance Finds a child of this instance by Id.
Parameters
Id
          Type: Guid
          The Id to search for.
FindChild(Name As String, Normalize As Boolean) As DataInstance Finds a child of this instance by name.
Parameters
Name
          Type: String
          The name to search for.
 
Normalize
          Type: Boolean
          If true, names will be normalized during the search to ignore case and to ignore the distinction between " " and "_".
FindDataElement(FieldId As Guid) As DataInstance Finds a child element having the provided ID.
Parameters
FieldId
          Type: Guid
          The ID of a Data Element in a Data Model.
FindFieldInstance(FieldId As Guid) As FieldInstance Searches the DataInstance hierarchy for a FieldInstance whose associated DataField Id matches the provided Id.
Parameters
FieldId
          Type: Guid
          The ID of the DataField object we need the value for.
FindRowByKey(KeyColumnName As String, KeyValue As String) As TableRowInstance Finds the row in this table with the specified column containing the specified value.
Parameters
KeyColumnName
          Type: String
          The column to search.
 
KeyValue
          Type: String
          The value to search for.
FindSingleInstanceChild(FieldId As Guid) As FieldInstance
Parameters
FieldId
          Type: Guid
          
FireReferencingExpressions() Fires expressions for all fields referencing this element in an expression.
GetAnnotations(PageIndex As Int32) As IEnumerable(Of Annotation)
Parameters
PageIndex
          Type: Int32
          
GetFromPath(Path As IEnumerable(Of String)) As DataElementInstance
Parameters
Path
          Type: IEnumerable`1
          
GetPathInstances(BaseInstance As DataInstance) As DataInstanceCollection Returns a list of DataInstances which represents the path from the root to the indicated BaseInstance.
Parameters
BaseInstance
          Type: DataInstance
          
GetProperties() As PropertyDescriptorCollection
GetReferences() As List(Of GrooperNode) Returns a list of GrooperNode objects referenced in the properties of this object.
GetSubInstance(Index As Int32, Length As Int32) As DataInstance Gets a sub portion of this instance.
Parameters
Index
          Type: Int32
          The starting character index.
 
Length
          Type: Int32
          The character length to extract.
GetSubInstance(PageIndex As Int32, Bounds As RectangleExF) As DataInstance Gets a sub portion of this instance.
Parameters
PageIndex
          Type: Int32
          
 
Bounds
          Type: RectangleExF
          The rectangle of the area to extract, in inches.
GetSubInstance(Location As Span) As DataInstance Gets a sub portion of this instance.
Parameters
Location
          Type: Span
          The TextLocation for the sub instance.
GetSubInstance(PageIndex As Int32) As DataInstance Returns a new instance containing all characters on the indicated page.
Parameters
PageIndex
          Type: Int32
          The index of the page to extract.
GetTextBounds(PageIndex As Int32) As RectangleExF Returns a rectangle representing the bounds of the page on which this instance appears. Units are in inches.
Parameters
PageIndex
          Type: Int32
          The 0-based index of the page.
HasChild(Name As String) As Boolean Determines whether this element has a child element with the provided name.
Parameters
Name
          Type: String
          
HasGeometricOverlap(OtherInstance As DataInstance) As Boolean
Parameters
OtherInstance
          Type: DataInstance
          
HasIndexOverlap(OtherInstance As DataInstance) As Boolean
Parameters
OtherInstance
          Type: DataInstance
          
IndexOf(item As DataInstance) As Int32 Returns the 0-based index of the indicated instance within the collection of child instances.
Parameters
item
          Type: DataInstance
          The instance to return the index of.
Insert(index As Int32, item As DataInstance) Inserts a child instance at the indicated position within the collection of children.
Parameters
index
          Type: Int32
          The 0-based index at which to insert the item.
 
item
          Type: DataInstance
          The item to insert.
InsertNewRow(RowIndex As Int32) As TableRowInstance Inserts a new blank row at the specified position in this table.
Parameters
RowIndex
          Type: Int32
          The index to insert the new row at.
IsPropertyEnabled(PropertyName As String) As Nullable(Of Boolean) Defines whether a property is currently enabled.
Parameters
PropertyName
          Type: String
          The name of the property to determine the enabled state for.
IsPropertyVisible(PropertyName As String) As Nullable(Of Boolean) Defines whether a property is currently visible.
Parameters
PropertyName
          Type: String
          The name of the property to determine the visible state for.
IsType(Type As Type) As Boolean Returns true if the object is of the type specified, or if it derives from the type specfied.
Parameters
Type
          Type: Type
          The type to check.
LinkUI(IndexPanel As IIndexPanel, Control As IIndexPanelControl) Links this instance to a control in the Index Panel.
Parameters
IndexPanel
          Type: IIndexPanel
          
 
Control
          Type: IIndexPanelControl
          
NormalizeBounds()
OverlapsWith(OtherInstance As DataInstance) As Boolean Determines if the instance overlaps with another instance.
Parameters
OtherInstance
          Type: DataInstance
          
RebuildFromRows() Rebuilds the content and zone for the table after rows have been added or deleted.
Remove(item As DataInstance) As Boolean Removes the indicated child item from the collection of children.
Parameters
item
          Type: DataInstance
          The item to remove.
RemoveAt(index As Int32) Removes the child instance at the specified index.
Parameters
index
          Type: Int32
          A 0-based index specifying the child's position.
RemoveRow(Row As TableRowInstance) Removes a row from this table.
Parameters
Row
          Type: TableRowInstance
          The row to remove.
RemoveRow(RowIndex As Int32) Removes a row by index.
Parameters
RowIndex
          Type: Int32
          The index of the row to remove.
RemoveUILinks() Clears the user interface links for this instance and all of its children.
Serialize() As String Serializes the object.
SetDatabase(Database As GrooperDb) Sets the database connection of the object.
Parameters
Database
          Type: GrooperDb
          
SetOwner(Owner As ConnectedObject, SkipInitialization As Boolean) Sets the owner of the connected object with another object that implements the IConnected interface.
Parameters
Owner
          Type: ConnectedObject
          
 
SkipInitialization
          Type: Boolean
          
SetValue(Value As String, Location As RectangleExF, OcrResults As OcrResults) Replaces the value, location, and OCR results of this instance.
Parameters
Value
          Type: String
          The value of the instance.
 
Location
          Type: RectangleExF
          The location of this instance.
 
OcrResults
          Type: OcrResults
          The OCR Results associated with the instance.
SortChildren(Comparer As IComparer(Of DataInstance)) Sorts child instances using the specified implementation of IComparer.
Parameters
Comparer
          Type: IComparer`1
          
SortRows() Sorts the child rows in read order.
SumOf(ColumnName As String) As Decimal Returns the sum of a column in this table. The specified column must contain numerical information.
Parameters
ColumnName
          Type: String
          The column to sum.
ToArray() As String[,]() Returns a 2-diminsional array containing the table values.
ToDataTable() As DataTable Returns a .Net Data Table object populated with the contents of this table.
TopDescendantsWithName(Name As String) As IEnumerable(Of DataInstance) Enumerates top descendants with the provided name.
Parameters
Name
          Type: String
          
ToString() As String Returns a string representation of the object.
ToXml(Level As Int32) As String
Parameters
Level
          Type: Int32
          
Translate(X As Double, Y As Double) Translates the location of this instance by X and Y amounts.
Parameters
X
          Type: Double
          The offset on the X axis, in inches.
 
Y
          Type: Double
          The offset on the Y axis, in inches.
UnlinkUI() Unlinks this instance from its user interface component.
Validate(ValueChanged As Boolean) As Boolean Performs validation on all child elements.
Parameters
ValueChanged
          Type: Boolean
          
ValidateProperties() As ValidationErrorList Validates the properties of the object, returning a list of validation errors.
WriteToLog(Message As String, pa() As Object())
Parameters
Message
          Type: String
          
 
pa
          Type: Object