<> <> <> <> DIRECTORY Convert, Rope, FilingAttributesP10V5, CHNameP2V0Aux, FilingAttributesP10V5Aux; FilingAttributesP10V5AuxImpl: CEDAR PROGRAM IMPORTS Convert, Rope, CHNameP2V0Aux EXPORTS FilingAttributesP10V5Aux ~ { OPEN FilingAttributesP10V5, FilingAttributesP10V5Aux; ROPE: TYPE ~ Rope.ROPE; ExposeSerializedFile: PUBLIC PROC [arg: SerializedFile, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; res _ Rope.Cat[res, "version~", Convert.RopeFromCard[arg.version], ", "]; res _ Rope.Cat[res, "file~", ExposeSerializedTree[arg.file, (level+1)], "]"]; }; ExposeAttributeValue: PUBLIC PROC [arg: AttributeValue, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, Convert.RopeFromCard[arg.body[i]]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeAccessList: PUBLIC PROC [arg: AccessList, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; res _ Rope.Cat[res, "entries~", ExposeAccessEntrySequence[arg.entries, (level+1)], ", "]; res _ Rope.Cat[res, "defaulted~", Convert.RopeFromBool[arg.defaulted], "]"]; }; ExposeStreamOfUnspecified: PUBLIC PROC [arg: StreamOfUnspecified, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, Convert.RopeFromCard[arg.body[i]]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeAttribute: PUBLIC PROC [arg: Attribute, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; res _ Rope.Cat[res, "type~", Convert.RopeFromCard[arg.type], ", "]; res _ Rope.Cat[res, "value~", ExposeAttributeValue[arg.value, (level+1)], "]"]; }; ExposeOrdering: PUBLIC PROC [arg: Ordering, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; res _ Rope.Cat[res, "key~", Convert.RopeFromCard[arg.key], ", "]; res _ Rope.Cat[res, "ascending~", Convert.RopeFromBool[arg.ascending], ", "]; res _ Rope.Cat[res, "interpretation~", ExposeInterpretation[arg.interpretation, (level+1)], "]"]; }; ExposeWellKnownType: PUBLIC PROC [arg: WellKnownType, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM tUnspecified => res _ "tUnspecified"; tDirectory => res _ "tDirectory"; tText => res _ "tText"; tSerialized => res _ "tSerialized"; tEmpty => res _ "tEmpty"; tAscii => res _ "tAscii"; tAsciiText => res _ "tAsciiText"; ENDCASE => ERROR }; ExposeAccessEntry: PUBLIC PROC [arg: AccessEntry, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; res _ Rope.Cat[res, "key~", CHNameP2V0Aux.ExposeThreePartName[arg.key, (level+1)], ", "]; res _ Rope.Cat[res, "access~", ExposeAccessSequence[arg.access, (level+1)], "]"]; }; ExposeStreamOfAttributeSequence: PUBLIC PROC [arg: StreamOfAttributeSequence, level: NAT] RETURNS [res: ROPE] ~ { res _ Rope.Cat["StreamOfAttributeSequence(", ExposeStreamKind[arg.type, (level+1)], "): "]; WITH arg SELECT FROM it: REF StreamOfAttributeSequenceObject.nextSegment => { res _ Rope.Concat[res, ExposeAttributeSequenceList[it.nextSegment, (level+1)]] }; it: REF StreamOfAttributeSequenceObject.lastSegment => { res _ Rope.Concat[res, ExposeAttributeSequenceSequence[it.lastSegment, (level+1)]] }; ENDCASE => ERROR }; ExposeSerializedTree: PUBLIC PROC [arg: SerializedTree, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; res _ Rope.Cat[res, "attributes~", ExposeAttributeSequence[arg.attributes, (level+1)], ", "]; res _ Rope.Cat[res, "content~", ExposeSerializedContentBytes[arg.content, (level+1)], "]"]; }; ExposeInterpretation: PUBLIC PROC [arg: Interpretation, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM interpretationNone => res _ "interpretationNone"; boolean => res _ "boolean"; cardinal => res _ "cardinal"; longCardinal => res _ "longCardinal"; time => res _ "time"; integer => res _ "integer"; longInteger => res _ "longInteger"; string => res _ "string"; ENDCASE => ERROR }; ExposeAttributeSequence: PUBLIC PROC [arg: AttributeSequence, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, ExposeAttribute[arg.body[i], (level+1)]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeBytePairSequence: PUBLIC PROC [arg: BytePairSequence, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, Convert.RopeFromCard[arg.body[i]]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeAttributeSequenceSequence: PUBLIC PROC [arg: AttributeSequenceSequence, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, ExposeAttributeSequence[arg.body[i], (level+1)]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeAsciiString: PUBLIC PROC [arg: AsciiString, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; res _ Rope.Cat[res, "lastByteIsSignificant~", Convert.RopeFromBool[arg.lastByteIsSignificant], ", "]; res _ Rope.Cat[res, "data~", ExposeBytePairSequence[arg.data, (level+1)], "]"]; }; ExposeAttributeSequenceList: PUBLIC PROC [arg: AttributeSequenceList, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; res _ Rope.Cat[res, "segment~", ExposeAttributeSequenceSequence[arg.segment, (level+1)], "]"]; }; ExposeStreamKind: PUBLIC PROC [arg: StreamKind, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM nextSegment => res _ "nextSegment"; lastSegment => res _ "lastSegment"; ENDCASE => ERROR }; ExposePosition: PUBLIC PROC [arg: Position, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, Convert.RopeFromCard[arg.body[i]]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeSerializedContentBytes: PUBLIC PROC [arg: SerializedContentBytes, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; res _ Rope.Cat[res, "data~", ExposeStreamOfUnspecified[arg.data, (level+1)], ", "]; res _ Rope.Cat[res, "lastByteIsSignificant~", Convert.RopeFromBool[arg.lastByteIsSignificant], "]"]; }; ExposeInterpretedAttributeType: PUBLIC PROC [arg: InterpretedAttributeType, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM checksum => res _ "checksum"; childrenUniquelyNamed => res _ "childrenUniquelyNamed"; createdBy => res _ "createdBy"; createdOn => res _ "createdOn"; fileID => res _ "fileID"; isDirectory => res _ "isDirectory"; isTemporary => res _ "isTemporary"; modifiedBy => res _ "modifiedBy"; modifiedOn => res _ "modifiedOn"; name => res _ "name"; numberOfChildren => res _ "numberOfChildren"; ordering => res _ "ordering"; parentID => res _ "parentID"; position => res _ "position"; readBy => res _ "readBy"; readOn => res _ "readOn"; dataSize => res _ "dataSize"; type => res _ "type"; version => res _ "version"; accessList => res _ "accessList"; defaultAccessList => res _ "defaultAccessList"; pathname => res _ "pathname"; unused22 => res _ "unused22"; unused23 => res _ "unused23"; unused24 => res _ "unused24"; unused25 => res _ "unused25"; storedSize => res _ "storedSize"; subtreeSize => res _ "subtreeSize"; subtreeSizeLimit => res _ "subtreeSizeLimit"; ENDCASE => ERROR }; ExposeStreamOfAsciiText: PUBLIC PROC [arg: StreamOfAsciiText, level: NAT] RETURNS [res: ROPE] ~ { res _ Rope.Cat["StreamOfAsciiText(", ExposeStringStreamKind[arg.type, (level+1)], "): "]; WITH arg SELECT FROM it: REF StreamOfAsciiTextObject.nextLine => { res _ Rope.Concat[res, ExposeAsciiStringList[it.nextLine, (level+1)]] }; it: REF StreamOfAsciiTextObject.lastLine => { res _ Rope.Concat[res, ExposeAsciiString[it.lastLine, (level+1)]] }; ENDCASE => ERROR }; ExposeSerializedTreeSequence: PUBLIC PROC [arg: SerializedTreeSequence, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, ExposeSerializedTree[arg.body[i], (level+1)]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeFileID: PUBLIC PROC [arg: FileID, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..5) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, Convert.RopeFromCard[arg[i]]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeAsciiStringList: PUBLIC PROC [arg: AsciiStringList, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; res _ Rope.Cat[res, "line~", ExposeAsciiString[arg.line, (level+1)], "]"]; }; ExposeAccessEntrySequence: PUBLIC PROC [arg: AccessEntrySequence, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, ExposeAccessEntry[arg.body[i], (level+1)]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeAccessSequence: PUBLIC PROC [arg: AccessSequence, level: NAT] RETURNS [res: ROPE] ~ { res _ "["; FOR i: CARDINAL IN [0..arg.length) DO res _ Rope.Cat[res, IF i>0 THEN ", " ELSE NIL, ExposeAccessType[arg.body[i], (level+1)]]; ENDLOOP; res _ Rope.Concat[res, "]"]; }; ExposeAccessType: PUBLIC PROC [arg: AccessType, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM read => res _ "read"; write => res _ "write"; owner => res _ "owner"; add => res _ "add"; remove => res _ "remove"; fullAccess => res _ "fullAccess"; ENDCASE => ERROR }; ExposeStringStreamKind: PUBLIC PROC [arg: StringStreamKind, level: NAT] RETURNS [res: ROPE] ~ { SELECT arg FROM nextLine => res _ "nextLine"; lastLine => res _ "lastLine"; ENDCASE => ERROR }; ExposeInterpretedAttribute: PUBLIC PROC [arg: InterpretedAttribute, level: NAT] RETURNS [res: ROPE] ~ { res _ Rope.Cat["InterpretedAttribute(", ExposeInterpretedAttributeType[arg.type, (level+1)], "): "]; WITH arg SELECT FROM it: REF InterpretedAttributeObject.checksum => { res _ Rope.Concat[res, Convert.RopeFromCard[it.checksum]] }; it: REF InterpretedAttributeObject.childrenUniquelyNamed => { res _ Rope.Concat[res, Convert.RopeFromBool[it.childrenUniquelyNamed]] }; it: REF InterpretedAttributeObject.createdBy => { res _ Rope.Concat[res, CHNameP2V0Aux.ExposeThreePartName[it.createdBy, (level+1)]] }; it: REF InterpretedAttributeObject.createdOn => { res _ Rope.Concat[res, Convert.RopeFromCard[it.createdOn]] }; it: REF InterpretedAttributeObject.fileID => { res _ Rope.Concat[res, ExposeFileID[it.fileID, (level+1)]] }; it: REF InterpretedAttributeObject.isDirectory => { res _ Rope.Concat[res, Convert.RopeFromBool[it.isDirectory]] }; it: REF InterpretedAttributeObject.isTemporary => { res _ Rope.Concat[res, Convert.RopeFromBool[it.isTemporary]] }; it: REF InterpretedAttributeObject.modifiedBy => { res _ Rope.Concat[res, CHNameP2V0Aux.ExposeThreePartName[it.modifiedBy, (level+1)]] }; it: REF InterpretedAttributeObject.modifiedOn => { res _ Rope.Concat[res, Convert.RopeFromCard[it.modifiedOn]] }; it: REF InterpretedAttributeObject.name => { res _ Rope.Concat[res, it.name] }; it: REF InterpretedAttributeObject.numberOfChildren => { res _ Rope.Concat[res, Convert.RopeFromCard[it.numberOfChildren]] }; it: REF InterpretedAttributeObject.ordering => { res _ Rope.Concat[res, ExposeOrdering[it.ordering, (level+1)]] }; it: REF InterpretedAttributeObject.parentID => { res _ Rope.Concat[res, ExposeFileID[it.parentID, (level+1)]] }; it: REF InterpretedAttributeObject.position => { res _ Rope.Concat[res, ExposePosition[it.position, (level+1)]] }; it: REF InterpretedAttributeObject.readBy => { res _ Rope.Concat[res, CHNameP2V0Aux.ExposeThreePartName[it.readBy, (level+1)]] }; it: REF InterpretedAttributeObject.readOn => { res _ Rope.Concat[res, Convert.RopeFromCard[it.readOn]] }; it: REF InterpretedAttributeObject.dataSize => { res _ Rope.Concat[res, Convert.RopeFromCard[it.dataSize]] }; it: REF InterpretedAttributeObject.type => { res _ Rope.Concat[res, Convert.RopeFromCard[it.type]] }; it: REF InterpretedAttributeObject.version => { res _ Rope.Concat[res, Convert.RopeFromCard[it.version]] }; it: REF InterpretedAttributeObject.accessList => { res _ Rope.Concat[res, ExposeAccessList[it.accessList, (level+1)]] }; it: REF InterpretedAttributeObject.defaultAccessList => { res _ Rope.Concat[res, ExposeAccessList[it.defaultAccessList, (level+1)]] }; it: REF InterpretedAttributeObject.pathname => { res _ Rope.Concat[res, it.pathname] }; it: REF InterpretedAttributeObject.unused22 => { res _ Rope.Concat[res, Convert.RopeFromCard[it.unused22]] }; it: REF InterpretedAttributeObject.unused23 => { res _ Rope.Concat[res, Convert.RopeFromCard[it.unused23]] }; it: REF InterpretedAttributeObject.unused24 => { res _ Rope.Concat[res, Convert.RopeFromCard[it.unused24]] }; it: REF InterpretedAttributeObject.unused25 => { res _ Rope.Concat[res, Convert.RopeFromCard[it.unused25]] }; it: REF InterpretedAttributeObject.storedSize => { res _ Rope.Concat[res, Convert.RopeFromCard[it.storedSize]] }; it: REF InterpretedAttributeObject.subtreeSize => { res _ Rope.Concat[res, Convert.RopeFromCard[it.subtreeSize]] }; it: REF InterpretedAttributeObject.subtreeSizeLimit => { res _ Rope.Concat[res, Convert.RopeFromCard[it.subtreeSizeLimit]] }; ENDCASE => ERROR }; }...