All queries can be performed as user "anonymous" without being logged in.
Sample SeRQL queries
Select
Returns tables of values
select C
from {C} rdf:type {rdfs:Class}
- Select all distinct VOEvent packets with role "observation":
SELECT DISTINCT *
FROM {C} voeo:role {"observation"}
USING NAMESPACE
voeo =
<http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>
- Select all distict VOEvent packets with date "2007-01-10T08:17:35"
SELECT DISTINCT *
FROM {C}
voeo:Date {"2007-01-10T08:17:35"}
USING NAMESPACE
voeo =
<http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>
- Select top level elements (hasWho, hasWhereWhen, hasWhat, hasWhy, ivorn, role, Description, from VOEvent packet
select *
http://www.estar.org.uk/voevent/eSTAR/uk.org.estar/pl.edu.ogle/OGLE-2006-BLG-580.xml p {Y}
- Select top level elements (hascharacterisatizationAxis) from characterisation file
select *
from {<http://msslxx.mssl.ucl.ac.uk:8080/voevent/xml/CharData/2MASS_K_990705S_KI0830209>} p {Y}
- Get 3 x owlConcept (but not string value of Concept) where role = observation
select voeo:Concept
from {X} voeo:role {"observation"}
using namespace
voeo =
<http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>
- return 3 voevent nodes that are instances of voeo:Why
select Why
from {Why} rdf:type {voeo:Why}
using namespace
voeo = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>
- select most specific class (it's Resource) that this char file belongs to:
select X
from {<http://msslxx.mssl.ucl.ac.uk:8080/voevent/xml/CharData/2MASS_K_990705S_KI0830209>} serql:directType {X}
using namespace
voeo = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>
- Get contactName, contactEmail (string values!) from Author:
select contactName, contactEmail
from {Author} rdf:type {voeo:Author};
voeo:contactName {contactName};
voeo:contactEmail {contactEmail}
using namespace
voeo = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>
- Get name and concept from inference
select Name, Concept
from {Inference} rdf:type {voeo:Inference};
voeo:Name {Name};
voeo:Concept {Concept}
using namespace
voeo = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>
- Select ivorn from all resources with role "observation" select ivorn
from {X} voeo:role {"observation"};
voeo:ivorn {ivorn}
using namespace
voeo = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>
select ISOTime
from {TimeInstant} rdf:type {stco:TimeInstant};
stco:ISOTime {ISOTime}
using namespace
voeo = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>,
stco = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/StcOntology?rev=3;filename=STC1.3.owl>
- select ivorn and ISOTime from a VOEvent
select ivorn, ISOTime
from {X} voeo:role {"observation"};
voeo:ivorn {ivorn};
voeo:hasWhereWhen {WhereWhen} voeo:hasObsDataLocation {ObsDataLocation} stco:hasObservationLocation {ObservationLocation} stco:hasAstroCoords {AstroCoords} stco:hasTime {Time} stco:hasTimeInstant {TimeInstant} stco:ISOTime {ISOTime}
using namespace
voeo = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>,
stco = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/StcOntology?rev=3;filename=STC1.3.owl>
select ivorn, AuthorIVORN
from {X} voeo:role {"observation"};
voeo:ivorn {ivorn};
voeo:hasWho {Who} voeo:AuthorIVORN {AuthorIVORN}
using namespace
voeo = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>,
stco = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/StcOntology?rev=3;filename=STC1.3.owl>
- select ivorn and Author shortName from a VOEvent
select ivorn, shortName
from {X} voeo:role {"observation"};
voeo:ivorn {ivorn};
voeo:hasWho {Who} voeo:hasAuthor {Author} voeo:shortName {shortName}
using namespace
voeo = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>,
stco = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/StcOntology?rev=3;filename=STC1.3.owl>
- select ivorn and ISOTime for VOEvents after 2006-10-29T13:07:36
select ivorn, ISOTime
from {X} voeo:role {"observation"};
voeo:ivorn {ivorn};
voeo:hasWhereWhen {WhereWhen} voeo:hasObsDataLocation {ObsDataLocation} stco:hasObservationLocation {ObservationLocation} stco:hasAstroCoords {AstroCoords} stco:hasTime {Time} stco:hasTimeInstant {TimeInstant} stco:ISOTime {ISOTime}
where ISOTime > "2006-10-29T13:07:36"
using namespace
voeo = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>,
stco = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/StcOntology?rev=3;filename=STC1.3.owl>
- select ivorn and ISOTime for VOEvents after 2006-10-29T13:07:36 and before 2006-11-02T12:32:03
select ivorn, ISOTime
from {X} voeo:role {"observation"};
voeo:ivorn {ivorn};
voeo:hasWhereWhen {WhereWhen} voeo:hasObsDataLocation {ObsDataLocation} stco:hasObservationLocation {ObservationLocation} stco:hasAstroCoords {AstroCoords} stco:hasTime {Time} stco:hasTimeInstant {TimeInstant} stco:ISOTime {ISOTime}
where ISOTime > "2006-10-29T13:07:36" and
ISOTime < "2006-11-02T12:32:03"
using namespace
voeo = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>,
stco = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/StcOntology?rev=3;filename=STC1.3.owl>
- select RA and Dec from Position 2D for any VOevents and Char data files
select RA, Dec
from {Position2D} rdf:type {stco:Position2D};
stco:hasValue2 {Value2} stco:C1 {RA};
stco:C2 {Dec}
using namespace
voeo = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>,
stco = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/StcOntology?rev=3;filename=STC1.3.owl>
- select RA and Dec from Position 2D where RA > 270.0
select RA, Dec
from {Position2D} rdf:type {stco:Position2D};
stco:hasValue2 {Value2} stco:C1 {RA};
stco:C2 {Dec}
where RA > "270.0"
using namespace
voeo = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>,
stco = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/StcOntology?rev=3;filename=STC1.3.owl>
- select ivorn, ra, dec from voevent
select ivorn, RA, Dec
from {X} voeo:role {"observation"};
voeo:ivorn {ivorn};
voeo:hasWhereWhen {WhereWhen} voeo:hasObsDataLocation {ObsDataLocation} stco:hasObservationLocation {ObservationLocation} stco:hasAstroCoords {AstroCoords} stco:hasPosition2D {Position2D} stco:hasValue2 {Value2} stco:C1 {RA};
stco:C2 {Dec}
using namespace
voeo = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>,
stco = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/StcOntology?rev=3;filename=STC1.3.owl>
- Select RA, Dec, MJDTime (if available from Char files), and ISOTime (if available from VOEvent files) where 270.0 < RA 270.5 && -30.0 < Dec -29.5
select RA, Dec, MJDTime, ISOTime
from {Position2D} rdf:type {stco:Position2D};
stco:hasValue2 {Value2} stco:C1 {RA};
stco:C2 {Dec},
[{X} stco:MJDTime {MJDTime}],
[{Y} stco:ISOTime {ISOTime}]
where RA > "270.0"^^xsd:float and Dec < "-29.0"^^xsd:float and RA < "270.5"^^xsd:float and Dec > "-29.5"^^xsd:float
using namespace
voeo = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>,
stco = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/StcOntology?rev=3;filename=STC1.3.owl>
- Select characterizationAxis nodes from char files:
select * from
{characterizationAxis} rdf:type {charo:characterizationAxis}
using namespace
charo = <http://eurovotech.org/twiki/bin/viewfile/VOTech/CharacterisationOntology?rev=1;filename=characterisation1.0.owl>
- select string value of axisName where axisName = "spectral" for each axisFrame in a char file
select axisName
from {axisFrame} rdf:type {charo:axisFrame};
charo:axisName {axisName}
where axisName = "spectral"
using namespace
charo = <http://eurovotech.org/twiki/bin/viewfile/VOTech/CharacterisationOntology?rev=1;filename=characterisation1.0.owl>
- select VOEvent filename, RA, and Dec from VOEvents:
select X, RA, Dec
from {X} voeo:role {"observation"}; voeo:ivorn {ivorn}; voeo:hasWhereWhen {WhereWhen} voeo:hasObsDataLocation {ObsDataLocation} stco:hasObservationLocation {ObservationLocation} stco:hasAstroCoords {AstroCoords} stco:hasPosition2D {Position2D} stco:hasValue2 {Value2} stco:C1 {RA}; stco:C2 {Dec}
using namespace voeo = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>, stco = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/StcOntology?rev=3;filename=STC1.3.owl>,
charo = <http://eurovotech.org/twiki/bin/viewfile/VOTech/CharacterisationOntology?rev=1;filename=characterisation1.0.owl>
OR
select X, RA, Dec
from {X} voeo:hasWhy {Why}; voeo:ivorn {ivorn}; voeo:hasWhereWhen {WhereWhen} voeo:hasObsDataLocation {ObsDataLocation} stco:hasObservationLocation {ObservationLocation} stco:hasAstroCoords {AstroCoords} stco:hasPosition2D {Position2D} stco:hasValue2 {Value2} stco:C1 {RA}; stco:C2 {Dec}
using namespace voeo = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>, stco = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/StcOntology?rev=3;filename=STC1.3.owl>,
charo = <http://eurovotech.org/twiki/bin/viewfile/VOTech/CharacterisationOntology?rev=1;filename=characterisation1.0.owl>
- Select filename of all distinct VOEvents and characterization files
select distinct X
from {X} charo:hascharacterizationAxis {characterizationAxis}
union
select distinct X
from {X} voeo:role {"observation"}
using namespace voeo = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>, stco = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/StcOntology?rev=3;filename=STC1.3.owl>,
charo = <http://eurovotech.org/twiki/bin/viewfile/VOTech/CharacterisationOntology?rev=1;filename=characterisation1.0.owl>
- select filename of char file plus filename, ra, dec of voevent files
select distinct X
from {X} charo:hascharacterizationAxis {characterizationAxis}
union
select X, RA, Dec
from {X} voeo:hasWhereWhen {WhereWhen} voeo:hasObsDataLocation {ObsDataLocation} stco:hasObservationLocation {ObservationLocation} stco:hasAstroCoords {AstroCoords} stco:hasPosition2D {Position2D} stco:hasValue2 {Value2} stco:C1 {RA}; stco:C2 {Dec} using namespace voeo = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>, stco = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/StcOntology?rev=3;filename=STC1.3.owl>, charo = <http://eurovotech.org/twiki/bin/viewfile/VOTech/CharacterisationOntology?rev=1;filename=characterisation1.0.owl>
- select filename, RA, and Dec from both VOEvents and Char files
select distinct X, RA, Dec
from {X} charo:hascharacterizationAxis {characterizationAxis} charo:hascoverage {coverage} charo:haslocation {location} charo:hascoord {coord} stco:hasPosition2D {Position2D} stco:hasValue2 {Value2} stco:C1 {RA};
stco:C2 {Dec}
union
select X, RA, Dec
from {X} voeo:hasWhereWhen {WhereWhen} voeo:hasObsDataLocation {ObsDataLocation} stco:hasObservationLocation {ObservationLocation} stco:hasAstroCoords {AstroCoords} stco:hasPosition2D {Position2D} stco:hasValue2 {Value2} stco:C1 {RA}; stco:C2 {Dec} using namespace voeo = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>, stco = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/StcOntology?rev=3;filename=STC1.3.owl>, charo = <http://eurovotech.org/twiki/bin/viewfile/VOTech/CharacterisationOntology?rev=1;filename=characterisation1.0.owl>
- Best query so far select filename, RA, and Dec from char files and voevents where RA and Dec fall into a defined box (best with VOTech2):
select distinct X, RA, Dec
from {X} charo:hascharacterizationAxis {characterizationAxis} charo:hascoverage {coverage} charo:haslocation {location} charo:hascoord {coord} stco:hasPosition2D {Position2D} stco:hasValue2 {Value2} stco:C1 {RA};
stco:C2 {Dec}
where RA > "270.0"^^xsd:float and Dec < "-29.0"^^xsd:float and RA < "270.5"^^xsd:float and Dec > "-29.5"^^xsd:float
union
select X, RA, Dec
from {X} voeo:hasWhereWhen {WhereWhen} voeo:hasObsDataLocation {ObsDataLocation} stco:hasObservationLocation {ObservationLocation} stco:hasAstroCoords {AstroCoords} stco:hasPosition2D {Position2D} stco:hasValue2 {Value2} stco:C1 {RA}; stco:C2 {Dec}
where RA > "270.0"^^xsd:float and Dec < "-29.0"^^xsd:float and RA < "270.5"^^xsd:float and Dec > "-29.5"^^xsd:float
using namespace voeo = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>, stco = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/StcOntology?rev=3;filename=STC1.3.owl>, charo = <http://eurovotech.org/twiki/bin/viewfile/VOTech/CharacterisationOntology?rev=1;filename=characterisation1.0.owl>
- select filename, RA, and Dec from char files (using "coverage bounds" rather than "coverage location" as above) and voevents where RA and Dec fall into a defined box (best with VOTech2):
select distinct URL, RA, Dec
from {URL} charo:hascharacterizationAxis {characterizationAxis} charo:hascoverage {coverage} charo:hasbounds {bounds} charo:haslimits {limits} stco:hasLoLimit2Vec {LoLimit2Vec} stco:C1 {RA};
stco:C2 {Dec}
where RA > "270.0"^^xsd:float and Dec < "-29.0"^^xsd:float and RA < "270.5"^^xsd:float and Dec > "-29.5"^^xsd:float
union
select URL, RA, Dec
from {URL} voeo:hasWhereWhen {WhereWhen} voeo:hasObsDataLocation {ObsDataLocation} stco:hasObservationLocation {ObservationLocation} stco:hasAstroCoords {AstroCoords} stco:hasPosition2D {Position2D} stco:hasValue2 {Value2} stco:C1 {RA}; stco:C2 {Dec}
where RA > "270.0"^^xsd:float and Dec < "-29.0"^^xsd:float and RA < "270.5"^^xsd:float and Dec > "-29.5"^^xsd:float
using namespace voeo = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/VoEventOntology?rev=1;filename=VOEvent1.1.owl>, stco = <http://wiki.eurovotech.org/twiki/bin/viewfile/VOTech/StcOntology?rev=3;filename=STC1.3.owl>, charo = <http://eurovotech.org/twiki/bin/viewfile/VOTech/CharacterisationOntology?rev=1;filename=characterisation1.0.owl>
SELECT Queries to be filled in
- Select VOEvents based on param values - greater than, less than, equal to
should be able to do
select ivorn, charfilename, ra dec
from voevent
[ivorn, ra, dec],
from char
[charfilename, ra,dec]
Construct
Returns RDF graph
- Construct RDF graph of parent / child relationships
CONSTRUCT {Parent} ex:hasChild {Child}
FROM {Child} ex:hasParent {Parent}
USING NAMESPACE
ex = <http://example.org/things#>
Characterization SeRQL queries
List queries to try combining Characterization ontology and associated observations with VOEvent and STC ontologies and associated VOEvent packets.
Namespaces
Cut and paste at will:
--
ElizabethAuden - 22 Feb 2007