app/models/trait_bank/old.rb
# TODO: http://eol.org/known_uris should probably be a function somewhere.
eol.org/known_uris should probably be a function somewhere.
eol . org / known_uris should probably be a function somewhere .
def associations_query(options = {})
      query_with_options("SELECT DISTINCT *
        # associations_query
        WHERE {
          GRAPH _MAP_GRAPH_ {
            ?taxon dwc:taxonConceptID _PAGE_ .
            ?value dwc:taxonConceptID ?target_page
          } .
          GRAPH _RES_GRAPH_ {
            ?occurrence dwc:taxonID ?taxon .
            ?target_occurrence dwc:taxonID ?value .
            {
              ?trait dwc:occurrenceID ?occurrence .
              ?trait eol:targetOccurrenceID ?target_occurrence .
              ?trait eol:associationType ?predicate
            }
            UNION
            {
              ?trait dwc:occurrenceID ?target_occurrence .
              ?trait eol:targetOccurrenceID ?occurrence .
              ?trait eol:associationType ?inverse
            }
          } .
          OPTIONAL {
            GRAPH <http://eol.org/known_uris> {
              ?inverse owl:inverseOf ?predicate
            }
          }
        }", options)
    end
def associations_query ( options = { } ) query_with_options ( "SELECT DISTINCT *
        # associations_query
        WHERE {
          GRAPH _MAP_GRAPH_ {
            ?taxon dwc:taxonConceptID _PAGE_ .
            ?value dwc:taxonConceptID ?target_page
          } .
          GRAPH _RES_GRAPH_ {
            ?occurrence dwc:taxonID ?taxon .
            ?target_occurrence dwc:taxonID ?value .
            {
              ?trait dwc:occurrenceID ?occurrence .
              ?trait eol:targetOccurrenceID ?target_occurrence .
              ?trait eol:associationType ?predicate
            }
            UNION
            {
              ?trait dwc:occurrenceID ?target_occurrence .
              ?trait eol:targetOccurrenceID ?occurrence .
              ?trait eol:associationType ?inverse
            }
          } .
          OPTIONAL {
            GRAPH <http://eol.org/known_uris> {
              ?inverse owl:inverseOf ?predicate
            }
          }
        }" , options ) end
TODO: http://eol.org/known_uris should probably be a function somewhere.
TODO : http : // eol . org / known_uris should probably be a function somewhere .
options
<not_specific>