Class: RoadForest::TypeHandlers::RDFaWriter::AffordanceDecorator

Inherits:
EnvironmentDecorator show all
Extended by:
AffordanceClient
Includes:
AffordanceClient
Defined in:
lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb

Constant Summary

Constants included from AffordanceClient

AffordanceClient::Af

Instance Attribute Summary

Attributes inherited from EnvironmentDecorator

#_decorated_

Instance Method Summary collapse

Methods included from AffordanceClient

affordance_node?, affordance_present, affordance_type_in_graph?, affordances_in_graph?, all_affordances, has_affordance, parameterized_navigation_affordance_in_graph?, payload_has_param, query_matches

Methods inherited from EnvironmentDecorator

can_decorate?, decorates, #initialize, #like_a?, perhaps_decorate, registry_purpose, #setup

Methods included from Utility::ClassRegistry::Registrar

#all_names, extended, #get, #map_classes, #register, #registry

Constructor Details

This class inherits a constructor from RoadForest::TypeHandlers::RDFaWriter::EnvironmentDecorator

Instance Method Details

#affordance?Boolean

Returns:

  • (Boolean)


185
186
187
# File 'lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb', line 185

def affordance?
  true
end

#graphObject



181
182
183
# File 'lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb', line 181

def graph
  _engine.graph
end

#rdfpost_curie(kind, uri) ⇒ Object



189
190
191
192
193
# File 'lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb', line 189

def rdfpost_curie(kind, uri)
  curie = RDFPostCurie.new(_engine, kind, uri)

  _engine.render(curie)
end

#template_kindsObject



195
196
197
# File 'lib/roadforest/type-handlers/rdfa-writer/environment-decorator.rb', line 195

def template_kinds
  _base_env_.template_kinds.map{|kind| "affordance-" + kind} + _base_env_.template_kinds
end