Click or drag to resize

CAEXDocument Class

This class is a wrapper for the XDocument defining a CAEXDocument. Each CAEXDocument is associated to a specific CAEX-Schema. The Default Schema for newly created documents is always the most recently defined CAEX-Schema (currently Version 3.0). The Schema for existing documents loaded from files or other sources is set to the schema version defined in the document source. Transformations of CAEXDocuments from lower schema versions to higher schema versions is possible. Transformations from higher to lower schema versions can also be done but may result in documents containing not all the information. Schema transformations can be done with a registered schema transformation service which implements the ISchemaTransform interface. Creation of new documents with lower schema versions is possible, but in this case, the schema version has to be defined explicitly.
Inheritance Hierarchy
SystemObject
  Aml.Engine.XMLXDocumentWrapper
    Aml.Engine.CAEXCAEXDocument

Namespace: Aml.Engine.CAEX
Assembly: Aml.Engine (in Aml.Engine.dll) Version: 3.2
Syntax
public class CAEXDocument : XDocumentWrapper, 
	IAMLFile

The CAEXDocument type exposes the following members.

Properties
 NameDescription
Public propertyAttributeTypeLib Gets the collection of SystemUnitClassLib objects contained in the CAEXFile.
Public propertyCAEXFile Gets the CAEXFile which is the wrapper for the root element in the CAEX document
Public propertyCommands Gets the command instance for this document, which enables registration of change events
Public propertyStatic memberDefaultSchema The Default schema for new CAEX documents
Public propertyFilePath Gets the last used full file path of the document as used in SaveToFile(String, Boolean) and LoadFromFile(String, Boolean). If no FilePath is defined but a CAEX FileName exists, the CAEX FileName is returned.
Public propertyInstanceHierarchy Gets the collection of InstanceHierarchy objects contained in the CAEXFile.
Public propertyInterfaceClassLib Gets the collection of InterfaceClassLib objects contained in the CAEXFile.
Public propertyRoleClassLib Gets the collection of RoleClassLib objects contained in the CAEXFile.
Public propertySchema Gets the Schema of the CAEXDocument
Public propertySchemaManager Gets the schema manager for this document
Public propertySchemaVersionString Gets the schema version string for the assigned schema
Public propertySystemUnitClassLib Gets the collection of SystemUnitClassLib objects contained in the CAEXFile.
Public propertyXDocument Gets the underlying XDocument
(Inherited from XDocumentWrapper)
Top
Methods
 NameDescription
Public methodStatic memberAMLSchemaManager(CAEXWrapper) Gets the schema manager for the CAEX document which contains the provided CAEX object.
Public methodStatic memberAMLSchemaManager(XElement) Gets the schema manager for the CAEX document which contains the provided XML node.
Public methodDispose Dispose
(Inherited from XDocumentWrapper)
Public methodStatic memberDocument(CAEXWrapper) Gets the CAEX document which contains the specified CAEX object. If the CAEX object has not been inserted into a CAEX document, no CAEX document is returned.
Public methodStatic memberDocument(XNode) Gets the CAEXDocument which contains the specified XML node.
Public methodStatic memberLoadFromBinary Loading a CAEX file from the specified Byte-Array.
Public methodStatic memberLoadFromBinaryAsync Loading a CAEX file from the specified Byte-Array asynchronously.
Public methodStatic memberLoadFromFile Create a CAEX document with content, loaded from a file. The schema version of the CAEX document is set accordingly to the SchemaVersion-Attribute of the CAEXFile object.
Public methodStatic memberLoadFromFileAsync Create a CAEX document with content, loaded asynchronously from a file. The schema version of the CAEX document is set accordingly to the SchemaVersion-Attribute of the CAEXFile object.
Public methodStatic memberLoadFromStream Create a CAEX document with content, loaded from a stream. The schema version of the CAEX document is set accordingly to the SchemaVersion-Attribute of the CAEXFile object.
Public methodStatic memberLoadFromStreamAsync Create a CAEX document with content, loaded asynchronously from a stream. The schema version of the CAEX document is set accordingly to the SchemaVersion-Attribute of the CAEXFile object.
Public methodStatic memberLoadFromString Create a CAEX document with content, loaded from a UTF-8 encoded string. The schema version of the CAEX document is set accordingly to the SchemaVersion-Attribute of the CAEXFile object.
Public methodStatic memberLoadFromStringAsync Asynchronous method to create a CAEX document with content, loaded from a UTF-8 encoded string. The schema version of the CAEX document is set accordingly to the SchemaVersion-Attribute of the CAEXFile object.
Public methodStatic memberNew_CAEXDocument Creates a new empty CAEX document containing only the CAEXFile Element as the root element. The CAEX document is created, using the default schema version DefaultSchema.
Public methodStatic memberNew_CAEXDocument(CAEXDocumentCAEXSchema) Creates a new empty CAEX document containing only the CAEXFile element as the root element. The CAEX document is created using the specified schema version. The specified schema version defines the applicable editing methods.
Public methodSaveToFile Saves the CAEX document to the specified file path.
(Overrides XDocumentWrapperSaveToFile(String, Boolean))
Public methodSaveToFileAsync Saves the CAEX document to the specified file path asycncronously
Public methodSaveToStream Saves the CAEX document, to the specified stream
(Overrides XDocumentWrapperSaveToStream(Boolean))
Public methodSaveToStreamAsync Saves the CAEX document, to the specified stream
Public methodUnload Unloads this document instance.
(Inherited from XDocumentWrapper)
Public methodValidate Checks if the document is schema compliant.
Public methodXName Gets the correct XName for the provided CAEX element name (Tag name).The XName contains a namespace, if the assigned schema requires a namespace. If no namespace is defined for the assigned schema (as in CAEX 2.15), no namespace is added to the XName. The XName has to be used for all Xml.Linq queries, used to access objects with the CAEX element name.
(Overrides XDocumentWrapperXName(String))
Top
Extension Methods
 NameDescription
Public Extension MethodAddAutomationMLBaseAttributeTypeLib Gets the AutomationMLBaseAttributeTypeLib from the provided document. If the document doesn't contain the required library it will be automatically imported from an embedded resource.
(Defined by AutomationMLBaseAttributeTypeLib)
Public Extension MethodAddAutomationMLBaseRoleClassLib Gets the AutomationMLBaseRoleClassLib from the provided document. If the document doesn't contain the required library it will be automatically imported from an external resource.
(Defined by AutomationMLBaseRoleClassLib)
Public Extension MethodAddAutomationMLInterfaceClassLib Gets the AutomationMLInterfaceClassLib from the provided document. If the document doesn't contain the required library it will be automatically imported from an external resource.
(Defined by AutomationMLInterfaceClassLib)
Public Extension MethodAllElementsIdentifiedByCAEXPath Gets all the elements which are identifiable by a CAEX path. Elements having the same path are grouped together. Use this method to validate the existence of not unique CAEXPaths.
(Defined by QueryResult)
Public Extension MethodAllElementsWithAliasReference Gets all the elements with an alias reference. Elements referencing the same Alias are grouped together. Use this method to validate the existence of referenced externals.
(Defined by QueryResult)
Public Extension MethodAllElementsWithCAEXPathReference Gets all the elements with a path reference. Elements referencing the same path are grouped together. Use this method to validate the existence of referenced classes.
(Defined by QueryResult)
Public Extension MethodAllElementsWithIDReference Gets all the elements with identifier references. Elements referencing the same ID are grouped together. Use this method to validate the existence of referenced IDs.
(Defined by QueryResult)
Public Extension MethodAllElementsWithIDs Gets all the elements with IDs. Elements using the same ID are grouped together. Use this method to validate the uniqueness of IDs.
(Defined by QueryResult)
Public Extension MethodAllElementsWithNameReference Gets all the elements with a name reference. Elements referencing the same name are grouped together. Use this method to validate the existence of referenced elements.
(Defined by QueryResult)
Public Extension MethodAllInternalElementMasters Gets all InternalElement objects from the document which are masters.
(Defined by QueryResult)
Public Extension MethodAllInternalElementMirrors Gets all InternalElement objects from the document which are mirrors.
(Defined by QueryResult)
Public Extension MethodAutomationMLVersion Gets the AutomationML version for this CAEXFile object.
(Defined by AmlObjectsExtensions)
Public Extension MethodClassIsDerivedFromT Determines, if the class, specified with the given class path is directly or indirectly (across multiple generations) a descendant of the class or identical to it, 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.
(Defined by InheritanceExtensions)
Public Extension MethodCreate Factory method to create a new CAEX object in the provided CAEX document. The CAEX element is derived from the specified CAEX object Type. To insert the new CAEX object into the document an appropriate insertion method has to be used.
(Defined by CAEXElementFactory)
Public Extension MethodCreateT Factory method to create a new CAEX object in the provided CAEX document. The CAEX element is derived from the specified CAEX object Type. To insert the new CAEX object into the document an appropriate insertion method has to be used.
(Defined by CAEXElementFactory)
Public Extension MethodElementsWithAliasReference Gets alls the elements from the document which use the provided Alias in a reference
(Defined by QueryResult)
Public Extension MethodElementsWithCAEXPathReference Gets alls the elements from the document which have a reference to the provided Path.
(Defined by QueryResult)
Public Extension MethodElementsWithIDReference Gets alls the elements from the document which have a reference to the provided ID.
(Defined by QueryResult)
Public Extension MethodElementsWithInternalLinkRelations Returns all InternalElements and SystemUnitClasses in the defined Document, which are related to others via InternalLinks.
(Defined by QueryResult)
Public Extension MethodExternalReferenceFromAlias Gets the ExternalReferenceType form the CAEXDocument which defines the defined alias.
(Defined by CAEXDocumentExtensions)
Public Extension MethodFindByID Tries to locate a CAEX object from the specified ID. If the ID uses an alias reference and an IExternalReferenceResolver can be located, it is tried to resolve the external reference and to get the object from the external source.
(Defined by CAEXDocumentExtensions)
Public Extension MethodFindByPath Tries to locates a CAEX object from the specified CAEX path. If the path uses an alias reference and an IExternalReferenceResolver can be located, it is tried to resolve the external reference and to get the object from the external source.
(Defined by CAEXDocumentExtensions)
Public Extension MethodHasLibraries Determines if the CAEXDocument has any libraries
(Defined by CAEXDocumentExtensions)
Top
See Also