class RoadForest::Augment::Process

Attributes

base_graph[RW]
subjects[RW]

Public Class Methods

new(base_graph) click to toggle source
# File lib/roadforest/augment/augmentation.rb, line 79
def initialize(base_graph)
  @base_graph = base_graph
end

Public Instance Methods

object_resources(router) click to toggle source
# File lib/roadforest/augment/augmentation.rb, line 108
def object_resources(router)
  objects.map do |uri|
    LazyResource.new(uri, router)
  end
end
objects() click to toggle source
# File lib/roadforest/augment/augmentation.rb, line 98
def objects
  @objects ||= base_graph.objects.select{|obj| ::RDF::URI === obj}
end
subject_resources(router) click to toggle source
# File lib/roadforest/augment/augmentation.rb, line 102
def subject_resources(router)
  subjects.map do |uri|
    LazyResource.new(uri, router)
  end
end
target_graph() click to toggle source
# File lib/roadforest/augment/augmentation.rb, line 83
def target_graph
  @target_graph ||=
    begin
      ::RDF::Repository.new.tap do |graph|
        base_graph.each_statement do |stmt|
          graph << stmt
        end
      end
    end
end