Advertisement
Guest User

Untitled

a guest
Jul 26th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SPARQL 2.81 KB | None | 0 0
  1. PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
  2. PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
  3. PREFIX dcterms: <http://purl.org/dc/terms/>
  4. PREFIX foaf: <http://xmlns.com/foaf/0.1/>
  5. PREFIX schema: <http://schema.org/>
  6. PREFIX oslc_asset: <http://open-services.net/ns/asset#>
  7. PREFIX nav: <http://cpgu.kbpm.ru/ns/rm/navigation#>
  8. PREFIX rm: <http://cpgu.kbpm.ru/ns/rm/rdf#>
  9. PREFIX rmUserTypes: <http://cpgu.kbpm.ru/ns/rm/user-types#>
  10. PREFIX cpgu: <http://cpgu.kbpm.ru/ns/rm/cpgu#>
  11. PREFIX users: <http://cpgu.kbpm.ru/ns/rm/users#>
  12. PREFIX projects: <http://cpgu.kbpm.ru/ns/rm/projects#>
  13. PREFIX folders: <http://cpgu.kbpm.ru/ns/rm/folders#>
  14. PREFIX reqs: <http://cpgu.kbpm.ru/ns/rm/reqs#>
  15. SELECT DISTINCT ?URI ?identifier ?title ?folder ?description ?creator ?created_on ?modified_on ?modified_by ?type ?format ?status ?difficulty
  16.  
  17. WHERE {
  18.   ?URI a rm:ArtifactType .
  19. ?URI dcterms:identifier ?identifier .
  20.  ?URI dcterms:title ?title .
  21.  ?URI rm:assetFolder ?folder .
  22.  OPTIONAL { ?URI dcterms:description ?description } .
  23.  OPTIONAL { ?URI dcterms:creator ?creator } .
  24.  OPTIONAL { ?URI dcterms:created ?created_on } .
  25.  OPTIONAL { ?URI dcterms:modified ?modified_on } .
  26.  OPTIONAL { ?URI dcterms:modifiedBy ?modified_by } .
  27.  ?URI rdf:type ?type .
  28.  ?URI rm:artifactFormat ?format .
  29.  OPTIONAL { ?URI rm:status ?status } .
  30.  OPTIONAL { ?URI rm:difficulty ?difficulty } .
  31. ?URI rm:assetFolder <http://cpgu.kbpm.ru/ns/rm/folders#folder1_1> .
  32.  ?URI dcterms:title '''Требование 2 из Н10-10'''^^xsd:string .
  33.   FILTER NOT EXISTS {
  34.     ?subtype ^a  ?URI ;
  35.     rdfs:subClassOf ?type .
  36.     FILTER ( ?subtype != ?type )
  37.   }
  38.   # Здесь будут фильтры
  39. }
  40.  
  41. Равенство
  42.  
  43. FILTER ( ?identifier = 30010)
  44.  
  45. Начинается с
  46.  
  47. FILTER ( STRSTARTS(?description, 'Код'))
  48.  
  49. Содержит
  50.  
  51. FILTER ( CONTAINS(?description, 'товарной'))
  52.  
  53. Не содержит
  54.  
  55. FILTER ( !CONTAINS(?description, 'Код'))
  56.  
  57. Заканчивается на
  58.  
  59. FILTER ( STRENDS(?description, 'товара'))
  60.  
  61. Существует
  62.  
  63. FILTER EXISTS { ?URI dcterms:title ?title }
  64.  
  65. Не существует
  66.  
  67. FILTER NOT EXISTS { ?URI dcterms:title ?title }
  68.  
  69. Любой из
  70.  
  71. FILTER ( ?description = 'Код товарной позиции' || ?description = 'Код товарной группы')
  72.  
  73. Между
  74.  
  75. FILTER("2015-01-01T10:12:16.000Z"^^xsd:dateTime <= ?created_on && ?created_on < "2016-01-01T10:12:16.000Z"^^xsd:dateTime)
  76.  
  77. После (включая)
  78.  
  79. FILTER(?created_on >= "2014-02-10T10:12:16.000Z"^^xsd:dateTime)
  80.  
  81. До (включая)
  82.  
  83. FILTER(?created_on <= "2014-02-10T10:12:16.000Z"^^xsd:dateTime)
  84.  
  85. Равенство
  86.  
  87. FILTER(?created_on = "2014-02-10T10:12:16.000Z"^^xsd:dateTime)
  88.  
  89.  
  90. Не равняется
  91.  
  92. FILTER(?created_on != "2014-02-10T10:12:16.000Z"^^xsd:dateTime)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement