class RoadForest::Augment::Affordance::PayloadAugmentation
Public Instance Methods
affordance_type()
click to toggle source
# File lib/roadforest/augment/affordance.rb, line 86 def affordance_type end
applicable?(resource)
click to toggle source
# File lib/roadforest/augment/affordance.rb, line 82 def applicable?(resource) end
apply(term) { |node, type, affordance_type| ... }
click to toggle source
# File lib/roadforest/augment/affordance.rb, line 94 def apply(term) resource = term.resource if applicable?(resource) node = ::RDF::Node.new yield [node, ::RDF.type, affordance_type] yield [node, Af.target, term.uri] each_grant_token(http_method, term) do |token| yield [node, Af.authorizedBy, token] end payload = get_payload(resource) unless payload.nil? yield [node, Af.payload, payload.root] unless payload.graph.nil? payload.graph.each_statement do |stmt| yield stmt end end end end end
get_payload(resource)
click to toggle source
# File lib/roadforest/augment/affordance.rb, line 78 def get_payload(resource) end