@@ -511,19 +511,21 @@ CONSTRUCT {
511511
512512 # Subject
513513 OPTIONAL {
514- ?id nsg:subject / nsg:age ?age .
515- OPTIONAL { ?age schema:value ?subjectAgeValue . } .
516- OPTIONAL { ?age schema:minValue ?subjectAgeMinValue . } .
517- OPTIONAL { ?age schema:maxValue ?subjectAgeMaxValue . } .
518- ?age schema:unitCode ?subjectAgeUnit .
519- ?age nsg:period ?subjectAgePeriod .
520- BIND(
521- IF (
522- BOUND (?subjectAgeValue ),
523- CONCAT (STR (?subjectAgeValue ), " ", STR (?subjectAgeUnit ), " ", STR (?subjectAgePeriod )),
524- CONCAT (STR (?subjectAgeMinValue ), " to ", STR (?subjectAgeMaxValue ), " ", STR (?subjectAgeUnit ), " ", STR (?subjectAgePeriod ))
525- ) as ?subjectAgeLabel ) .
526- } .
514+ GRAPH ?id {
515+ BIND(BNODE(CONCAT(STR(?id), ' /age' )) as ?age ) .
516+ OPTIONAL { ?id nsg:subject / nsg:age / schema:value ?subjectAgeValue . } .
517+ OPTIONAL { ?id nsg:subject / nsg:age / schema:minValue ?subjectAgeMinValue . } .
518+ OPTIONAL { ?id nsg:subject / nsg:age / schema:maxValue ?subjectAgeMaxValue . } .
519+ ?id nsg:subject / nsg:age / schema:unitCode ?subjectAgeUnit .
520+ ?id nsg:subject / nsg:age / nsg:period ?subjectAgePeriod .
521+ BIND(
522+ IF(
523+ BOUND(?subjectAgeValue),
524+ CONCAT(STR(?subjectAgeValue), " " , STR(?subjectAgeUnit), " " , STR(?subjectAgePeriod)),
525+ CONCAT(STR(?subjectAgeMinValue), " to " , STR(?subjectAgeMaxValue), " " , STR(?subjectAgeUnit), " " , STR(?subjectAgePeriod))
526+ ) as ?subjectAgeLabel ) .
527+ }
528+ } .
527529
528530 OPTIONAL {
529531 ?id nsg:subject / schema:weight ?weight .
0 commit comments