Class: PublishMyData::ExampleResource

Inherits:
Object
  • Object
show all
Includes:
BasicFeatures, Tripod::Resource
Defined in:
app/models/publish_my_data/example_resource.rb

Instance Method Summary collapse

Methods included from BasicFeatures

#in_domain?

Instance Method Details

#as_ttlObject



13
14
15
16
17
18
19
# File 'app/models/publish_my_data/example_resource.rb', line 13

def as_ttl
  graph = RDF::Graph.new
  repository.query( [@uri, :predicate, :object] ) do |statement|
    graph << statement
  end
  graph.dump(:ttl)
end

#eager_load!Object



8
9
10
11
# File 'app/models/publish_my_data/example_resource.rb', line 8

def eager_load!
  eager_load_predicate_triples!(labels_only: true)
  eager_load_object_triples!(labels_only: true)
end