W3C home > Mailing lists > Public > public-sparql-dev@w3.org > October to December 2010

Using iteration to CONSTRUCT iteration on the fly ...

From: Tim Darr <tdarr2201@gmail.com>
Date: Tue, 16 Nov 2010 09:50:44 -0600
Message-ID: <AANLkTi=6H7fJtROzuBZ8eH34Enk-u=0O6X0SyqeyijrN@mail.gmail.com>
To: public-sparql-dev@w3.org
I have a problem where I want to transform one representation of tabular
data to another. In the source representation, the table is represented by
the number of rows and the number of columns in the table (both properties
are integers):



:Table

      a       owl:Class ;

      rdfs:subClassOf

              [ a       owl:Restriction ;

                owl:cardinality "1"^^xsd:int ;

                owl:onProperty :hasNumberOfRows

              ] ;

      rdfs:subClassOf

              [ a       owl:Restriction ;

                owl:cardinality "1"^^xsd:int ;

                owl:onProperty :hasNumberOfColumns

              ] .



In the second representation, the table is represented as a list of cells:



:ComplexTable

      a       owl:Class ;

      rdfs:subClassOf

              [ a       owl:Restriction ;

                owl:allValuesFrom :CellType ;

                owl:onProperty :hasCell

              ] ;

      rdfs:subClassOf

              [ a       owl:Restriction ;

                owl:minCardinality  "1"^^xsd:int ;

                owl:onProperty :hasCell

              ] .



Basically what I want to do is the equivalent of iterating over the number
of rows and columns in the first representation, and create instances of the
:CellType in the second representation.



Is this possible using only SPARQL?
Received on Wednesday, 17 November 2010 09:51:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 17 November 2010 09:51:58 GMT