Click or drag to resize

ImportWithFileNameDerivedPropertiesAction Class

Options for bulk importing, in which the file name is parsed to extract properties, which are then put into property bags at different levels, and the file is imported into a target table.
Inheritance Hierarchy
SystemObject
  Altaxo.Serialization.NamePropertyExtractionImportWithFileNameDerivedPropertiesAction

Namespace: Altaxo.Serialization.NamePropertyExtraction
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3618.0 (4.8.3618.0)
Syntax
C#
public class ImportWithFileNameDerivedPropertiesAction : IImmutable, 
	IAction, IEquatable<ImportWithFileNameDerivedPropertiesAction>

The ImportWithFileNameDerivedPropertiesAction type exposes the following members.

Constructors
 NameDescription
Public methodImportWithFileNameDerivedPropertiesActionInitializes a new instance of the ImportWithFileNameDerivedPropertiesAction class
Top
Properties
 NameDescription
Public propertyActionsOnProperties Designate, which properties should be put into which property bag. The level indicates the level of the property bag, where 0 is the property bag of the target table, -1 is the property bag of the parent folder, -2 is the property bag of the grandparent folder, and so on.
Public propertyBehaviorOnConflictWithExistingProperties Gets or sets the behavior when there is a conflict with existing properties in the target property bag. The default is to override the existing properties with the new values.
Public propertyFileNamePatternsExcluded List of file names to import. The file names can contain wildcard characters (* and ?), which will be resolved to actual file paths.
Public propertyFileNamePatternsIncluded List of file names to import. The file names can contain wildcard characters (* and ?), which will be resolved to actual file paths.
Public propertyFolderOrTableNameUsedAsTemplateIfTargetTableIsMissing Gets or sets the name of a folder or atable that is used as a template if the target table does not exist. In this case, if the string represents a folder, the contents of the folder is copied to the folder of the target table, or, if the string represents a table, the table is copied to the target table before importing the files.
Public propertyNameSplitter The name splitter to use for extracting properties from the file name. The default is a PathToFileNameSplitter, which extracts properties from the file name based on a predefined pattern.
Public propertyOverwriteProjectItems Gets or sets a value indicating whether existing items in the target folder should be overridden when copying the project items using FolderOrTableNameUsedAsTemplateIfTargetTableIsMissing.
Public propertyTargetTableNameTemplate The target table name, which can contain placeholders for properties extracted from the file name. For example, "MyTable_<<<Date>>>" would create a table named "MyTable_2023-01-01" if the file name contains a date property with that value.
Top
Methods
 NameDescription
Public methodBulkImportFiles Bulk import files, by extracting properties from the file name, putting them into property bags at different levels, and importing the file into the target table.
Public methodEnsureExistenceOfTargetTable Ensures the existence of the target table with the specified name. If the table does not exist, it will be created. If a folder or table is specified as a template, it will be used to create the target table if it is missing.
Public methodExecute Bulk import files, by extracting properties from the file name, putting them into property bags at different levels, and importing the file into the target table.
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodStatic memberGetProjectItemNameFromTemplateName Gets the target table name by replacing placeholders in the target template name with actual property values from the provided properties enumeration.
Public methodStatic memberGetPropertiesPlacedInProjectItems Gets a list of tuples containing the target item kind, project item name, property name, and property value for each file path based on the provided target template name, name splitter, and actions on properties. Each file path is processed to extract properties and determine where to place them in the project structure.
Public methodStatic memberGetPropertiesPlacedInProjectItemsWithDiagnostics Gets a list of tuples containing the target item kind, project item name, property name, property value, and diagnostic message for each file path based on the provided target template name, name splitter, and actions on properties. Each file path is processed to extract properties and determine where to place them in the project structure. If there are inconsistent property values for the same (TargetItemKind, ProjectItemName, PropertyName) tuple across different file paths, a diagnostic message will be included in the result.
Public methodStatic memberGetTableNamesToFileNamesRelationship Gets a dictionary mapping target table names to lists of file paths, based on the provided file paths, target template name, and name splitter. Each file path is processed to extract properties and determine the corresponding target table name.
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodStatic memberResolveFileNames Resolves a list of file names, which may contain wildcard characters (* and ?), into a list of FileInfo objects. If a file name does not exist, a FileNotFoundException is thrown.
Top
See Also