Sha256: de196d0072df2035bb56d37d08f589e0d1116f7e91e456a12f78060303dc38f5

Contents?: true

Size: 530 Bytes

Versions: 19

Compression:

Stored size: 530 Bytes

Contents

module PublishMyData
  class ConceptScheme
    include Tripod::Resource
    include PublishMyData::Concerns::Models::Resource  #some common methods for resources.

    rdf_type RDF::SKOS.ConceptScheme
    field :label, RDF::RDFS.label

    def concepts
      Resource.find_by_sparql(
        "SELECT DISTINCT ?uri ?graph
          WHERE {
            GRAPH ?graph {
              ?uri <#{RDF::SKOS.inScheme.to_s}> <#{self.uri}> .
              ?uri a <#{RDF::SKOS.Concept.to_s}> .
          }
        }"
      )
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
publish_my_data-0.0.29 app/models/publish_my_data/concept_scheme.rb
publish_my_data-0.0.28 app/models/publish_my_data/concept_scheme.rb
publish_my_data-0.0.27 app/models/publish_my_data/concept_scheme.rb
publish_my_data-0.0.26 app/models/publish_my_data/concept_scheme.rb
publish_my_data-0.0.25 app/models/publish_my_data/concept_scheme.rb
publish_my_data-0.0.24 app/models/publish_my_data/concept_scheme.rb
publish_my_data-0.0.23 app/models/publish_my_data/concept_scheme.rb
publish_my_data-0.0.22 app/models/publish_my_data/concept_scheme.rb
publish_my_data-0.0.21 app/models/publish_my_data/concept_scheme.rb
publish_my_data-0.0.20 app/models/publish_my_data/concept_scheme.rb
publish_my_data-0.0.19 app/models/publish_my_data/concept_scheme.rb
publish_my_data-0.0.18 app/models/publish_my_data/concept_scheme.rb
publish_my_data-0.0.17 app/models/publish_my_data/concept_scheme.rb
publish_my_data-0.0.16 app/models/publish_my_data/concept_scheme.rb
publish_my_data-0.0.15 app/models/publish_my_data/concept_scheme.rb
publish_my_data-0.0.14 app/models/publish_my_data/concept_scheme.rb
publish_my_data-0.0.13 app/models/publish_my_data/concept_scheme.rb
publish_my_data-0.0.12 app/models/publish_my_data/concept_scheme.rb
publish_my_data-0.0.11 app/models/publish_my_data/concept_scheme.rb