Changeset 1391
- Timestamp:
- Apr 4, 2012, 2:45:35 PM (13 years ago)
- Location:
- fmts/trunk/p
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
fmts/trunk/p/C0XGET1.m
r1388 r1391 109 109 ; 110 110 getGraph(zrtn,zgrf,form) ; get all triples in graph zgrf 111 ; forms planned: "rdf" "json" "array" "turtle" "triples" 112 ; forms supported: "rdf" "json" "array" 111 ; forms planned: "rdf" "json" "array" "turtle" "triples" "raw" 112 ; forms supported: "rdf" "json" "array" "raw" 113 113 I '$D(form) S form="rdf" 114 114 N ZIENS,ZTRIP … … 119 119 i form="rdf" d rdfout^C0XRDF(.zrtn,.ZTRIP) q ; 120 120 i form="array" d arrayout^C0XGET1(.zrtn,.ZTRIP) q ; 121 i form="raw" d rawout^C0XGET1(.zrtn,.ZTRIP) q ; 121 122 W !,"Form not supported: ",form 122 123 Q … … 157 158 i form="json" d jsonout(.triplertn,.zrary) q ; what follows is 'else' 158 159 i form="rdf" d rdfout^C0XRDF(.triplertn,.zrary) q ; 159 i form="array" d arrayout(.triplertn,.zrary) q ; 160 i form="array" d arrayout(.triplertn,.zrary) q ; 161 i form="raw" d rawout(.triplertn,.zrary) q ; 160 162 w !,"form not supported: ",form 161 163 q … … 283 285 q 284 286 ; 287 rawout(rtn,zary) ; output a mumps array of triples 288 ; 289 s zrsub="" 290 ;s zcnt=1 291 f s zrsub=$o(zary(zrsub)) q:zrsub="" d ; organized by subject 292 . s zzz="" 293 . f s zzz=$o(zary(zrsub,zzz)) q:zzz="" d ; pred and obj 294 . . s rtn(zrsub,$p(zzz,"^",1))=$p(zzz,"^",2) 295 . . ;s zcnt=zcnt+1 296 q 297 ; 285 298 strings(zrary,zinary) ; convert pointers to strings 286 299 ; -
fmts/trunk/p/C0XRDF.m
r1385 r1391 43 43 . S ZA=$P(ZPRED,":",1) 44 44 . S ZB=$P(ZPRED,":",2) 45 . I $E(ZB,1,1)="/" D ; 46 . . S ZB=$P(ZB,"/",2) ; handling gpltest:/note situations 45 47 . S ZC=C0XVOC(ZA) 46 48 . I ZOBJ["nodeID:" D Q ;
Note:
See TracChangeset
for help on using the changeset viewer.