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

Methods_T_CAEX_ClassModel_CAEXDocument

AutomationML edited this page Feb 22, 2017 · 1 revision

CAEXDocument Methods

The CAEXDocument type exposes the following members.

Methods

 

Name Description
Public methodStatic member CaexDocument Gets the CAEXDocument, which is a Wrapper around the specified XmlDocument.
Public method Dispose Führt anwendungsspezifische Aufgaben durch, die mit der Freigabe, der Zurückgabe oder dem Zurücksetzen von nicht verwalteten Ressourcen zusammenhängen.
Public methodStatic member LoadFromBinary Loading a CAEX file from the specified Byte-Array.
Public methodStatic member LoadFromFile Loading an CAEX file from the specified location.
Public methodStatic member LoadFromStream A CAEX_ClassModel is loaded from an Input-Stream with UTF8-Encoding
Public methodStatic member LoadFromString Loading an CAEX file from the specified string.
Public methodStatic member New_CAEXDocument Creation of a new CAEX file. The CAEX root element CAEXFile is automatically added to the document. Also adds Additional Information "AutomationMLVersion=2.0"
Public method Repair Repairs the specified validated element. This Method will block, if any Update-Tasks are pending in the Tables Instance.
Public method SaveToByteArray gets a Byte Array, containing the current document's xml with UT8 Encoding.
Public method SaveToFile Saves the current document to the specified file path.
Public method SaveToStream gets a binary Stream, containing the current document's xml with UT8 Encoding.
Public method SaveToString Returns a String, containing the current document's xml text.
Public methodStatic member TablesForDocument Gets the Tables for the CAEXDocument, which is a Wrapper around the specified XmlDocument.
Public methodCode example ValidateAll Get Validation Information for all elements, which have validation issues. The ValidationElement provides detailed information about available Repair Options and an additional Information Text. This Method will block, if any Update-Tasks are pending in the Tables Instance.
Public method ValidateIDsAndNames Gets all MetaData-Validation Occurrences, all ID-Validation Occurrences and all Path-Validation Occurrences. This Method will block, if any Update-Tasks are pending in the Tables Instance.
Public method ValidateReferences Validates all references to CAEX-Objects via an ID-Attribute or a CAEX-Path. This Method will block, if any Update-Tasks are pending in the Tables Instance.
  Back to Top

Extension Methods

 

Name Description
Public Extension Method CheckFastMultipleIDs Performs a document wide validation check across all object instances - missing vendor specific meta information - missing or wrong schema location - wrong schema name - double IDs - missing IDs - double names - warning if forbidden characters are used which are @ : and / - checks existence of all external files Validates this CAEX document against missing or double ID's, missing vendor specific meta information, wrong schema name, wrong schema location Works very fast based on Hash Tables instead of XPath. (Defined by ConsistencyCheckExtensions.)
Public Extension Method CheckFastReferenceConsistency Performs a document wide reference related consistency check across all Hierarchies and Libraries - checks existence of all references - checks existence of all external files - checks validity of all internal links - only works within the current CAEX document, does not perform a merge - works very fast based on Hash Tables instead of XPath (Defined by ConsistencyCheckExtensions.)
Public Extension Method ClassIsDerivedFrom Determines, if the class, specified with the given class path is directly or indirectly (across multiple generations) a descendant of the class, which is uniquely identified with the specified baseClass path. The base class path or the referenced class path may contain alias identifiers. If alias identifiers are present, the method tries to load the externally referenced document. If a referenced document is loaded, it is visible in the ReferencedDocuments enumeration. This method uses the document tables for a fast identification of classes using the caex path (Defined by ExternalReferenceDocumentExtensions.)
Public Extension Method CreateAMLSelfContainingContainerWithAllReferencesResolved Creates an AutomationML self containing container AutomationMLContainer for the specified document. The document is used as the root part of the container. The container will contain all documents, which are referenced from the specified aml document. Referenced documents are retrieved from external references and external interfaces, which have a RefUri Attribute. All RefUri Attributes in the document are changed to relative uris. The relative uris are made relative to the specified containerPath. (Defined by AMLContainerExtension.)
Public Extension Method DisposeCutPoints Free internal data structures. (Defined by ExternalizationExtensions.)
Public Extension Method GetFileNamePath Retrieves the file name including full path out of the CAEX document. (Defined by ExternalizationExtensions.)
Public Extension Method MakeExternalReferencesRelative() Overloaded.
makes all absolute pathes of external reference relative (Defined by ExternalizationExtensions.)
Public Extension Method MakeExternalReferencesRelative(String) Overloaded.
makes all absolute pathes of external reference relative (Defined by ExternalizationExtensions.)
Public Extension Method Merge Tries to get the absolute path of an CAEX doc and than merges all referenced AMLs into one. The path is examined by looking at 1. The xml document properties 2. The CAEXFile - FileName attribute (Defined by ExternalizationExtensions.)
Public Extension Method RepairCAEXDoc Repairs this CAEX document against missing or double ID's, missing vendor specific meta information, wrong schema name, wrong schema location (Defined by ConsistencyCheckExtensions.)
Public Extension Method SaveSplitModelParts(String, Boolean, Boolean) Overloaded.
Split a model at defined split points, insert the appropriate ExternalReferences and proxy objects, save each of the parts split off and the remainder separately to file, and re-merge the parts split off for further processing as a whole, removing unneeded ExternalReferences again. Returns true if no error occurs. (Defined by ExternalizationExtensions.)
Public Extension Method SaveSplitModelParts(String, Boolean, Boolean, List(String)) Overloaded.
Split a model at defined split points, insert the appropriate ExternalReferences and proxy objects, save each of the parts split off and the remainder separately to file, and re-merge the parts split off for further processing as a whole, removing unneeded ExternalReferences again. (Defined by ExternalizationExtensions.)
Public Extension Method Uris Returns an enumeration of all Uris, which are found in the specified document. This is a utility method to localize referenced files, which may be part of an AutomationML container. The Method uses the Tables of the CAEXDocument. Please ensure, that the tables are updated before you use this method. (Defined by AMLContainerExtension.)
  Back to Top

See Also

Reference

CAEXDocument Class
CAEX_ClassModel Namespace

  • 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