Method: PublishMyData::DatasetPowers::ClassMethods#deprecation_last_query_str

Defined in:
app/models/concerns/publish_my_data/dataset_powers.rb

#deprecation_last_query_strObject



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# File 'app/models/concerns/publish_my_data/dataset_powers.rb', line 127

def deprecation_last_query_str
  "
  SELECT ?uri where {
    # this bit is all the non-deprecated ones
    {
      SELECT * WHERE {
        ?uri a <http://publishmydata.com/def/dataset#Dataset> .
        ?uri <#{RDF::DC.title}> ?title . # select title so we can order
        MINUS {
          ?uri a <http://publishmydata.com/def/dataset#DeprecatedDataset>
        }
      }
      ORDER BY ?title
    }
    UNION
    # this bit is all the deprecated ones
    {
      SELECT * WHERE {
        ?uri a <http://publishmydata.com/def/dataset#DeprecatedDataset> .
        ?uri <#{RDF::DC.title}> ?title . # select title so we can order
      }
      ORDER BY ?title
    }
  }
  "
end