Sha256: a508875beeffb2838f90a6da17b210591c3d4d995bdf5760b739d37cf3c46c55

Contents?: true

Size: 517 Bytes

Versions: 6

Compression:

Stored size: 517 Bytes

Contents

module PublishMyData
  class ConceptScheme
    include Tripod::Resource
    include PublishMyData::ResourceModule #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

6 entries across 6 versions & 1 rubygems

Version Path
publish_my_data-0.0.10 app/models/publish_my_data/concept_scheme.rb
publish_my_data-0.0.9 app/models/publish_my_data/concept_scheme.rb
publish_my_data-0.0.8 app/models/publish_my_data/concept_scheme.rb
publish_my_data-0.0.7 app/models/publish_my_data/concept_scheme.rb
publish_my_data-0.0.5 app/models/publish_my_data/concept_scheme.rb
publish_my_data-0.0.4 app/models/publish_my_data/concept_scheme.rb