app/models/trait_bank/old.rb
# NOTE: this used to have a UNION, but I discovered there was exactly ONE
# trait in all of TB that actually matched it (and I guess it was old, ID
# was 1), so I removed it.
this used to have a UNION, but I discovered there was exactly ONE
trait in all of TB that actually matched it (and I guess it was old, ID
was 1), so I removed it.
this used to have a UNION but I discovered there was exactly ONE trait in all of TB that actually matched it ( and I guess it was old ID was 1 ) so I removed it .
def measurements_query(options = {})
      query_with_options("SELECT DISTINCT *
        # measurements_query
        WHERE {
          GRAPH _RES_GRAPH_ {
            ?trait dwc:measurementType ?predicate .
            ?trait dwc:measurementValue ?value .
            OPTIONAL { ?trait dwc:measurementUnit ?units } .
            OPTIONAL { ?trait eolterms:statisticalMethod ?statistical_method } .
          } .
          {
            ?trait dwc:occurrenceID ?occurrence .
            ?occurrence dwc:taxonID ?taxon .
            ?trait eol:measurementOfTaxon eolterms:true .
            GRAPH _MAP_GRAPH_ {
              ?taxon dwc:taxonConceptID _PAGE_
            }
            OPTIONAL { ?occurrence dwc:lifeStage ?life_stage } .
            OPTIONAL { ?occurrence dwc:sex ?sex }
          }
        }", options)
    end
def measurements_query ( options = { } ) query_with_options ( "SELECT DISTINCT *
        # measurements_query
        WHERE {
          GRAPH _RES_GRAPH_ {
            ?trait dwc:measurementType ?predicate .
            ?trait dwc:measurementValue ?value .
            OPTIONAL { ?trait dwc:measurementUnit ?units } .
            OPTIONAL { ?trait eolterms:statisticalMethod ?statistical_method } .
          } .
          {
            ?trait dwc:occurrenceID ?occurrence .
            ?occurrence dwc:taxonID ?taxon .
            ?trait eol:measurementOfTaxon eolterms:true .
            GRAPH _MAP_GRAPH_ {
              ?taxon dwc:taxonConceptID _PAGE_
            }
            OPTIONAL { ?occurrence dwc:lifeStage ?life_stage } .
            OPTIONAL { ?occurrence dwc:sex ?sex }
          }
        }" , options ) end
NOTE: this used to have a UNION, but I discovered there was exactly ONE
trait in all of TB that actually matched it (and I guess it was old, ID
was 1), so I removed it.
NOTE : this used to have a UNION but I discovered there was exactly ONE trait in all of TB that actually matched it ( and I guess it was old ID was 1 ) so I removed it .
options
<not_specific>