0538 Directory Schemas¶
Model 0538 describes the expected layout of the files and directories beneath a directory (folder). The layout is a schema for a directory tree, in the same way that a relational schema describes the tables and columns of a database. It is used to check that a directory follows its layout standard and to record the layout that a survey proposes for a directory that has none.
DirectorySchemaType entity¶
The DirectorySchemaType entity is the root of a directory layout. It inherits from ComplexSchemaType and is linked to the top-level PathSegmentAttribute entities with the AttributeForSchema relationship.
A DirectorySchemaType is attached in one of two ways:
- To the FileFolder that it describes, with the Schema relationship. The layout belongs to that folder.
- To a LayoutStandardRule with the ImplementedBy relationship. The layout is then shared by every folder that is linked to the rule with GovernedBy.
A layout attached directly to a folder takes precedence over a layout that is shared through a rule.
PathSegmentAttribute entity¶
The PathSegmentAttribute entity describes one file or directory in the layout. It inherits from SchemaAttribute. A segment that sits inside a directory segment is linked to it with the NestedSchemaAttribute relationship. The position attribute of the linking relationship orders the segments.
- segmentType - Is this segment a
directoryor afile? - namePattern - The pattern that the name of the file or directory must match. It is literal text with optional variables.
{name}matches any text;{name:regex}matches the regular expression. For example,dp={n:\d{3}}_pressure={p}. - required - Must at least one file or directory match this segment?
- multiple - May more than one file or directory match this segment?
- artifactRole - The role of the file or directory, for example
solver log.
The depth of a segment comes from its nesting, and a segment is variable if its namePattern includes a variable. Neither is stored.
Raise an issue or comment below