updates and bug fixes

This commit is contained in:
george 2012-02-20 04:03:49 +00:00
parent 3aea90492d
commit f06f96182a
3 changed files with 11 additions and 6 deletions

View File

@ -37,10 +37,10 @@ INITFARY(ZFARY) ; INITIALIZE FILE NUMBERS AND OTHER USEFUL THINGS
S @ZFARY@("C0XSFN")=172.201 ; TRIPLES STRINGS FILE NUMBER
S @ZFARY@("C0XTN")=$NA(^C0X(101)) ; TRIPLES GLOBAL NAME
S @ZFARY@("C0XSN")=$NA(^C0X(201)) ; STRING FILE GLOBAL NAME
S @ZFARY@("C0XDIR")="/home/glilly/snomed/"
S @ZFARY@("C0XDIR")="/home/vista/gpl/C0Q/trunk/rdf/"
S @ZFARY@("BLKLOAD")=1 ; this file supports block load
S @ZFARY@("FMTSSTYLE")="F2N" ; fileman style
S @ZFARY@("REPLYFMT")="JSON"
S @ZFARY@("REPLYFMT")=""
D USEFARY(ZFARY)
Q
;
@ -273,6 +273,8 @@ PROCESS(ZRTN,ZRDF,ZGRF,ZMETA,FARY) ; PROCESS AN INCOMING RDF FILE
S C0XTYPE("rdf:Description")=1
S C0XTYPE("owl:ObjectProperty")=1
S C0XTYPE("owl:Ontology")=1
S C0XTYPE("owl:Class")=1
S C0XTYPE("rdfs:subClassOf")=1
S ZI=$O(@ZDOM@(1,"C",""))
I '$G(C0XTYPE(@ZDOM@(1,"C",ZI))) D Q ; not an rdf file
. W !,"Error. Not an RDF file. Cannot process."
@ -314,7 +316,7 @@ PROCESS(ZRTN,ZRDF,ZGRF,ZMETA,FARY) ; PROCESS AN INCOMING RDF FILE
. . . . S C0XPRE=C0XVOC(ZB)_ZA ; expanded
. . S ZY=$G(@ZDOM@(ZJ,"A","rdf:resource")) ; potential object
. . I ZY'="" D Q ;
. . . S C0XOBJ=ZY ; object
. . . S C0XOBJ=$$EXT^C0XUTIL(ZY) ; object
. . . D ADD(ZGRF,C0XSUB,C0XPRE,C0XOBJ) ; finally. our first real triple
. . ; -- this is an else because of the quit above
. . S ZX=$G(@ZDOM@(ZJ,"A","rdf:nodeID")) ; fishing for nodeId object
@ -325,6 +327,7 @@ PROCESS(ZRTN,ZRDF,ZGRF,ZMETA,FARY) ; PROCESS AN INCOMING RDF FILE
. . S C0XOBJ=$G(@ZDOM@(ZJ,"T",1)) ; hopefully an object is here
. . I C0XOBJ="" D Q ; not a happy situation
. . . W !,"ERROR, NO OBJECT FOUND FOR NODE: ",ZJ
. . S C0XOBJ=$$EXT^C0XUTIL(C0XOBJ) ; might be namespaced
. . D ADD(ZGRF,C0XSUB,C0XPRE,C0XOBJ) ; go for it and add a node
S C0XTRP=$$NOW^XLFDT ; PARSE COMPLETE
W !,"TRIPLES COMPLETE AT ",C0XTRP

View File

@ -35,7 +35,7 @@ INIT ; INITIALIZE THE TRIPLE STORE - THIS DELETES THE GLOBALS AND
;
; -- we are assuming that FARY is set up properly in C0XF2N
; -- with repect to the default directory and the defaut fileman files
; -- here's what it is now: "/home/glilly/fmts/trunk/samples/"
; -- here's what it is now: "/home/vista/gpl/fmts/trunk/samples/"
; -- that means that all the sample files will look like:
; --- qds/QDS_0001.rdf
; --- smart-rdf-in/small.rdf
@ -43,7 +43,7 @@ INIT ; INITIALIZE THE TRIPLE STORE - THIS DELETES THE GLOBALS AND
S FARY="C0XFARY"
D INITFARY^C0XF2N(FARY)
D USEFARY^C0XF2N(FARY)
S C0XFARY("C0XDIR")="/home/glilly/fmts/trunk/samples/smart-rdf-in/" ;
S C0XFARY("C0XDIR")="/home/vista/gpl/fmts/trunk/samples/smart-rdf-in/" ;
D USEFARY^C0XF2N(FARY)
S SMART(1)="cole-susan.rdf"
S SMART(2)="jones-cynthia.rdf"
@ -64,7 +64,7 @@ INIT ; INITIALIZE THE TRIPLE STORE - THIS DELETES THE GLOBALS AND
F S ZI=$O(SMART(ZI)) Q:ZI="" D ; for each smart file
. D IMPORT^C0XF2N(SMART(ZI),C0XDIR,,FARY) ; import to the triplestore
S FARY="C0XFARY"
S C0XFARY("C0XDIR")="/home/glilly/fmts/trunk/samples/qds/"
S C0XFARY("C0XDIR")="/home/vista/gpl/fmts/trunk/samples/qds/"
D USEFARY^C0XF2N(FARY)
D IMPORT^C0XF2N("QDS_0001.rdf",C0XDIR,,FARY)
D IMPORT^C0XF2N("QDS_0028b.rdf",C0XDIR,,FARY)

View File

@ -57,6 +57,8 @@ VOCINIT ; INITIALIZE VOCABULARIES
S C0XVOC("mv")="http://metavista.name/foundation#"
S C0XVOC("rdfs")="http://www.w3.org/2000/01/rdf-schema#"
S C0XVOC("vista")="http://osehra.org/ns#"
S C0XVOC("vmu")="http://vista.org/mu/"
S C0XVOC("vq")="http://vista.org/quality/"
Q
;
EXT(C0XIN) ; EXTRINSIC WHICH EXPANDS NAMESPACES