Sha256: 66b26cfbfdec7ec4ac847d9a513cf3fee2cfa05a114b9a33ba5a0eab0cc5511e

Contents?: true

Size: 348 Bytes

Versions: 8

Compression:

Stored size: 348 Bytes

Contents

module PublishMyData
  module DefinedByOntology
    extend ActiveSupport::Concern

    included do
      field :defined_by, RDF::RDFS.isDefinedBy, :is_uri => true
    end
    
    def defined_by_ontology
      ontology_uri = read_predicate(RDF::RDFS.isDefinedBy).first
      Ontology.find(ontology_uri) rescue nil if ontology_uri
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
publish_my_data-1.0.4 app/models/concerns/publish_my_data/defined_by_ontology.rb
publish_my_data-1.0.3 app/models/concerns/publish_my_data/defined_by_ontology.rb
publish_my_data-1.0.2 app/models/concerns/publish_my_data/defined_by_ontology.rb
publish_my_data-1.0.1 app/models/concerns/publish_my_data/defined_by_ontology.rb
publish_my_data-1.0.0 app/models/concerns/publish_my_data/defined_by_ontology.rb
publish_my_data-0.0.32 app/models/concerns/publish_my_data/defined_by_ontology.rb
publish_my_data-0.0.31 app/models/concerns/publish_my_data/defined_by_ontology.rb
publish_my_data-0.0.30 app/models/concerns/publish_my_data/defined_by_ontology.rb