Page History
...
More advanced version with open-ended lists, potentially using yaml (but need to get the syntax right
Code Block | language | none
---|
No Format |
# What properties to show in the overview record # Literal properties (i.e. properties whose value is a simple string) literalProperties: propertyUri: http://purl.obolibrary.org/obo/ERO_0000480 # Object properties (i.e. properties whose value is a link to another resource or ontology term) objectProperties: propertyUri: http://purl.obolibrary.org/obo/ERO_0001719 propertyUri: http://purl.obolibrary.org/obo/ERO_0000078 # What properties to show on the left nav # What properties to filter on # => TBD with Richard |
...
Find all instances of baseType
affiliated with virtualOrganization
, returns a table with a column per query variable defined in property configuration above
Option 1 one query
Code Blocknoformat | ||
---|---|---|
| ||
PREFIX ei: <http://purl.obolibrary.org/obo/> PREFIX eiapp: <http://eagle-i.org/ont/app/1.0/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?resourceUri ?resourceLabel ?resourceDescription ?lp1Label ?lp1Value ?op1Label ?op1ValueLabel ?op1ValueUri ?op2Label ?op2ValueLabel ?op2ValueUri WHERE { ?resourceUri a <${baseType}> . ?resourceUri ei:ERO_0000070 <${virtualOrganization}> . ?resourceUri rdfs:label ?resourceLabel . OPTIONAL { ?resourceUri eiapp:resource_description ?resourceDescription . ?resourceUri <${lp1}> ?lp1Value . <${lp1}> eiapp:preferredLabel ?lp1Label . ?resourceUri <${op1}> ?op1ValueUri . ?op1ValueUri rdfs:label ?op1ValueLabel . <${op1}> eiapp:preferredLabel ?op1Label . ?resourceUri <${op2}> ?op2ValueUri . ?op2ValueUri rdfs:label ?op2ValueLabel . <${op2}> eiapp:preferredLabel ?op2Label . } } |
...
Query 1 => to be executed only once (labels don't change)
Code Block | language | none
---|
No Format |
PREFIX eiapp: <http://eagle-i.org/ont/app/1.0/> SELECT ?lp1Label ?op1Label ?op2Label WHERE { OPTIONAL { <${lp1}> eiapp:preferredLabel ?lp1Label . <${op1}> eiapp:preferredLabel ?op1Label . <${op2}> eiapp:preferredLabel ?op2Label . } } |
Query 2
Code Block | |
---|---|
No Format | |
none | PREFIX ei: <http://purl.obolibrary.org/obo/> PREFIX eiapp: <http://eagle-i.org/ont/app/1.0/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?resourceUri ?resourceLabel ?resourceDescription ?lp1Value ?op1ValueLabel ?op1ValueUri ?op2ValueLabel ?op2ValueUri WHERE { ?resourceUri a <${baseType}> . ?resourceUri ei:ERO_0000070 <${virtualOrganization}> . ?resourceUri rdfs:label ?resourceLabel . OPTIONAL { ?resourceUri eiapp:resource_description ?resourceDescription . ?resourceUri <${lp1}> ?lp1Value . ?resourceUri <${op1}> ?op1ValueUri . ?op1ValueUri rdfs:label ?op1ValueLabel . ?resourceUri <${op2}> ?op2ValueUri . ?op2ValueUri rdfs:label ?op2ValueLabel . } } |
Example with substituted values (option 1)
Code Block | language | none
---|
No Format |
PREFIX ei: <http://purl.obolibrary.org/obo/> PREFIX eiapp: <http://eagle-i.org/ont/app/1.0/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?resourceUri ?resourceLabel ?resourceDescription ?lp1Label ?lp1Value ?op1Label ?op1ValueLabel ?op1ValueUri ?op2Label ?op2ValueLabel ?op2ValueUri WHERE { ?resourceUri a <http://purl.obolibrary.org/obo/ERO_0000071> . ?resourceUri rdfs:label ?resourceLabel . OPTIONAL { ?resourceUri eiapp:resource_description ?resourceDescription . ?resourceUri <http://purl.obolibrary.org/obo/ERO_0000480> ?lp1Value . <http://purl.obolibrary.org/obo/ERO_0000480> eiapp:preferredLabel ?lp1Label . ?resourceUri <http://purl.obolibrary.org/obo/ERO_0001719> ?op1ValueUri . ?op1ValueUri rdfs:label ?op1ValueLabel . <http://purl.obolibrary.org/obo/ERO_0001719> eiapp:preferredLabel ?op1Label . ?resourceUri <http://purl.obolibrary.org/obo/ERO_0000078> ?op2ValueUri . ?op2ValueUri rdfs:label ?op2ValueLabel . <http://purl.obolibrary.org/obo/ERO_0000078> eiapp:preferredLabel ?op2Label . } } |
Overview
Content Tools