Sha256: f35a21b12b3d2f8db9c6f999a1a6448bb321ede59c511f26d62f87be7d3c138f

Contents?: true

Size: 673 Bytes

Versions: 4

Compression:

Stored size: 673 Bytes

Contents

hierarchy2rdf = lambda do |hash|
  hash.each do |concept, rels|
    document << concept.build_rdf_subject do |sbj|
      sbj.Skos::topConceptOf IqRdf.build_uri(Iqvoc::Concept.root_class.instance.origin) if concept.top_term?

      concept.pref_labelings.each do |labeling|
        labeling.build_rdf(document, sbj)
      end

      rels.each do |relation, _|
        @relation_class.new(:owner => concept, :target => relation). # XXX: hacky!?
            build_rdf(document, sbj)
      end

      hierarchy2rdf.call(rels)
    end
  end
end

Iqvoc.default_rdf_namespace_helper_methods.each do |meth|
  document.namespaces(self.send(meth))
end

hierarchy2rdf.call(@concepts)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
iqvoc-4.1.3 app/views/hierarchy/show.iqrdf
iqvoc-4.1.2 app/views/hierarchy/show.iqrdf
iqvoc-4.1.1 app/views/hierarchy/show.iqrdf
iqvoc-4.1.0 app/views/hierarchy/show.iqrdf