tetherless-world / nanomine-graph

the visualization web app for nanomine project
MIT License
1 stars 4 forks source link

nm:ManufacturerOrSourceName attribute missing from Filler and Surface Treatment components #32

Open mdeagen opened 4 years ago

mdeagen commented 4 years ago

This attribute appears for component parts with role of Matrix, however does not appear for component parts of Filler or Surface Treatment. This information is included in the XML files, with the xpath nested within the respective component(s).

mdeagen commented 3 years ago

@rashidsabbir Filler materials' manufacturer data are not importing.

# Show distinct ManufacturerOrSourceName for Filler materials
PREFIX nm: <http://nanomine.org/ns/>
PREFIX sio: <http://semanticscience.org/resource/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?mfgr WHERE {
  ?sample a nm:PolymerNanocomposite ;
          sio:hasComponentPart [ sio:hasRole [ a nm:Filler ] ;
                                 sio:hasAttribute [ a nm:ManufacturerOrSourceName ;
                                                    sio:hasValue ?mfgr ] 
                               ]
}

0 results

However, Surface Treatment materials' manufacturer data are importing now.

# Show distinct ManufacturerOrSourceName for Surface Treatment materials
PREFIX nm: <http://nanomine.org/ns/>
PREFIX sio: <http://semanticscience.org/resource/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT ?mfgr WHERE {
  ?sample a nm:PolymerNanocomposite ;
          sio:hasComponentPart/sio:isSurroundedBy/sio:hasAttribute ?x .
  ?x a nm:ManufacturerOrSourceName ;
     sio:hasValue ?mfgr .
} 

28 results

The Filler ManufacturerOrSourceName is nested within the FillerComponent element in the XML's, so SETLr should check here before moving on to the ParticleSurfaceTreatment element.

Below is an example XML that has ManufacturerOrSourceName info for Matrix, Filler, and ParticleSurfaceTreatment:

image

mdeagen commented 3 years ago

Cause of issue appears to be in https://github.com/tetherless-world/nanomine-graph/blob/master/setl/xml_ingest.setl.ttl. The attribute for ManufacturerOrSourceName is only included in SETL for Surface Treatment and Matrix components (see example below) image This attribute should also exist under FillerComponent, e.g. around line 247-248

rashidsabbir commented 3 years ago

I've added some content in lines 192-201 which should address the missing manufacturer for FillerComponent

mdeagen commented 3 years ago

Update: Here is the SPARQL query for testing (After ingestion, should return 3 results: mm:Filler, mm:Matrix, and mm:SurfaceTreatment for an XML file such as L142_S3_Gao_2014.xml)

PREFIX sio: <http://semanticscience.org/resource/>
PREFIX mm: <http://materialsmine.org/ns/>
SELECT DISTINCT ?role WHERE {
  ?compound sio:hasAttribute [ a mm:ManufacturerOrSourceName ] ;
            sio:hasRole [ a ?role ]
}