change for non-xml incoming files

This commit is contained in:
george 2012-03-22 02:35:26 +00:00
parent 717ac91c4a
commit d4ba799386
1 changed files with 8 additions and 6 deletions

View File

@ -37,7 +37,7 @@ INITFARY(ZFARY) ; INITIALIZE FILE NUMBERS AND OTHER USEFUL THINGS
S @ZFARY@("C0XSFN")=172.201 ; TRIPLES STRINGS FILE NUMBER S @ZFARY@("C0XSFN")=172.201 ; TRIPLES STRINGS FILE NUMBER
S @ZFARY@("C0XTN")=$NA(^C0X(101)) ; TRIPLES GLOBAL NAME S @ZFARY@("C0XTN")=$NA(^C0X(101)) ; TRIPLES GLOBAL NAME
S @ZFARY@("C0XSN")=$NA(^C0X(201)) ; STRING FILE GLOBAL NAME S @ZFARY@("C0XSN")=$NA(^C0X(201)) ; STRING FILE GLOBAL NAME
S @ZFARY@("C0XDIR")="/home/glilly/fmts/trunk/samples/smart-rdf-in/" S @ZFARY@("C0XDIR")="/home/glilly/sage/test/"
S @ZFARY@("BLKLOAD")=1 ; this file supports block load S @ZFARY@("BLKLOAD")=1 ; this file supports block load
S @ZFARY@("FMTSSTYLE")="F2N" ; fileman style S @ZFARY@("FMTSSTYLE")="F2N" ; fileman style
S @ZFARY@("REPLYFMT")="JSON" S @ZFARY@("REPLYFMT")="JSON"
@ -234,6 +234,8 @@ PROCESS(ZRTN,ZRDF,ZGRF,ZMETA,FARY) ; PROCESS AN INCOMING RDF FILE
; -- first parse the rdf file with the MXML parser ; -- first parse the rdf file with the MXML parser
;S C0XDOCID=$$PARSE^C0CNHIN(ZRDF,"C0XARRAY") ; PARSE WITH MXML ;S C0XDOCID=$$PARSE^C0CNHIN(ZRDF,"C0XARRAY") ; PARSE WITH MXML
S C0XDLC2=$$NOW^XLFDT ; START OF PARSE S C0XDLC2=$$NOW^XLFDT ; START OF PARSE
I @ZRDF@(1)'["<?xml" D Q ;
. W !,"Not an XML file"
S C0XDOCID=$$EN^MXMLDOM(ZRDF,"W") ; S C0XDOCID=$$EN^MXMLDOM(ZRDF,"W") ;
;B ;B
K @ZRDF ; DON'T NEED INPUT BUFFER ANYMORE K @ZRDF ; DON'T NEED INPUT BUFFER ANYMORE
@ -632,11 +634,11 @@ TING(ZRTN,ZGRF,FARY) ; return the iens for graph ZGRF
Q Q
; ;
SWUPDIE(ZFDA) ; SWITCH BETWEEN UPDIE AND BULKLOAD SWUPDIE(ZFDA) ; SWITCH BETWEEN UPDIE AND BULKLOAD
. I $G(BLKLOAD) D ; bulk load I $G(BLKLOAD)=1 D ; bulk load
. . D BULKLOAD(.ZFDA) ; bulk load the batch . D BULKLOAD(.ZFDA) ; bulk load the batch
. E D ; no bulk load E D ; no bulk load
. . D UPDIE(.ZFDA) . D UPDIE(.ZFDA)
. K ZFDA K ZFDA
Q Q
; ;
UPDIE(ZFDA) ; INTERNAL ROUTINE TO CALL UPDATE^DIE AND CHECK FOR ERRORS UPDIE(ZFDA) ; INTERNAL ROUTINE TO CALL UPDATE^DIE AND CHECK FOR ERRORS