Skip to content
This repository has been archived by the owner on Jun 22, 2019. It is now read-only.

T_CAEX_ClassModel_Validation_CAEXTables

AutomationML edited this page Feb 23, 2017 · 2 revisions

CAEXTables Class

The Class CAEXTables provides several Tables for the Management of CAEX-Elements and their Cross References. The provided Tables are  

  • IDTable contains InternalElements and ExternalInterface Elements and provides Access using the ID-Attribute.
  • PathTable contains RoleClasses, InterfaceClasses and SystemUnitClasses and provides Access using the CAEXPath of those Elements.
  • IDRefTable contains InternalElements (Mirrors) which reference other InternalElements (Masters) via the Masters ID-Attribute.
  • PathRefTable contains Elements with References to RoleClasses, InterfaceClasses and SystemUnitClasses via a certain Path-Attribute.
  The Tables are not automatically updated. There are these Update methods to Update the Tables:  

Inheritance Hierarchy

System.Object
  CAEX_ClassModel.Validation.CAEXTables
Namespace: CAEX_ClassModel.Validation
Assembly: AMLEngine (in AMLEngine.dll) Version: 3.5

Syntax

C#

public class CAEXTables

C++

public ref class CAEXTables

The CAEXTables type exposes the following members.

Constructors

 

Name Description
Public method CAEXTables Initializes a new instance of the CAEXTables class.
  Back to Top

Properties

 

Name Description
Public property AttributesWithRefUriTable Gets the table which contains all attributes with external references. Attributes are listed, if the AttributeDataType is xs:anyURI and the value is not null or empty. The Table uses the attribute value as key.
Public property HasPendingUpdates Gets a value indicating whether this instance has pending updates.
Public property IDRefTable Gets the ID-Reference-Table. This Table contains all registered InternalElement-Objects which reference another InternalElement (i.e. Mirror-Objects) and all InternalLinks. The Table can be updated with the UpdateAllTables(Boolean) for all Elements in the current document or with one of the single Element update methods.    Access to the Property will block, if any update tasks are pending.
Public property IDTable The ID-Table. This Table contains all registered CAEX-Elements with IDs, that are InternalElements an InterfaceClasses. The Table can be updated with the UpdateAllTables(Boolean) for all Elements in the current document or with one of the single Element update methods.    Access to the Property will block, if any update tasks are pending.
Public propertyCode example ManagedByApplication Gets or sets a value indicating whether the Tables are managed by an Engine application.

Examples

This sample shows how to enabled the AmlEngine to use the DocumentTables for fast Access.

{
 CAEXDocument document = CAEXDocument.LoadFromFile ("myDoc.aml")
 document.Tables.UpdateAllTables();
 document.Tables.ManagedByApplication = true;
}
```</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td><a href="P_CAEX_ClassModel_Validation_CAEXTables_NumberOfAllObjects">NumberOfAllObjects</a></td><td>
The Number of all Objects which are managed in the Tables.</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td><a href="P_CAEX_ClassModel_Validation_CAEXTables_NumberOfAttributes">NumberOfAttributes</a></td><td>
Number of managed Attributes</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td><a href="P_CAEX_ClassModel_Validation_CAEXTables_NumberOfInterfaceClasses">NumberOfInterfaceClasses</a></td><td>
Number of managed InterfaceClasses</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td><a href="P_CAEX_ClassModel_Validation_CAEXTables_NumberOfInterfaceInstances">NumberOfInterfaceInstances</a></td><td>
Number of managed Interface Instances</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td><a href="P_CAEX_ClassModel_Validation_CAEXTables_NumberOfInternalElements">NumberOfInternalElements</a></td><td>
Number of managed InternalElements</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td><a href="P_CAEX_ClassModel_Validation_CAEXTables_NumberOfLinks">NumberOfLinks</a></td><td>
Number of managed Internal Links</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td><a href="P_CAEX_ClassModel_Validation_CAEXTables_NumberOfRoleClasses">NumberOfRoleClasses</a></td><td>
Number of managed RoleClasses</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td><a href="P_CAEX_ClassModel_Validation_CAEXTables_NumberOfSystemUnitClasses">NumberOfSystemUnitClasses</a></td><td>
Number of managed SystemUnitClasses</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td><a href="P_CAEX_ClassModel_Validation_CAEXTables_PathRefTable">PathRefTable</a></td><td>
Gets the Path-Reference-Table. This Table contains all CAEX-Objects, which have a reference to another CAEX-Element via the CAEX-Path. The Table can be updated with the <a href="M_CAEX_ClassModel_Validation_CAEXTables_UpdateAllTables">UpdateAllTables(Boolean)</a> for all Elements in the current document or with one of the single Element update methods.
&nbsp;<ul><li><a href="M_CAEX_ClassModel_Validation_CAEXTables_AddCAEXObject">AddCAEXObject(CAEXBasicObject, Boolean)</a></li><li><a href="M_CAEX_ClassModel_Validation_CAEXTables_RemoveCAEXObject">RemoveCAEXObject(CAEXBasicObject, Boolean)</a></li><li><a href="M_CAEX_ClassModel_Validation_CAEXTables_UpdateCAEXObjectRegistration">UpdateCAEXObjectRegistration(CAEXBasicObject, Boolean, Boolean)</a></li></ul>&nbsp;
Access to the Property will block, if any update tasks are pending.</td></tr><tr><td>![Public property](media/pubproperty.gif "Public property")</td><td><a href="P_CAEX_ClassModel_Validation_CAEXTables_PathTable">PathTable</a></td><td>
Gets the Path-Table. This Table contains all CAEX-Elements, which are identifiable by their CAEXPath. The Table can be updated with the <a href="M_CAEX_ClassModel_Validation_CAEXTables_UpdateAllTables">UpdateAllTables(Boolean)</a> for all Elements in the current document or with one of the single Element update methods.
&nbsp;<ul><li><a href="M_CAEX_ClassModel_Validation_CAEXTables_AddCAEXObject">AddCAEXObject(CAEXBasicObject, Boolean)</a></li><li><a href="M_CAEX_ClassModel_Validation_CAEXTables_RemoveCAEXObject">RemoveCAEXObject(CAEXBasicObject, Boolean)</a></li><li><a href="M_CAEX_ClassModel_Validation_CAEXTables_UpdateCAEXObjectRegistration">UpdateCAEXObjectRegistration(CAEXBasicObject, Boolean, Boolean)</a></li></ul>&nbsp;
Access to the Property will block, if any update tasks are pending.</td></tr></table>&nbsp;
<a href="#caextables-class">Back to Top</a>

## Methods
&nbsp;<table><tr><th></th><th>Name</th><th>Description</th></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="M_CAEX_ClassModel_Validation_CAEXTables_AddCAEXObject">AddCAEXObject</a></td><td>
Update the Tables with an added CAEXObject. The CAEX-Object is registered with its Key which is the Object-ID for the <a href="P_CAEX_ClassModel_Validation_CAEXTables_IDTable">IDTable</a> and the <a href="M_CAEX_ClassModel_CAEXFileType_CAEXPath">CAEXPath(CAEXBasicObject)</a> for the <a href="P_CAEX_ClassModel_Validation_CAEXTables_PathTable">PathTable</a>. If the asynchronous mode is selected, this Method is queued in the update execution queue. If the Task is completed, a <a href="E_CAEX_ClassModel_Validation_CAEXTables_TableUpdateEvent">TableUpdateEvent</a> is raised with UpdateAction set to <a href="T_CAEX_ClassModel_Validation_UpdateActionEnum">UpdateTaskCompleted</a>.</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="M_CAEX_ClassModel_Validation_CAEXTables_ElementsReferencedInInternalLinks">ElementsReferencedInInternalLinks</a></td><td>
Gets all InternalElements and SystemUnitClasses that are referenced in all InternalLinks in the current Document. If an Element is referenced more than one time, it is returned only once. The Method will block, if any update tasks are pending.</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="M_CAEX_ClassModel_Validation_CAEXTables_HasRegisteredInternalLinkReference">HasRegisteredInternalLinkReference</a></td><td>
Determines whether the specified externalInterface has registered InternalLink references.</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="M_CAEX_ClassModel_Validation_CAEXTables_HasRegisteredReference">HasRegisteredReference</a></td><td>
Determines whether the specified caex-Object has registered references.</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="M_CAEX_ClassModel_Validation_CAEXTables_InternalElementMirrors">InternalElementMirrors</a></td><td>
Gets the InternalElement-Mirror Objects for a specified InternalElement. The Method will block, if any update tasks are pending.</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="M_CAEX_ClassModel_Validation_CAEXTables_InternalLinkPartners">InternalLinkPartners</a></td><td>
returns a collection of registered InternalLink-Partners for the specified external interface.</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="M_CAEX_ClassModel_Validation_CAEXTables_InternalLinkReferences">InternalLinkReferences</a></td><td>
returns a collection of registered InternalLinks for the specified external interface.</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="M_CAEX_ClassModel_Validation_CAEXTables_InternalLinkReferencesOfElement">InternalLinkReferencesOfElement</a></td><td>
Get all InternalLinks that reference the specified InternalElement or SystemUnitClass. The Method will block, if any update tasks are pending.</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="M_CAEX_ClassModel_Validation_CAEXTables_InternalLinkReferencesOfInterface">InternalLinkReferencesOfInterface</a></td><td>
Get all InternalLinks that reference the specified ExternalInterface. The Method will block, if any update tasks are pending.</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="M_CAEX_ClassModel_Validation_CAEXTables_IsMaster">IsMaster</a></td><td>
Determines whether the specified InternalElement is master. The Method will block, if any update tasks are pending.</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="M_CAEX_ClassModel_Validation_CAEXTables_MappingReferencesOfRoleReference">MappingReferencesOfRoleReference</a></td><td>
returns the mapping elements, which are related to the specified role reference. The Relation is bound to any AttributeNameMapping or InterfaceNameMapping, which refers to an attribute or interface of the referenced role.</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="M_CAEX_ClassModel_Validation_CAEXTables_ReferencesWithAlias">ReferencesWithAlias</a></td><td>
returns all References which use the specified referenceAttribute and contain the specified alias in the referenced path value of this attribute</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="M_CAEX_ClassModel_Validation_CAEXTables_RegisteredReferences">RegisteredReferences</a></td><td>
returns a collection of registered references for the specified caex-Object.</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="M_CAEX_ClassModel_Validation_CAEXTables_RemoveCAEXObject">RemoveCAEXObject</a></td><td>
Removes the specified Caex-Object from all Tables. If the asynchronous mode is selected, this Method is queued in the update execution queue. If the Task is completed, an <a href="E_CAEX_ClassModel_Validation_CAEXTables_TableUpdateEvent">TableUpdateEvent</a> is raised with UpdateAction. set to <a href="T_CAEX_ClassModel_Validation_UpdateActionEnum">UpdateTaskCompleted</a>.</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="M_CAEX_ClassModel_Validation_CAEXTables_Reset">Reset</a></td><td>
Resets all tables. The Table will be automatically updated if any of the Fast Access Methods <a href="M_CAEX_ClassModel_CAEXFileType_FindFastByID">FindFastByID(String, Boolean)</a> or <a href="M_CAEX_ClassModel_CAEXFileType_FindFastByPath">FindFastByPath(String, Boolean)</a> are called or if the <a href="M_CAEX_ClassModel_Validation_CAEXTables_UpdateAllTables">UpdateAllTables(Boolean)</a> Method is called for an explicit Update. The Method may be helpful, to make a bulk of changes to the CAEXDocument without the need to update the tables after each change.</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")![Code example](media/CodeExample.png "Code example")</td><td><a href="M_CAEX_ClassModel_Validation_CAEXTables_UpdateAllReferenceAttributes">UpdateAllReferenceAttributes</a></td><td>
Updates all Path- and ID-References to the specified CaexElement. This Method changes the value of the Reference-Attribute in all CAEX-Objects which are registered in the <a href="P_CAEX_ClassModel_Validation_CAEXTables_PathRefTable">PathRefTable</a> and <a href="P_CAEX_ClassModel_Validation_CAEXTables_IDRefTable">IDRefTable</a>. For each updated reference a <a href="E_CAEX_ClassModel_Validation_CAEXTables_TableUpdateEvent">TableUpdateEvent</a> is raised with UpdateAction set to <a href="T_CAEX_ClassModel_Validation_UpdateActionEnum">IDReferenceChanged</a> for changed ID-Reference and <a href="T_CAEX_ClassModel_Validation_UpdateActionEnum">PathReferenceChanged</a> for changed Path-References. If the asynchronous mode is selected, this Method is queued in the update execution queue. If the Task is completed, a <a href="E_CAEX_ClassModel_Validation_CAEXTables_TableUpdateEvent">TableUpdateEvent</a> is raised with UpdateAction set to <a href="T_CAEX_ClassModel_Validation_UpdateActionEnum">UpdateTaskCompleted</a>.</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="M_CAEX_ClassModel_Validation_CAEXTables_UpdateAllTables">UpdateAllTables</a></td><td>
Update all Tables which makes access to CAEXElements with keys faster. All Descendants of the CAEXFile-Node, which are managed, are registered with their actual Keys. If a Key changes for a Caex-Object, <a href="M_CAEX_ClassModel_Validation_CAEXTables_UpdateCAEXObjectRegistration">UpdateCAEXObjectRegistration(CAEXBasicObject, Boolean, Boolean)</a> should be called. This Method is queued in the update execution queue if the async-Parameter is true. If the Task is completed, a <a href="E_CAEX_ClassModel_Validation_CAEXTables_TableUpdateEvent">TableUpdateEvent</a> is raised with UpdateAction set to <a href="T_CAEX_ClassModel_Validation_UpdateActionEnum">UpdateTaskCompleted</a>. 

## Remarks
For an asynchronous execution, this Method will only be executed, if it is not already waiting in the Update Execution Queue or already processing. If it is already running or waiting, the Call is not queued and the method returns false. If a synchronous execution is specified, all pending updates are aborted and the Tables are updated immediately.

#### Return Value
Type: <br />`true`, if this method call is queued in the update execution queue</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="M_CAEX_ClassModel_Validation_CAEXTables_UpdateCAEXObjectRegistration">UpdateCAEXObjectRegistration</a></td><td>
Checks if the specified Caex-Object is already managed by any Table and updates the registration of the Caex-Object in all associated Tables, if the Caex-Object has a different Key than the registered key. In a deep update, the Node of the Caex-Object and all its descendants are checked. If the asynchronous mode is selected, this Method is queued in the update execution queue. If the Task is completed, a <a href="E_CAEX_ClassModel_Validation_CAEXTables_TableUpdateEvent">TableUpdateEvent</a> is raised with UpdateAction set to <a href="T_CAEX_ClassModel_Validation_UpdateActionEnum">UpdateTaskCompleted</a>.</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="M_CAEX_ClassModel_Validation_CAEXTables_UpdateExternalReferenceAttributes">UpdateExternalReferenceAttributes</a></td><td>
Updates the external reference attributes.</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="M_CAEX_ClassModel_Validation_CAEXTables_UpdateIDReferenceAttributes">UpdateIDReferenceAttributes</a></td><td>
Updates all ID-References to the specified CaexElement. This Method changes the value of the Reference-Attribute in all CAEX-Objects which are registered in the <a href="P_CAEX_ClassModel_Validation_CAEXTables_IDRefTable">IDRefTable</a>. For each updated reference a <a href="E_CAEX_ClassModel_Validation_CAEXTables_TableUpdateEvent">TableUpdateEvent</a> is raised with UpdateAction set to <a href="T_CAEX_ClassModel_Validation_UpdateActionEnum">IDReferenceChanged</a>. If the asynchronous mode is selected, this Method is queued in the update execution queue. If the Task is completed, a <a href="E_CAEX_ClassModel_Validation_CAEXTables_TableUpdateEvent">TableUpdateEvent</a> is raised with UpdateAction set to <a href="T_CAEX_ClassModel_Validation_UpdateActionEnum">UpdateTaskCompleted</a>.</td></tr><tr><td>![Public method](media/pubmethod.gif "Public method")</td><td><a href="M_CAEX_ClassModel_Validation_CAEXTables_UpdatePathReferenceAttributes">UpdatePathReferenceAttributes</a></td><td>
Updates all path references to the specified CaexElement. This Method changes the value of the Reference-Attribute in all CAEX-Objects which are registered in the <a href="P_CAEX_ClassModel_Validation_CAEXTables_PathRefTable">PathRefTable</a>. For each updated reference a <a href="E_CAEX_ClassModel_Validation_CAEXTables_TableUpdateEvent">TableUpdateEvent</a> is raised with UpdateAction set to <a href="T_CAEX_ClassModel_Validation_UpdateActionEnum">PathReferenceChanged</a>. If the asynchronous mode is selected, this Method is queued in the update execution queue. If the Task is completed, a <a href="E_CAEX_ClassModel_Validation_CAEXTables_TableUpdateEvent">TableUpdateEvent</a> is raised with UpdateAction set to <a href="T_CAEX_ClassModel_Validation_UpdateActionEnum">UpdateTaskCompleted</a>.</td></tr></table>&nbsp;
<a href="#caextables-class">Back to Top</a>

## Events
&nbsp;<table><tr><th></th><th>Name</th><th>Description</th></tr><tr><td>![Public event](media/pubevent.gif "Public event")</td><td><a href="E_CAEX_ClassModel_Validation_CAEXTables_TableUpdateEvent">TableUpdateEvent</a></td><td>
Occurs when any table is updated. This Event is raised from a thread, running in Background.</td></tr></table>&nbsp;
<a href="#caextables-class">Back to Top</a>

## Remarks
The Tables Update Methods are executed on a background thread. The update calling Methods will not be blocked, but remind, all access to tables will be blocked, if there are any update tasks pending.

## See Also


#### Reference
<a href="N_CAEX_ClassModel_Validation">CAEX_ClassModel.Validation Namespace</a><br />
  • Introduction
  • [Version History](Version history)
    • [Version 3.5](Version 3.4)
    • [Version 3.1](Version 3.0)
    • [Version 2.1](Version 2.1)
    • [Version 2.0](Version 2.0)
  • [Getting Started](Getting started)
  • Examples
  • AMLEngine API
BEST Practice Content

Extensions

CAEX Elements

AutomationML

Utilities

Interfaceclasses

Exceptions

Objecttables and Document validation

Clone this wiki locally