What recommendations are there for processing through a 31 column
spreadsheet and pulling out the data properties?   I have an imported
xls file with 31 columns of data and the ss: properties of cell,
column, row, cellContents, etc.
The first column, zero, contains the Department Name, the next column
contains the Department ID, etc.
SELECT *
WHERE {
   ?ColumnHeading   a   ss:Cell .
   ?ColumnHeading   ss:column   ?col .
   ?ColumnHeading   ss:cellContents   ?ColumnValue .
    FILTER (?col = "0"^^xsd:integer) .
}
Sample triple from the above SPARQL:
ColumnHeading = <@b549fb5:131851e0c2d:-101a>
Col = 0
ColumnValue = PKPD

SELECT *
WHERE {
    ?ColumnHeading   a   ss:Cell .
    ?ColumnHeading   ss:column   ?col .
    ?ColumnHeading   ss:cellContents   ?ColumnValue .
    FILTER (?col = "1"^^xsd:integer) .
}
Sample triple from the above SPARQL:
ColumnHeading = <@b549fb5:131851e0c2d:-1012>
Col = 1
ColumnValue = 345

Here's part of my SPARQLMotion construct module.  I'm looking for an
iterative way to process the spreadsheet so I don't have to build 31
construct modules.

CONSTRUCT {
    :Dept a owl:Class .
    :hasDeptName a owl:DatatypeProperty .
    :hasDeptName rdfs:domain :Dept .
    :hasDeptName rds:range xsd:string .

    ?deptUri a :Dept .
    ?deptUri rdfs:label ?deptLabel .
    ?deptUri :hasDeptName ?deptName .
}
WHERE {
    ?ColumnHeading   a   ss:Cell .
    ?ColumnHeading   ss:column   ?col .
    ?ColumnHeading    ss:cellContents   ?deptName .
    FILTER (?col = "0"^^xsd:integer) .
    BIND (smf:buildURI("http://example.com/data#dept-{?1}";, ?deptName)
AS ?deptUri) .
    BIND (smf:cast(fn:concat("Department ", ?deptName), xsd:string)
AS ?deptLabel) .
}

Thanks,
Karen

-- 
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to