(FILECREATED " 4-May-87 14:35:38" {QV}<NOTECARDS>1.3K>LIBRARY>NCCASECLUSTER.;4 13580 changes to: (FNS CASECLUSTER.ArgumentMakeFn) previous date: " 4-May-87 02:23:41" {QV}<NOTECARDS>1.3K>LIBRARY>NCCASECLUSTER.;3) (* Copyright (c) 1987 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT NCCASECLUSTERCOMS) (RPAQQ NCCASECLUSTERCOMS ((FILES (FROM NOTECARDS) NCCLUSTERCARD) (* * Stuff for the CaseCluster notecard type and its child types.) (GLOBALVARS CASECLUSTER.ClusterChildInfos CASECLUSTER.FileBoxNames CASECLUSTER.ArgumentCardHeight CASECLUSTER.ArgumentCardWidth) (VARS (CASECLUSTER.ClusterChildInfos (QUOTE ((Text issues Issues) (Facts facts NIL) (Text decision Decision) (Rationale rationale NIL)))) (CASECLUSTER.FileBoxNames (QUOTE (CasesBox IssuesBox FactsBox DecisionsBox RationalesBox))) (CASECLUSTER.ArgumentCardHeight 200) (CASECLUSTER.ArgumentCardWidth 761)) (FNS CASECLUSTER.CaseClusterMakeFn CASECLUSTER.FactsMakeFn CASECLUSTER.DecisionRuleMakeFn CASECLUSTER.RuleSupportMakeFn CASECLUSTER.LegalStatusRuleMakeFn CASECLUSTER.RuleInstanceMakeFn CASECLUSTER.RationaleMakeFn CASECLUSTER.ArgumentMakeFn) (FNS CASECLUSTER.AddCaseClusterCard CASECLUSTER.AddFactsCard CASECLUSTER.AddDecisionRuleCard CASECLUSTER.AddRuleSupportCard CASECLUSTER.AddLegalStatusRuleCard CASECLUSTER.AddRuleInstanceCard CASECLUSTER.AddRationaleCard CASECLUSTER.AddArgumentCard) (P (CASECLUSTER.AddCaseClusterCard) (CASECLUSTER.AddFactsCard) (CASECLUSTER.AddDecisionRuleCard) (CASECLUSTER.AddRuleSupportCard) (CASECLUSTER.AddLegalStatusRuleCard) (CASECLUSTER.AddRuleInstanceCard) (CASECLUSTER.AddRationaleCard) (CASECLUSTER.AddArgumentCard)))) (FILESLOAD (FROM NOTECARDS) NCCLUSTERCARD) (* * Stuff for the CaseCluster notecard type and its child types.) (DECLARE: DOEVAL@COMPILE DONTCOPY (GLOBALVARS CASECLUSTER.ClusterChildInfos CASECLUSTER.FileBoxNames CASECLUSTER.ArgumentCardHeight CASECLUSTER.ArgumentCardWidth) ) (RPAQQ CASECLUSTER.ClusterChildInfos ((Text issues Issues) (Facts facts NIL) (Text decision Decision) (Rationale rationale NIL))) (RPAQQ CASECLUSTER.FileBoxNames (CasesBox IssuesBox FactsBox DecisionsBox RationalesBox)) (RPAQQ CASECLUSTER.ArgumentCardHeight 200) (RPAQQ CASECLUSTER.ArgumentCardWidth 761) (DEFINEQ (CASECLUSTER.CaseClusterMakeFn (LAMBDA (Card Title NoDisplayFlg) (* rht: " 4-May-87 02:11") (* * Create a case cluster card. Done by passing proper info triples as well as list of fileboxes through to Cluster's MakeCardFn.) (LET ((NoteFile (NCP.CardNoteFile Card))) (OR Title (SETQ Title (NCP.AskUser (CONCAT "Title of " (NCP.CardType Card) " card? ") "-- " NIL T NIL T))) (NCP.ApplySuperTypeFn MakeFn Card Title NoDisplayFlg (create CLUSTER.ClusterInfo ChildInfos ← CASECLUSTER.ClusterChildInfos FileBoxes ←(for FileBoxName in CASECLUSTER.FileBoxNames collect (OR (NCP.LookupCardByName FileBoxName NoteFile) (AND (NCP.AskYesOrNo (CONCAT "Want to create new filebox with name '" FileBoxName "'? ") NIL "Yes" T) (LET ((FileBox (NCP.CreateFileBox NoteFile FileBoxName T NIL NIL ( NCP.ContentsFileBox NoteFile)))) (NCP.RegisterCardByName FileBoxName FileBox) FileBox))))))))) (CASECLUSTER.FactsMakeFn (LAMBDA (Card Title NoDisplayFlg) (* rht: " 4-May-87 02:05") (* * Create a Facts card. Just like a Text card except throws in some initial text.) (LET ((ReturnValue (NCP.ApplySuperTypeFn MakeFn Card Title NoDisplayFlg))) (NCP.CardAddText Card (CONCAT "LEGAL FACTS" (CHARACTER 13) (CHARACTER 13) (CHARACTER 13) "REAL FACTS" (CHARACTER 13) (CHARACTER 13))) ReturnValue))) (CASECLUSTER.DecisionRuleMakeFn (LAMBDA (Card Title NoDisplayFlg) (* rht: " 4-May-87 01:54") (* * Create a DecisionRule card. Just like a Text card except throws in some initial text.) (LET ((ReturnValue (NCP.ApplySuperTypeFn MakeFn Card Title NoDisplayFlg))) (NCP.CardAddText Card (CONCAT "LEGAL CONTEXT" (CHARACTER 13) (CHARACTER 13) "OPERATIVE FACTS" (CHARACTER 13) (CHARACTER 13) "DECISION" (CHARACTER 13) (CHARACTER 13) "SUPPORT" (CHARACTER 13) (CHARACTER 13))) ReturnValue))) (CASECLUSTER.RuleSupportMakeFn (LAMBDA (Card Title NoDisplayFlg) (* rht: " 4-May-87 01:55") (* * Create a RuleSupport card. Just like a Text card except throws in some initial text.) (LET ((ReturnValue (NCP.ApplySuperTypeFn MakeFn Card Title NoDisplayFlg))) (NCP.CardAddText Card (CONCAT "PRINCIPLE" (CHARACTER 13) (CHARACTER 13) "REFERENCE" (CHARACTER 13) (CHARACTER 13) "STATUTE" (CHARACTER 13) (CHARACTER 13) "CASE PRECEDENT" (CHARACTER 13) (CHARACTER 13))) ReturnValue))) (CASECLUSTER.LegalStatusRuleMakeFn (LAMBDA (Card Title NoDisplayFlg) (* rht: " 4-May-87 01:55") (* * Create a LegalStatusRule card. Just like a Text card except throws in some initial text.) (LET ((ReturnValue (NCP.ApplySuperTypeFn MakeFn Card Title NoDisplayFlg))) (NCP.CardAddText Card (CONCAT "LEGAL CONTEXT" (CHARACTER 13) (CHARACTER 13) "OPERATIVE FACTS" (CHARACTER 13) (CHARACTER 13) "LEGAL STATUS" (CHARACTER 13) (CHARACTER 13) "SUPPORT" (CHARACTER 13) (CHARACTER 13))) ReturnValue))) (CASECLUSTER.RuleInstanceMakeFn (LAMBDA (Card Title NoDisplayFlg) (* rht: " 4-May-87 01:58") (* * Create a RuleInstance card. Just like a Text card except throws in some initial text. Also creates and links to a bindings card.) (LET ((ReturnValue (NCP.ApplySuperTypeFn MakeFn Card Title NoDisplayFlg)) (NoteFile (NCP.CardNoteFile Card)) BindingsCard) (NCP.CardAddText Card (CONCAT "LEGAL RULE" (CHARACTER 13) (CHARACTER 13) "BINDINGS" (CHARACTER 13))) (SETQ BindingsCard (NCP.CreateTextCard NoteFile (CONCAT Title ":Bindings") T)) (OR (NCP.ValidLinkTypeP (QUOTE Binding) NoteFile) (NCP.CreateLinkType (QUOTE Binding) NoteFile)) (NCP.LocalGlobalLink (QUOTE Binding) Card BindingsCard) (NCP.CardAddText Card (CONCAT (CHARACTER 13) "STATUS RULES" (CHARACTER 13) (CHARACTER 13))) ReturnValue))) (CASECLUSTER.RationaleMakeFn (LAMBDA (Card Title NoDisplayFlg) (* rht: " 4-May-87 02:01") (* * Create a Rationale card. Just like a text card except starts with an initial link to a fresh Argument card.) (LET ((ReturnValue (NCP.ApplySuperTypeFn MakeFn Card Title NoDisplayFlg)) (NoteFile (NCP.CardNoteFile Card))) (OR (NCP.ValidLinkTypeP (QUOTE Argument) NoteFile) (NCP.CreateLinkType (QUOTE Argument) NoteFile)) (NCP.LocalGlobalLink (QUOTE Argument) Card (NCP.CreateCard (QUOTE Argument) NoteFile (CONCAT Title ":Argument1") T) NIL (QUOTE Title)) ReturnValue))) (CASECLUSTER.ArgumentMakeFn (LAMBDA (Card Title NoDisplayFlg) (* rht: " 4-May-87 14:32") (* * Create an Argument card. Just like a Browser card except builds some initial structure.) (LET ((NoteFile (NCP.CardNoteFile Card)) RuleInstanceCard1 RuleInstanceCard2 HeadingPos) (OR Title (SETQ Title (NCP.AskUser "Title of Argument card: " "--" NIL T NIL))) (OR (NCP.ValidLinkTypeP (QUOTE Support) NoteFile) (NCP.CreateLinkType (QUOTE Support) NoteFile)) (OR (NCP.ValidLinkTypeP (QUOTE Status) NoteFile) (NCP.CreateLinkType (QUOTE Status) NoteFile)) (SETQ RuleInstanceCard1 (NCP.CreateCard (QUOTE RuleInstance) NoteFile (CONCAT Title ":Rule1") T)) (SETQ RuleInstanceCard2 (NCP.CreateCard (QUOTE RuleInstance) NoteFile (CONCAT Title ":Rule2") T)) (* Find the "STATUS RULES" string in the first rule instance card and insert link to second rule instance card there.) (SETQ HeadingPos (TEDIT.FIND (TEXTOBJ (NCP.CardSubstance RuleInstanceCard1)) "STATUS RULES" 1 NIL)) (NCP.ChangeLoc RuleInstanceCard1 (if HeadingPos then (PLUS HeadingPos (NCHARS "LEGAL CONTEXT")) else 1)) (NCP.CardAddText RuleInstanceCard1 (CHARACTER 13)) (NCP.LocalGlobalLink (QUOTE Status) RuleInstanceCard1 RuleInstanceCard2 NIL (QUOTE Title)) (* Create this card as a browser on the structure we just built.) (NCP.CreateBrowserCard NoteFile Title (LIST (QUOTE ROOTCARDS) RuleInstanceCard1 (QUOTE LINKTYPES) (QUOTE (Support Status Binding)) (QUOTE FORMAT) (QUOTE (LATTICE VERTICAL))) NoDisplayFlg)))) ) (DEFINEQ (CASECLUSTER.AddCaseClusterCard (LAMBDA NIL (* rht: " 4-May-87 02:10") (NCP.CreateCardType (QUOTE CaseCluster) (QUOTE Cluster) (BQUOTE ((MakeFn , (FUNCTION CASECLUSTER.CaseClusterMakeFn)))) (BQUOTE ((LinkDisplayMode Title) (DisplayedInMenuFlg , T)))))) (CASECLUSTER.AddFactsCard (LAMBDA NIL (* rht: " 4-May-87 02:08") (NCP.CreateCardType (QUOTE Facts) (QUOTE Text) (BQUOTE ((MakeFn , (FUNCTION CASECLUSTER.FactsMakeFn)))) (BQUOTE ((LinkDisplayMode Title) (DisplayedInMenuFlg , T)))))) (CASECLUSTER.AddDecisionRuleCard (LAMBDA NIL (* rht: " 4-May-87 02:08") (NCP.CreateCardType (QUOTE DecisionRule) (QUOTE Text) (BQUOTE ((MakeFn , (FUNCTION CASECLUSTER.DecisionRuleMakeFn)))) (BQUOTE ((LinkDisplayMode Title) (DisplayedInMenuFlg , T)))))) (CASECLUSTER.AddRuleSupportCard (LAMBDA NIL (* rht: " 4-May-87 02:09") (NCP.CreateCardType (QUOTE RuleSupport) (QUOTE Text) (BQUOTE ((MakeFn , (FUNCTION CASECLUSTER.RuleSupportMakeFn)))) (BQUOTE ((LinkDisplayMode Title) (DisplayedInMenuFlg , T)))))) (CASECLUSTER.AddLegalStatusRuleCard (LAMBDA NIL (* rht: " 4-May-87 02:09") (NCP.CreateCardType (QUOTE LegalStatusRule) (QUOTE Text) (BQUOTE ((MakeFn , (FUNCTION CASECLUSTER.LegalStatusRuleMakeFn)))) (BQUOTE ((LinkDisplayMode Title) (DisplayedInMenuFlg , T)))))) (CASECLUSTER.AddRuleInstanceCard (LAMBDA NIL (* rht: " 4-May-87 02:09") (NCP.CreateCardType (QUOTE RuleInstance) (QUOTE Text) (BQUOTE ((MakeFn , (FUNCTION CASECLUSTER.RuleInstanceMakeFn)))) (BQUOTE ((LinkDisplayMode Title) (DisplayedInMenuFlg , T)))))) (CASECLUSTER.AddRationaleCard (LAMBDA NIL (* rht: " 4-May-87 02:09") (NCP.CreateCardType (QUOTE Rationale) (QUOTE Text) (BQUOTE ((MakeFn , (FUNCTION CASECLUSTER.RationaleMakeFn)))) (BQUOTE ((LinkDisplayMode Title) (DisplayedInMenuFlg , T)))))) (CASECLUSTER.AddArgumentCard (LAMBDA NIL (* rht: " 4-May-87 02:10") (NCP.CreateCardType (QUOTE Argument) (QUOTE Browser) (BQUOTE ((MakeFn , (FUNCTION CASECLUSTER.ArgumentMakeFn)))) (BQUOTE ((LinkDisplayMode Title) (DisplayedInMenuFlg , T)))))) ) (CASECLUSTER.AddCaseClusterCard) (CASECLUSTER.AddFactsCard) (CASECLUSTER.AddDecisionRuleCard) (CASECLUSTER.AddRuleSupportCard) (CASECLUSTER.AddLegalStatusRuleCard) (CASECLUSTER.AddRuleInstanceCard) (CASECLUSTER.AddRationaleCard) (CASECLUSTER.AddArgumentCard) (PUTPROPS NCCASECLUSTER COPYRIGHT ("Xerox Corporation" 1987)) (DECLARE: DONTCOPY (FILEMAP (NIL (2535 10355 (CASECLUSTER.CaseClusterMakeFn 2545 . 3847) (CASECLUSTER.FactsMakeFn 3849 . 4381) (CASECLUSTER.DecisionRuleMakeFn 4383 . 5054) (CASECLUSTER.RuleSupportMakeFn 5056 . 5721) ( CASECLUSTER.LegalStatusRuleMakeFn 5723 . 6404) (CASECLUSTER.RuleInstanceMakeFn 6406 . 7488) ( CASECLUSTER.RationaleMakeFn 7490 . 8248) (CASECLUSTER.ArgumentMakeFn 8250 . 10353)) (10356 13237 ( CASECLUSTER.AddCaseClusterCard 10366 . 10727) (CASECLUSTER.AddFactsCard 10729 . 11069) ( CASECLUSTER.AddDecisionRuleCard 11071 . 11432) (CASECLUSTER.AddRuleSupportCard 11434 . 11792) ( CASECLUSTER.AddLegalStatusRuleCard 11794 . 12164) (CASECLUSTER.AddRuleInstanceCard 12166 . 12527) ( CASECLUSTER.AddRationaleCard 12529 . 12881) (CASECLUSTER.AddArgumentCard 12883 . 13235))))) STOP