Changeset 1423 for fmts/trunk/p/C0XXFRM.m
- Timestamp:
- May 6, 2012, 10:28:08 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fmts/trunk/p/C0XXFRM.m
r1422 r1423 22 22 TEST1 ; test GRAPHY 23 23 ; 24 D INITFARY^C0XF2N("C0XFARY") 25 D USEFARY^C0XF2N("C0XFARY") 24 26 S G("possibleMatch",18262)="" 25 27 S G("possibleMatch",18262,"DOB")="19520606^19520606" … … 33 35 S G("possibleMatch",18263,"SSN")=3232221111 34 36 S GRAPH="/test/gpl/graph" 37 D DELGRAPH^C0XF2N(GRAPH) 35 38 S SUBJECT="/test/gpl/match" 36 39 D GRAPHY("G2","G",GRAPH,SUBJECT) ; CONVERT TO GRAPH 37 40 W ! 38 41 ZWR G2 42 D PUTGRAF("G2",GRAPH) ; add them to the triple store 39 43 ; 40 44 Q … … 54 58 F S ZJ=$O(@ZIN@(ZP,ZJ)) Q:ZJ="" D ; for each object 55 59 . N ZO 56 . S ZO=$$ANONS^C0XF2N ; anonomous subject 57 . S @ZOUT@(ZSUB,ZP,ZO)="" 58 . S @ZOUT@(ZO,"rdf:id",ZJ)="" 60 . ;S ZO=$$ANONS^C0XF2N ; anonomous subject 61 . S ZO="vista:"_ZJ 62 . S @ZOUT@(ZSUB,"fmts:"_ZP,ZO)="" 63 . ;S @ZOUT@(ZO,"fmts:id",ZJ)="" 59 64 . N ZK S ZK="" 60 65 . F S ZK=$O(@ZIN@(ZP,ZJ,ZK)) Q:ZK="" D ; 61 . . S @ZOUT@(ZO, ZK,$G(@ZIN@(ZP,ZJ,ZK)))=""62 . . D GRAPHY(ZOUT,$NA(@ZIN@(ZP,ZJ,ZK)),ZGRF,ZO)66 . . S @ZOUT@(ZO,"fmts:"_ZK,$G(@ZIN@(ZP,ZJ,ZK)))="" 67 . . ;D GRAPHY(ZOUT,$NA(@ZIN@(ZP,ZJ,ZK)),ZGRF,ZO) 63 68 ; 69 Q 70 ; 71 PUTGRAF(ZIN,ZGRF) ; add graph ZIN to the triples store with graph name ZGRF 72 ; format for ZIN is @ZIN@("subject","predicate","object")="" 73 N ZI,ZJ,ZK S (ZI,ZJ,ZK)="" 74 D STARTADD^C0XF2N ; initialize for adding 75 F S ZI=$O(@ZIN@(ZI)) Q:ZI="" D ; 76 . N ZARY 77 . F S ZJ=$O(@ZIN@(ZI,ZJ)) Q:ZJ="" D ; 78 . . F S ZK=$O(@ZIN@(ZI,ZJ,ZK)) Q:ZK="" D ; 79 . . . S ZARY(ZJ)=ZK 80 . . . D ADDINN^C0XF2N(ZGRF,ZI,.ZARY) ; add triples for one subject 81 . ;ZWR C0XFDA 82 D BULKLOAD^C0XF2N(.C0XFDA) ; add to the triplestore 64 83 Q 65 84 ;
Note:
See TracChangeset
for help on using the changeset viewer.