Relationship Queries - NASA-PDS/product_relationships GitHub Wiki

1. Find the collection for a particular product using the product LIDVID

Query

PREFIX kag: <urn:nasa:pds:kaguya_grs_spectra:>

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
kag:data_spectra::1.0 "Kaguya Gamma-Ray Spectrometer Corrected Spectra Collection"

2. 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"

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

Query

PREFIX kag: <urn:nasa:pds:kaguya_grs_spectra:>

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
kag:data_spectra:kgrs_calibrated_spectra_per1::1.0 "Kaguya Gamma-Ray Spectrometer Corrected Spectra" "product_observational"
kag:data_spectra:kgrs_calibrated_spectra_per2::1.0 "Kaguya Gamma-Ray Spectrometer Corrected Spectra" "product_observational"
kag:data_spectra:kgrs_calibrated_spectra_per3::1.0 "Kaguya Gamma-Ray Spectrometer Corrected Spectra" "product_observational"

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

Query

PREFIX kag: <urn:nasa:pds:kaguya_grs_spectra:>

select ?rid ?title ?class
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:lidvid_ref> ?rid.
  ?rid <pds:product_class> ?class.
  ?rid <pds:title> ?title.
}

Results

rid title class
kag:data_ephemerides:kgrs_ephemerides::1.0 "Kaguya Gamma-Ray Spectrometer Corrected Spectra" "product_observational"
kag:data_spectra:kgrs_calibrated_spectra_per1::1.0 "Kaguya Gamma-Ray Spectrometer Corrected Spectra" "product_observational"
kag:data_spectra:kgrs_calibrated_spectra_per2::1.0" "Kaguya Gamma-Ray Spectrometer Corrected Spectra" "product_observational"
kag:data_spectra:kgrs_calibrated_spectra_per3::1.0 "Kaguya Gamma-Ray Spectrometer Corrected Spectra" "product_observational"
kag:document:kgrs_calibrated_spectra::1.0 "Kaguya Gamma-Ray Spectrometer (KGRS): Calibrated Spectra Data Processing" "product_document"
kag:document:kgrs_ephemerides_doc::1.0 "Kaguya Gamma-Ray Spectrometer Ephemerides, Pointing and Geometry Data" "product_document"

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

Query

PREFIX kag: <urn:nasa:pds:kaguya_grs_spectra:>

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
kag:context::1.0 "Kaguya Gamma-Ray Spectrometer Context Product Collection" "context"
kag:data_ephemerides::1.0 "Kaguya Gamma-Ray Spectrometer Ephemerides, Pointing and Geometry Collection" "data"
kag:data_spectra::1.0 "Kaguya Gamma-Ray Spectrometer Corrected Spectra Collection" "data"
kag:document::1.0 "Kaguya Gamma-Ray Spectrometer Corrected Spectra Document Collection" "document"

6. 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"

7. Find the products referenced by a product from the product LIDVID

Query

PREFIX kag: <urn:nasa:pds:kaguya_grs_spectra:>

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

Results

rid title class
kag:document:kgrs_calibrated_spectra::1.0 "Kaguya Gamma-Ray Spectrometer (KGRS): Calibrated Spectra Data Processing" "product_document"

8. Find the context products referenced by a product from LIDVID

Query

PREFIX ctx: <urn:nasa:pds:context:>

select ?rid ?title ?class
where {
  <urn:nasa:pds:kaguya_grs_spectra:data_spectra:kgrs_calibrated_spectra_per2::1.0> <pds:lid_ref> ?rlid.
  ?rid <pds:lid> ?rlid.
  ?rid <pds:product_class> "product_context".
  ?rid <pds:title> ?title.
  ?rid <pds:context_class> ?class.
}

Results

rid title class
ctx:instrument:kaguya.grs::1.0 The Gamma Ray Spectrometer (GRS) on the Kaguya spacecraft instrument
ctx:instrument_host:spacecraft.kaguya::1.0 Kaguya Spacecraft instrument_host
ctx:investigation:mission.kaguya::1.0 Kaguya Mission investigation
ctx:target:satellite.earth.moon::1.1 "Moon target
⚠️ **GitHub.com Fallback** ⚠️