Changes between Version 15 and Version 16 of RdsWipSampleQueries

Show
Ignore:
Timestamp:
12/22/08 14:24:17 (15 years ago)
Author:
jowik (IP: 193.212.132.34)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RdsWipSampleQueries

    v15 v16  
    2626== Using the PCA RDL endpoint == 
    2727 
    28 '''To execute the following scripts, go to the [http://rdswip.posccaesar.org/pcardl?info=&search=&sparql=1  PCA RDL SPARQL query page]. 
     28'''To execute the following scripts, go to the [http://rdl.rdlfacade.org/data?info=&search=&sparql=1  PCA RDL SPARQL query page]. 
    2929 
    3030These scripts are currently demonstrated against the PCA RDL endpoint, which represents ISO 15926 definitions in a form closely related to the evolving RDS/WIP form - they give some idea of the possibilities when using SPARQL with ISO 15926. 
     
    3434==== 1. Get me all the subclasses of PUMP, in a table ==== 
    3535 
    36 If you wish to see what this returns right away, just [http://rdswip.posccaesar.org/pcardl?query=PREFIX+owl%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23%3E%0D%0APREFIX+rdf%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0D%0APREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+xsd%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0D%0APREFIX+rdl%3A+%3Chttp%3A%2F%2Frds.posccaesar.org%2F2008%2F06%2FOWL%2FRDL%23%3E%0D%0APREFIX+part2%3A+%3Chttp%3A%2F%2Frds.posccaesar.org%2F2008%2F02%2FOWL%2FISO-15926-2_2003%23%3E%0D%0APREFIX+base%3A+%3Chttp%3A%2F%2Frds.posccaesar.org%2F2008%2F06%2FOWL%2FRDL%3E%0D%0APREFIX+dc%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E%0D%0APREFIX+rdswip%3A+%3Chttp%3A%2F%2Frdswip.posccaesar.org%2Fpcardl%23%3E%0D%0ASELECT+%0D%0A++%3FsubclassIdPCA+%3FsubclassDesignation+%0D%0A++%3FsuperclassIdPCA+%3FsuperclassDesignation%0D%0AWHERE+%0D%0A{%0D%0A++%3Fspecialization+part2%3AhasSuperclass+%3Fsuperclass+.%0D%0A++%3Fspecialization+part2%3AhasSubclass+%3Fsubclass+.%0D%0A++%3Fsubclass+rdswip%3AhasIdPCA+%3FsubclassIdPCA+.%0D%0A++%3Fsubclass+rdswip%3AhasDesignation+%3FsubclassDesignation+.%0D%0A++%3Fsuperclass+rdswip%3AhasIdPCA+%3FsuperclassIdPCA+.%0D%0A++%3Fsuperclass+rdswip%3AhasDesignation+%3FsuperclassDesignation+.%0D%0A++%3Fsuperclass+rdswip%3AhasDesignation+%22PUMP%22++%0D%0A}%0D%0ALIMIT+100&stylesheet=http%3A%2F%2Frdswip.posccaesar.org%2Fpresentation%2Fscripts%2Fsimple%2Fsparql-presentation.xsl click here] to submit the query to the RDS/WIP. 
     36If you wish to see what this returns right away, just [http://rdl.rdlfacade.org/data?query=PREFIX+owl%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23%3E%0D%0APREFIX+rdf%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0D%0APREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+xsd%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0D%0APREFIX+dm%3A+%3Chttp%3A%2F%2Fdm.rdlfacade.org%2Fdata%23%3E%0D%0APREFIX+dc%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E%0D%0APREFIX+rdl%3A+%3Chttp%3A%2F%2Frds.posccaesar.org%2F2008%2F06%2FOWL%2FRDL%23%3E%0D%0APREFIX+base%3A+%3Chttp%3A%2F%2Frdl.rdlfacade.org%2Fdata%3E%0D%0ASELECT+%0D%0A++%3FsubclassIdPCA+%3FsubclassDesignation+%0D%0A++%3FsuperclassIdPCA+%3FsuperclassDesignation%0D%0AWHERE+%0D%0A{%0D%0A++%3Fspecialization+dm%3AhasSuperclass+%3Fsuperclass+.%0D%0A++%3Fspecialization+dm%3AhasSubclass+%3Fsubclass+.%0D%0A++%3Fsubclass+rdl%3AhasIdPCA+%3FsubclassIdPCA+.%0D%0A++%3Fsubclass+rdl%3AhasDesignation+%3FsubclassDesignation+.%0D%0A++%3Fsuperclass+rdl%3AhasIdPCA+%3FsuperclassIdPCA+.%0D%0A++%3Fsuperclass+rdl%3AhasDesignation+%3FsuperclassDesignation+.%0D%0A++%3Fsuperclass+rdl%3AhasDesignation+%22PUMP%22++%0D%0A}%0D%0ALIMIT+100%0D%0A%09%09%09%09%09%09&stylesheet=%2Fpresentation%2Fscripts%2Fmain%2Fsparql-presentation.xsl click here] to submit the query to the RDS/WIP. 
    3737 
    3838{{{ 
     
    4141PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 
    4242PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> 
     43PREFIX dm: <http://dm.rdlfacade.org/data#> 
     44PREFIX dc: <http://purl.org/dc/elements/1.1/> 
    4345PREFIX rdl: <http://rds.posccaesar.org/2008/06/OWL/RDL#> 
    44 PREFIX part2: <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#> 
    45 PREFIX base: <http://rds.posccaesar.org/2008/06/OWL/RDL> 
    46 PREFIX dc: <http://purl.org/dc/elements/1.1/> 
    47 PREFIX rdswip: <http://rdswip.posccaesar.org/pcardl#> 
     46PREFIX base: <http://rdl.rdlfacade.org/data> 
    4847SELECT  
    4948  ?subclassIdPCA ?subclassDesignation  
     
    5150WHERE  
    5251{ 
    53   ?specialization part2:hasSuperclass ?superclass . 
    54   ?specialization part2:hasSubclass ?subclass . 
    55   ?subclass rdswip:hasIdPCA ?subclassIdPCA . 
    56   ?subclass rdswip:hasDesignation ?subclassDesignation . 
    57   ?superclass rdswip:hasIdPCA ?superclassIdPCA . 
    58   ?superclass rdswip:hasDesignation ?superclassDesignation . 
    59   ?superclass rdswip:hasDesignation "PUMP"   
     52  ?specialization dm:hasSuperclass ?superclass . 
     53  ?specialization dm:hasSubclass ?subclass . 
     54  ?subclass rdl:hasIdPCA ?subclassIdPCA . 
     55  ?subclass rdl:hasDesignation ?subclassDesignation . 
     56  ?superclass rdl:hasIdPCA ?superclassIdPCA . 
     57  ?superclass rdl:hasDesignation ?superclassDesignation . 
     58  ?superclass rdl:hasDesignation "PUMP"   
    6059} 
    6160LIMIT 100 
     
    6665==== 2. Get me all subclasses of PUMP, in a typical OWL format ==== 
    6766 
    68 The following query serves to extract a (tiny) subset of the Reference Data Library, returning RDF data with `rdfs:label` applied for the names of the reference entitites. To see the output right away, [http://rdswip.posccaesar.org/pcardl?query=PREFIX+owl%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23%3E%0D%0APREFIX+rdf%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0D%0APREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+xsd%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0D%0APREFIX+rdl%3A+%3Chttp%3A%2F%2Frds.posccaesar.org%2F2008%2F06%2FOWL%2FRDL%23%3E%0D%0APREFIX+part2%3A+%3Chttp%3A%2F%2Frds.posccaesar.org%2F2008%2F02%2FOWL%2FISO-15926-2_2003%23%3E%0D%0APREFIX+base%3A+%3Chttp%3A%2F%2Frds.posccaesar.org%2F2008%2F06%2FOWL%2FRDL%3E%0D%0APREFIX+dc%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E%0D%0APREFIX+rdswip%3A+%3Chttp%3A%2F%2Frdswip.posccaesar.org%2Fpcardl%23%3E%0D%0ACONSTRUCT%0D%0A{%0D%0A++rdl%3ARDL_Fragment_Test+a+owl%3AOntology+.%0D%0A++%3Fsubclass+a+owl%3AClass+.%0D%0A++%3Fsuperclass+a+owl%3AClass+.%0D%0A++%3Fsubclass+rdfs%3AsubClassOf+%3Fsuperclass+.%0D%0A++%3Fsubclass+rdfs%3Alabel+%3FsubclassDesignation+.%0D%0A++%3Fsuperclass+rdfs%3Alabel+%3FsuperclassDesignation+.%0D%0A}%0D%0AWHERE+%0D%0A{%0D%0A++%3Fspecialization+part2%3AhasSuperclass+%3Fsuperclass+.%0D%0A++%3Fspecialization+part2%3AhasSubclass+%3Fsubclass+.%0D%0A++%3Fsubclass+rdswip%3AhasIdPCA+%3FsubclassIdPCA+.%0D%0A++%3Fsubclass+rdswip%3AhasDesignation+%3FsubclassDesignation+.%0D%0A++%3Fsuperclass+rdswip%3AhasIdPCA+%3FsuperclassIdPCA+.%0D%0A++%3Fsuperclass+rdswip%3AhasDesignation+%3FsuperclassDesignation+.%0D%0A++%3Fsuperclass+rdswip%3AhasDesignation+%22PUMP%22++%0D%0A}%0D%0Alimit+100&stylesheet=http%3A%2F%2Frdswip.posccaesar.org%2Fpresentation%2Fscripts%2Fsimple%2Fsparql-presentation.xsl click here]. If you save the resulting page from your browser to a file, say `pumps.owl`, you can load it in an OWL application, such as the on-line [http://pellet.owldl.com/owlsight/ OwlSight] or the [http://protege.stanford.edu/ Protégé] editor. 
     67The following query serves to extract a (tiny) subset of the Reference Data Library, returning RDF data with `rdfs:label` applied for the names of the reference entitites. To see the output right away, [http://rdl.rdlfacade.org/data?query=PREFIX+owl%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23%3E%0D%0APREFIX+rdf%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0D%0APREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0D%0APREFIX+xsd%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E%0D%0APREFIX+rdl%3A+%3Chttp%3A%2F%2Frds.posccaesar.org%2F2008%2F06%2FOWL%2FRDL%23%3E%0D%0APREFIX+part2%3A+%3Chttp%3A%2F%2Frds.posccaesar.org%2F2008%2F02%2FOWL%2FISO-15926-2_2003%23%3E%0D%0APREFIX+base%3A+%3Chttp%3A%2F%2Frds.posccaesar.org%2F2008%2F06%2FOWL%2FRDL%3E%0D%0APREFIX+dc%3A+%3Chttp%3A%2F%2Fpurl.org%2Fdc%2Felements%2F1.1%2F%3E%0D%0APREFIX+rdswip%3A+%3Chttp%3A%2F%2Frdswip.posccaesar.org%2Fpcardl%23%3E%0D%0ACONSTRUCT%0D%0A{%0D%0A++rdl%3ARDL_Fragment_Test+a+owl%3AOntology+.%0D%0A++%3Fsubclass+a+owl%3AClass+.%0D%0A++%3Fsuperclass+a+owl%3AClass+.%0D%0A++%3Fsubclass+rdfs%3AsubClassOf+%3Fsuperclass+.%0D%0A++%3Fsubclass+rdfs%3Alabel+%3FsubclassDesignation+.%0D%0A++%3Fsuperclass+rdfs%3Alabel+%3FsuperclassDesignation+.%0D%0A}%0D%0AWHERE+%0D%0A{%0D%0A++%3Fspecialization+part2%3AhasSuperclass+%3Fsuperclass+.%0D%0A++%3Fspecialization+part2%3AhasSubclass+%3Fsubclass+.%0D%0A++%3Fsubclass+rdswip%3AhasIdPCA+%3FsubclassIdPCA+.%0D%0A++%3Fsubclass+rdswip%3AhasDesignation+%3FsubclassDesignation+.%0D%0A++%3Fsuperclass+rdswip%3AhasIdPCA+%3FsuperclassIdPCA+.%0D%0A++%3Fsuperclass+rdswip%3AhasDesignation+%3FsuperclassDesignation+.%0D%0A++%3Fsuperclass+rdswip%3AhasDesignation+%22PUMP%22++%0D%0A}%0D%0Alimit+100&stylesheet=http%3A%2F%2Frdswip.posccaesar.org%2Fpresentation%2Fscripts%2Fsimple%2Fsparql-presentation.xsl click here]. If you save the resulting page from your browser to a file, say `pumps.owl`, you can load it in an OWL application, such as the on-line [http://pellet.owldl.com/owlsight/ OwlSight] or the [http://protege.stanford.edu/ Protégé] editor. 
    6968 
    7069{{{ 
     
    7473PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> 
    7574PREFIX rdl: <http://rds.posccaesar.org/2008/06/OWL/RDL#> 
    76 PREFIX part2: <http://rds.posccaesar.org/2008/02/OWL/ISO-15926-2_2003#> 
     75PREFIX dm: <http://dm.rdlfacade.org/data#> 
    7776PREFIX base: <http://rds.posccaesar.org/2008/06/OWL/RDL> 
    7877PREFIX dc: <http://purl.org/dc/elements/1.1/> 
    79 PREFIX rdswip: <http://rdswip.posccaesar.org/pcardl#> 
     78PREFIX rdl: <http://rdl.rdlfacade.org/data#> 
    8079CONSTRUCT 
    8180{ 
     
    8988WHERE  
    9089{ 
    91   ?specialization part2:hasSuperclass ?superclass . 
    92   ?specialization part2:hasSubclass ?subclass . 
    93   ?subclass rdswip:hasIdPCA ?subclassIdPCA . 
    94   ?subclass rdswip:hasDesignation ?subclassDesignation . 
    95   ?superclass rdswip:hasIdPCA ?superclassIdPCA . 
    96   ?superclass rdswip:hasDesignation ?superclassDesignation . 
    97   ?superclass rdswip:hasDesignation "PUMP"   
     90  ?specialization dm:hasSuperclass ?superclass . 
     91  ?specialization dm:hasSubclass ?subclass . 
     92  ?subclass rdl:hasIdPCA ?subclassIdPCA . 
     93  ?subclass rdl:hasDesignation ?subclassDesignation . 
     94  ?superclass rdl:hasIdPCA ?superclassIdPCA . 
     95  ?superclass rdl:hasDesignation ?superclassDesignation . 
     96  ?superclass rdl:hasDesignation "PUMP"   
    9897} 
    9998limit 100 
Home
About PCA
Reference Data Services
Projects
Workgroups