All Downloads are FREE. Search and download functionalities are using the official Maven repository.

schema.spra.spin.ttl Maven / Gradle / Ivy

There is a newer version: 5.1.0
Show newest version
# baseURI: http://spinrdf.org/spra
# imports: http://spinrdf.org/spr

@prefix fn:  .
@prefix owl:  .
@prefix rdf:  .
@prefix rdfs:  .
@prefix smf:  .
@prefix sp:  .
@prefix spin:  .
@prefix spl:  .
@prefix spr:  .
@prefix spra:  .
@prefix xsd:  .

spr:colCountBase
  spin:returnType xsd:integer ;
.

  rdf:type owl:Ontology ;
  rdfs:comment "An implementation of the SPR specification that stores table cells in URIs derived from the URI of the table. For example, if the spra:Table object has URI ex:MyTable, then the cells are called ex:MyTable-r1-c2 for column 2 and row 1."^^xsd:string ;
  owl:imports  ;
  owl:versionInfo "0.6.0"^^xsd:string ;
.
spra:Table
  rdf:type spr:TableClass ;
  spr:cellFunction spra:cellFunction ;
  spr:colCountFunction spra:colCountFunction ;
  spr:colNameFunction spra:colNameFunction ;
  spr:rowCountFunction spra:rowCountFunction ;
  rdfs:label "Table"^^xsd:string ;
  rdfs:subClassOf spr:Table ;
.
spra:cellFunction
  rdf:type spin:Function ;
  spin:body [
      rdf:type sp:Select ;
      sp:resultVariables (
          [
            sp:varName "value"^^xsd:string ;
          ]
        ) ;
      sp:where (
          [
            rdf:type sp:Bind ;
            sp:expression [
                rdf:type sp:concat ;
                sp:arg1 [
                    rdf:type xsd:string ;
                    sp:arg1 spin:_arg1 ;
                  ] ;
                sp:arg2 "-r" ;
                sp:arg3 spin:_arg2 ;
                sp:arg4 "-c" ;
                sp:arg5 spin:_arg3 ;
              ] ;
            sp:variable [
                sp:varName "cellURI"^^xsd:string ;
              ] ;
          ]
          [
            rdf:type sp:Bind ;
            sp:expression [
                rdf:type sp:iri ;
                sp:arg1 [
                    sp:varName "cellURI"^^xsd:string ;
                  ] ;
              ] ;
            sp:variable [
                sp:varName "cell"^^xsd:string ;
              ] ;
          ]
          [
            rdf:type sp:Bind ;
            sp:expression [
                rdf:type spl:object ;
                sp:arg1 [
                    sp:varName "cell"^^xsd:string ;
                  ] ;
                sp:arg2 spra:value ;
              ] ;
            sp:variable [
                sp:varName "value"^^xsd:string ;
              ] ;
          ]
        ) ;
    ] ;
  spin:private "true"^^xsd:boolean ;
  rdfs:label "cell function"^^xsd:string ;
  rdfs:subClassOf spr:CellFunctions ;
.
spra:colCount
  rdf:type rdf:Property ;
  rdfs:domain spra:Table ;
  rdfs:label "col count"^^xsd:string ;
  rdfs:range xsd:integer ;
  rdfs:subPropertyOf spra:systemProperty ;
.
spra:colCountFunction
  rdf:type spin:Function ;
  spin:body [
      rdf:type sp:Select ;
      sp:resultVariables (
          [
            sp:varName "colCount"^^xsd:string ;
          ]
        ) ;
      sp:where (
          [
            sp:object [
                sp:varName "colCount"^^xsd:string ;
              ] ;
            sp:predicate spra:colCount ;
            sp:subject spin:_arg1 ;
          ]
        ) ;
    ] ;
  spin:private "true"^^xsd:boolean ;
  rdfs:label "col count function"^^xsd:string ;
  rdfs:subClassOf spr:ColCountFunctions ;
.
spra:colNameFunction
  rdf:type spin:Function ;
  spin:body [
      rdf:type sp:Select ;
      sp:resultVariables (
          [
            sp:varName "colName"^^xsd:string ;
          ]
        ) ;
      sp:where (
          [
            rdf:type sp:Bind ;
            sp:expression [
                rdf:type sp:concat ;
                sp:arg1 "http://spinrdf.org/spra#colName" ;
                sp:arg2 spin:_arg2 ;
              ] ;
            sp:variable [
                sp:varName "propertyURI"^^xsd:string ;
              ] ;
          ]
          [
            rdf:type sp:Bind ;
            sp:expression [
                rdf:type sp:iri ;
                sp:arg1 [
                    sp:varName "propertyURI"^^xsd:string ;
                  ] ;
              ] ;
            sp:variable [
                sp:varName "property"^^xsd:string ;
              ] ;
          ]
          [
            rdf:type sp:Bind ;
            sp:expression [
                rdf:type spl:object ;
                sp:arg1 spin:_arg1 ;
                sp:arg2 [
                    sp:varName "property"^^xsd:string ;
                  ] ;
              ] ;
            sp:variable [
                sp:varName "colName"^^xsd:string ;
              ] ;
          ]
        ) ;
    ] ;
  spin:private "true"^^xsd:boolean ;
  rdfs:label "col name function"^^xsd:string ;
  rdfs:subClassOf spr:ColNameFunctions ;
.
spra:rowCount
  rdf:type rdf:Property ;
  rdfs:domain spra:Table ;
  rdfs:label "row count"^^xsd:string ;
  rdfs:range xsd:integer ;
  rdfs:subPropertyOf spra:systemProperty ;
.
spra:rowCountFunction
  rdf:type spin:Function ;
  spin:body [
      rdf:type sp:Select ;
      sp:resultVariables (
          [
            sp:varName "rowCount"^^xsd:string ;
          ]
        ) ;
      sp:where (
          [
            sp:object [
                sp:varName "rowCount"^^xsd:string ;
              ] ;
            sp:predicate spra:rowCount ;
            sp:subject spin:_arg1 ;
          ]
        ) ;
    ] ;
  spin:private "true"^^xsd:boolean ;
  rdfs:label "row count function"^^xsd:string ;
  rdfs:subClassOf spr:RowCountFunctions ;
.
spra:systemProperty
  rdf:type rdf:Property ;
  rdfs:comment "An \"abstract\" base property that groups together those system properties that the user will hardly ever need to see in property trees. This property may be dropped in future versions of this ontology - right now it's mainly here for convenience."^^xsd:string ;
  rdfs:label "system property"^^xsd:string ;
.
spra:value
  rdf:type rdf:Property ;
  rdfs:label "value"^^xsd:string ;
  rdfs:subPropertyOf spra:systemProperty ;
.




© 2015 - 2024 Weber Informatics LLC | Privacy Policy