Sha256: 689c45a216a4d26f73d00ce13c8bb1de3d298f634642f6dde7d92da639deca67

Contents?: true

Size: 562 Bytes

Versions: 9

Compression:

Stored size: 562 Bytes

Contents

class Label::Relation::SKOSXL::Base < Label::Relation::Base
  self.rdf_namespace = 'skosxl'

  def self.build_from_rdf(subject, predicate, object)
    create(domain: subject, range: object)
  end

  def build_rdf(document, subject)
    pred = self.class == Label::Relation::SKOSXL::Base ? :labelRelation : self.rdf_predicate
    raise "Match::SKOS::Base#build_rdf: Class #{self.class.name} needs to define self.rdf_namespace and self.rdf_predicate." unless pred

    subject.send(self.rdf_namespace.camelcase).send(pred, IqRdf.build_uri(range.origin))
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
iqvoc_skosxl-2.11.4 app/models/label/relation/skosxl/base.rb
iqvoc_skosxl-2.11.3 app/models/label/relation/skosxl/base.rb
iqvoc_skosxl-2.9.1 app/models/label/relation/skosxl/base.rb
iqvoc_skosxl-2.9.0 app/models/label/relation/skosxl/base.rb
iqvoc_skosxl-2.8.1 app/models/label/relation/skosxl/base.rb
iqvoc_skosxl-2.8.0 app/models/label/relation/skosxl/base.rb
iqvoc_skosxl-2.7.0 app/models/label/relation/skosxl/base.rb
iqvoc_skosxl-2.6.0 app/models/label/relation/skosxl/base.rb
iqvoc_skosxl-2.5.0 app/models/label/relation/skosxl/base.rb