Skip to content

Relationship Queries

Eugene edited this page Dec 28, 2020 · 6 revisions

Find the collection for a particular product using the product LIDVID

Query

select ?cid ?title
where {
  ?cid <pds:lidvid_ref> <urn:nasa:pds:kaguya_grs_spectra:data_spectra:kgrs_calibrated_spectra_per2::1.0>.
  ?cid <pds:title> ?title.
  ?cid <pds:product_class> "product_collection".
}

Results

cid title
urn:nasa:pds:kaguya_grs_spectra:data_spectra::1.0 "Kaguya Gamma-Ray Spectrometer Corrected Spectra Collection"

Find the bundle for a particular product using the product LIDVID

Query

select ?bid ?title
where {
  ?bid <pds:product_class> "product_bundle".
  ?bid <pds:title> ?title.
  ?bid <pds:lid_ref> ?clid.
  ?cid <pds:lid> ?clid.
  ?cid <pds:product_class> "product_collection".
  ?cid <pds:lidvid_ref> <urn:nasa:pds:kaguya_grs_spectra:data_spectra:kgrs_calibrated_spectra_per2::1.0>.
}

Results

bid title
urn:nasa:pds:kaguya_grs_spectra::1.1 "Kaguya Gamma-Ray Spectrometer Corrected Spectra Bundle"

Find the products that belong to a collection using the collection LIDVID

Query

select ?rid ?title ?class
where {
  <urn:nasa:pds:kaguya_grs_spectra:data_spectra::1.0> <pds:lidvid_ref> ?rid.
  ?rid <pds:title> ?title.
  ?rid <pds:product_class> ?class.
  filter( ?class != "product_context")
}

Results

rid title class
urn:nasa:pds:kaguya_grs_spectra:data_spectra:kgrs_calibrated_spectra_per1::1.0 "Kaguya Gamma-Ray Spectrometer Corrected Spectra" "product_observational"
urn:nasa:pds:kaguya_grs_spectra:data_spectra:kgrs_calibrated_spectra_per2::1.0 "Kaguya Gamma-Ray Spectrometer Corrected Spectra" "product_observational"
urn:nasa:pds:kaguya_grs_spectra:data_spectra:kgrs_calibrated_spectra_per3::1.0 "Kaguya Gamma-Ray Spectrometer Corrected Spectra" "product_observational"

Find the products that belong to a bundle using the bundle LIDVID

Find the collections that belong to a bundle from the bundle LIDVID

Query

select ?cid ?title ?type
where {
  <urn:nasa:pds:kaguya_grs_spectra::1.1> <pds:lid_ref> ?clid.
  ?cid <pds:lid> ?clid.
  ?cid <pds:product_class> "product_collection".
  ?cid <pds:title> ?title.
  ?cid <pds:type> ?type.
}

Results

cid title type
urn:nasa:pds:kaguya_grs_spectra:context::1.0 "Kaguya Gamma-Ray Spectrometer Context Product Collection" "context"
urn:nasa:pds:kaguya_grs_spectra:data_ephemerides::1.0 "Kaguya Gamma-Ray Spectrometer Ephemerides, Pointing and Geometry Collection" "data"
urn:nasa:pds:kaguya_grs_spectra:data_spectra::1.0 "Kaguya Gamma-Ray Spectrometer Corrected Spectra Collection" "data"
urn:nasa:pds:kaguya_grs_spectra:document::1.0 "Kaguya Gamma-Ray Spectrometer Corrected Spectra Document Collection" "document"

Find the bundle for a specific collection from the collection LIDVID

Query

select ?bid ?title
where {
  ?bid <pds:lid_ref> <urn:nasa:pds:kaguya_grs_spectra:data_spectra>.
  ?bid <pds:title> ?title.
  ?bid <pds:product_class> "product_bundle".
}

Results

bid title
urn:nasa:pds:kaguya_grs_spectra::1.1 "Kaguya Gamma-Ray Spectrometer Corrected Spectra Bundle"

Find the products referenced by a product from the product LIDVID

Find the context products referenced by a product (incl bundle and collection) from LIDVID

Clone this wiki locally