OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office-metadata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: OpenOffice can parse RDF ?!?!?


Hi Svante,

I'm working on my sample document for the presentation week after next. It's coming along nicely.

I'm combining OpenOffice XForms with our metadata spec, in the following sense: I've created a form where filling out the form populates an RDF "shell" instance that once completed can be acted upon by a submit action. In some future version of OO, I can imagine a submit action being supported where the instance is actually saved as a metadata file into the document's ODF package, and the metadata manifest is updated. I've attached the ODF --- very much a "work-in-progress", but I think you might get a very rough idea.

Colon2.odt

The interesting thing I've discovered--and I'm hoping you can shed some light on this--is that OO 2.2.1 out-of-the-box seems to "understand" RDF remarkably well. When I create a new instance in my XForms model, and then populate it with a by linking a "sample" RDF file to serve as a xforms:instance, I find that the instance browser in OO -- remarkably -- shows a "smart view" of the RDF content. Specifically, the rdf:Description elements are all elided (except those that refer to blank nodes) and OO 2.2.1 seems to know that the @about of an rdf:Description element is actually the subject of the triple  !!!!

Look, for example, at the RDF file:

      <rdf:Description rdf:about="#JJ_Polypectomy">
            <rdf:type rdf:resource="http://www.cap.org/2007/08/templates/colon#Polypectomy"/>
            <pert:hasProcedureDateTime rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2007-08-27T08:00:00</pert:hasProcedureDateTime>
            <pert:hasOperatingSurgeon rdf:resource="#Sam_Surgeon"/>
      </rdf:Description>
      <rdf:Description rdf:about="#Sam_Surgeon">
            <rdf:type rdf:resource="http://www.cap.org/2007/08/templates/colon#Surgeon"/>
      </rdf:Description>
      <rdf:Description rdf:nodeID="A0">
            <pert:hasUnit rdf:resource="http://www.cap.org/2007/08/templates/colon#centimeter"/>
            <rdf:type rdf:resource="http://www.cap.org/2007/08/templates/colon#Size"/>
            <pert:hasQuantity rdf:datatype="http://www.w3.org/2001/XMLSchema#float">2.0</pert:hasQuantity>
      </rdf:Description>
      <rdf:Description rdf:about="">
            <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Ontology"/>
            <owl:imports rdf:resource="http://www.cap.org/2007/08/templates/colon"/>
      </rdf:Description>
      <rdf:Description rdf:about="#Jim_Jones">
            <pert:hasSpecimen rdf:resource="#JJ_Specimen"/>
            <pert:hasPatientIdentifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">012-34-5678</pert:hasPatientIdentifier>
            <rdf:type rdf:resource="http://www.cap.org/2007/08/templates/colon#Patient"/>
      </rdf:Description>
      <rdf:Description rdf:about="#Pete_Pathologist">
            <rdf:type rdf:resource="http://www.cap.org/2007/08/templates/colon#Pathologist"/>
      </rdf:Description>
      <rdf:Description rdf:about="#JJ_Specimen">
            <pert:hasGrossSize rdf:nodeID="A1"/>
            <pert:hasIntegrity rdf:resource="http://www.cap.org/2007/08/templates/colon#Intact_integrity"/>
            <pert:hasSite rdf:resource="http://www.cap.org/2007/08/templates/colon#RightColon"/>
            <pert:hasSpecimenIdentifier rdf:datatype="http://www.w3.org/2001/XMLSchema#string">SL-07-98765-A</pert:hasSpecimenIdentifier>
            <pert:fromProcedure rdf:resource="#JJ_Polypectomy"/>
            <pert:hasHistologicType rdf:resource="http://www.cap.org/2007/08/templates/colon#MucinousAdenocarcinoma_type"/>
            <pert:hasInvasiveSize rdf:nodeID="A0"/>
            <pert:hasHistologicGrade rdf:resource="http://www.cap.org/2007/08/templates/colon#HighGrade"/>
            <rdf:type rdf:resource="http://www.cap.org/2007/08/templates/colon#ColonTumorSpecimen"/>
            <pert:hasConfiguration rdf:resource="http://www.cap.org/2007/08/templates/colon#Sessile_configuration"/>
            <pert:hasPathologist rdf:resource="#Pete_Pathologist"/>
      </rdf:Description>
      <rdf:Description rdf:nodeID="A1">
            <pert:hasQuantity rdf:datatype="http://www.w3.org/2001/XMLSchema#float">0.0</pert:hasQuantity>
            <pert:hasUnit rdf:resource="http://www.cap.org/2007/08/templates/colon#centimeter"/>
            <rdf:type rdf:resource="http://www.cap.org/2007/08/templates/colon#Size"/>
      </rdf:Description>
</rdf:RDF>


And now look at the (incompletely expanded) Data Navigator tree that OO 2.21 shows -- with no additional prompting -- when I import this RDF as an XForms instance:

JPEG image


This totally blows me away. Can you clarify for me how OO 2.2.1 is so adept at parsing RDF?

John


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]