FilingAttributes5.cr
Copyright Ó 1986, 1987, 1988, 1991 by Xerox Corporation. All rights reserved.
Bill Jackson (bj) April 21, 1987 0:11:52 am PDT
Tim Diebert: May 10, 1988 10:43:54 am PDT
FilingAttributes: PROGRAM 10 VERSION 5 = BEGIN
DEPENDS UPON
CHName (2) VERSION 0,
Time(15) VERSION 2;
Attributes
AttributeType: TYPE = LONG CARDINAL;
Attribute: TYPE = RECORD [type: AttributeType, value: AttributeValue];
AttributeSequence: TYPE = SEQUENCE OF Attribute;
AttributeValue: TYPE = SEQUENCE OF UNSPECIFIED;
Time: TYPE = Time.Time; -- seconds
User: TYPE = CHName.Name;
AccessSequence: TYPE = SEQUENCE 5 OF AccessType;
AccessType: TYPE = {
read(0), write(1), owner(2), -- all files
add(3), remove(4), -- directories only
fullAccess(177777B) };
AccessEntrySequence: TYPE = SEQUENCE OF AccessEntry;
Interpretation: TYPE = { interpretationNone(0), boolean(1), cardinal(2),
longCardinal(3), time(4), integer(5), longInteger(6), string(7) };
Interpreted Attribute Definitions
InterpretedAttributeType: TYPE = {
checksum(0), childrenUniquelyNamed(1), createdBy(2), createdOn(3), fileID(4), isDirectory(5), isTemporary(6), modifiedBy(7), modifiedOn(8), name(9), numberOfChildren(10), ordering(11), parentID(12), position(13), readBy(14), readOn(15), dataSize(16), type(17), version(18), accessList(19), defaultAccessList(20), pathname(21), unused22(22), unused23(23), unused24(24), unused25(25), storedSize(26), subtreeSize(27), subtreeSizeLimit(28) };
InterpretedAttribute: TYPE = CHOICE InterpretedAttributeType OF {
checksum  => Checksum,  -- (0),
childrenUniquelyNamed => ChildrenUniquelyNamed, -- (1),
createdBy  => CreatedBy,  -- (2),
createdOn  => CreatedOn,  -- (3),
fileID  => FileID,   -- (4),
isDirectory  => IsDirectory,  -- (5),
isTemporary  => IsTemporary,  -- (6),
modifiedBy  => ModifiedBy,  -- (7),
modifiedOn  => ModifiedOn,  -- (8),
name  => Name,   -- (9),
numberOfChildren => NumberOfChildren,  -- (10),
ordering  => Ordering,  -- (11),
parentID  => ParentID,   -- (12),
position  => Position,   -- (13),
readBy  => ReadBy,   -- (14),
readOn  => ReadOn,   -- (15),
dataSize  => DataSize,   -- (16),
type  => Type,   -- (17),
version  => Version,   -- (18),
accessList  => AccessList,  -- (19),
defaultAccessList => DefaultAccessList,  -- (20),
pathname  => Pathname,  -- (21),
unused22  => Unused,   -- (22),
unused23  => Unused,   -- (23),
unused24  => Unused,   -- (24),
unused25  => Unused,   -- (25),
storedSize  => StoredSize,  -- (26),
subtreeSize  => SubtreeSize,  -- (27),
subtreeSizeLimit => SubtreeSizeLimit  -- (28)
};
accessList: AttributeType = 19;
AccessEntry: TYPE = RECORD [key: User, access: AccessSequence];
AccessList: TYPE = RECORD [entries: AccessEntrySequence, defaulted: BOOLEAN];
checksum: AttributeType = 0;
Checksum: TYPE = CARDINAL;
unknownChecksum: Checksum = 177777B;
childrenUniquelyNamed: AttributeType = 1;
ChildrenUniquelyNamed: TYPE = BOOLEAN;
createdBy: AttributeType = 2;
CreatedBy: TYPE = User;
createdOn: AttributeType = 3;
CreatedOn: TYPE = Time;
dataSize: AttributeType = 16;
DataSize: TYPE = LONG CARDINAL;
defaultAccessList: AttributeType = 20;
DefaultAccessList: TYPE = AccessList;
fileID: AttributeType = 4;
FileID: TYPE = ARRAY 5 OF UNSPECIFIED;
nullFileID: FileID = [0, 0, 0, 0, 0];
isDirectory: AttributeType = 5;
IsDirectory: TYPE = BOOLEAN;
isTemporary: AttributeType = 6;
IsTemporary: TYPE = BOOLEAN;
modifiedBy: AttributeType = 7;
ModifiedBy: TYPE = User;
modifiedOn: AttributeType = 8;
ModifiedOn: TYPE = Time;
name: AttributeType = 9; -- name relative to parent
Name: TYPE = STRING; -- must not exceed 100 bytes
numberOfChildren: AttributeType = 10;
NumberOfChildren: TYPE = CARDINAL;
ordering: AttributeType = 11;
Ordering: TYPE = RECORD [key: AttributeType,
ascending: BOOLEAN, interpretation: Interpretation];
defaultOrdering: Ordering = [key: name,
ascending: TRUE, interpretation: string];
byAscendingPosition: Ordering = [key: position,
ascending: TRUE, interpretation: interpretationNone];
byDescendingPosition: Ordering = [key: position,
ascending: FALSE, interpretation: interpretationNone];
parentID: AttributeType = 12;
ParentID: TYPE = FileID;
pathname: AttributeType = 21;
Pathname: TYPE = STRING;
position: AttributeType = 13;
Position: TYPE = SEQUENCE 100 OF UNSPECIFIED;
firstPosition: Position = [0];
lastPosition: Position = [177777B];
readBy: AttributeType = 14;
ReadBy: TYPE = User;
readOn: AttributeType = 15;
ReadOn: TYPE = Time;
storedSize: AttributeType = 26;
StoredSize: TYPE = LONG CARDINAL;
subtreeSize: AttributeType = 27;
SubtreeSize: TYPE = LONG CARDINAL;
nullSubtreeSizeLimit: SubtreeSizeLimit = 37777777777B;
subtreeSizeLimit: AttributeType = 28;
SubtreeSizeLimit: TYPE = LONG CARDINAL;
type: AttributeType = 17;
Type: TYPE = LONG CARDINAL;
unused: AttributeType = 22, 23, 24, 25;
Unused: TYPE = LONG CARDINAL;
WellKnownType: TYPE = { tUnspecified(0), tDirectory(1), tText(2),
tSerialized(3), tEmpty(4), tAscii(6), tAsciiText(7) };
tUnspecified: Type = 0;
tDirectory:  Type = 1;
tText:  Type = 2;
tSerialized:  Type = 3;
tEmpty:  Type = 4;
tAscii:  Type = 6;
tAsciiText:  Type = 7;
version: AttributeType = 18;
Version: TYPE = CARDINAL;
lowestVersion: Version = 0;
highestVersion: Version = 177777B;
Bulk Data Formats
Serialized File Format
SerializedFile: TYPE = RECORD [version: LONG CARDINAL, file: SerializedTree];
currentVersion: LONG CARDINAL = 3;
StreamOfUnspecified: TYPE = SEQUENCE OF UNSPECIFIED;
SerializedContentBytes: TYPE = RECORD [
data: StreamOfUnspecified,
lastByteIsSignificant: BOOLEAN
];
SerializedTreeSequence: TYPE = SEQUENCE OF SerializedTree;
SerializedTree: TYPE = RECORD [
attributes: AttributeSequence,
content: SerializedContentBytes
children: SerializedTreeSequence -- Cyclic Dependency feature of Sirocco!
];
Attribute Series Format
StreamKind: TYPE = { nextSegment(0), lastSegment(1) };
AttributeSequenceSequence: TYPE = SEQUENCE OF AttributeSequence;
AttributeSequenceList: TYPE = RECORD [
segment: AttributeSequenceSequence
restOfStream: StreamOfAttributeSequence -- Cyclic Dependency feature of Sirocco!
];
StreamOfAttributeSequence: TYPE = CHOICE StreamKind OF {
nextSegment => AttributeSequenceList, -- (0)
lastSegment => AttributeSequenceSequence -- (1)
};
Line-oriented ASCII test file format
StringStreamKind: TYPE = { nextLine(0), lastLine(1) };
StreamOfAsciiText: TYPE = CHOICE StringStreamKind OF {
nextLine => AsciiStringList, -- (0)
lastLine => AsciiString -- (1)
};
AsciiStringList: TYPE = RECORD [
line: AsciiString
restOfText: StreamOfAsciiText -- Cyclic Dependency feature of Sirocco!
];
BytePairSequence: TYPE = SEQUENCE OF UNSPECIFIED;
AsciiString: TYPE = RECORD [
lastByteIsSignificant: BOOLEAN,
data: BytePairSequence
];
END.