Module: Spread2RDF::Mapping::ResourceCreation

Included in:
Cell, Resource
Defined in:
lib/spread2rdf/mapping/resource_creation.rb

Instance Method Summary collapse

Instance Method Details

#create_resourceObject



5
6
7
8
9
10
11
12
# File 'lib/spread2rdf/mapping/resource_creation.rb', line 5

def create_resource
  case schema.resource_creation_mode
    when :bnode                   then RDF::Node.new
    when :from_column_with_suffix then resource_from_suffix
    when :from_column             then resource_from_full_uri
    else raise 'unknown resource creation mode'
  end
end