lib/cultural_network/import/feature_data.rb
# ##################################################################### #
# extract, create and save all of the object types and associate them to the current feature 
extract, create and save all of the object types and associate them to the current feature
extract create and save all of the object types and associate them to the current feature
def extract_feature_object_types(doc, feature)
      admin_thesaurus_term = doc.at("/feature/fheader/fclass")['term']
      ot = ObjectType.find_or_create_by_code(admin_thesaurus_term.downcase)
      fot = FeatureObjectType.new
      fot.feature_id = feature.id
      fot.category_id = ot.id
      fot.perspective = @current_perspective
      raise "FeatureObjectType not saved!" unless fot.save
      set_timespan(doc, fot)
      extract_citations(doc.at("/feature/fheader/fclass"), fot)
    end
def extract_feature_object_types ( doc , feature ) admin_thesaurus_term = doc . at ( "/feature/fheader/fclass" ) [ 'term' ] ot = ObjectType . find_or_create_by_code ( admin_thesaurus_term . downcase ) fot = FeatureObjectType . new fot . feature_id = feature . id fot . category_id = ot . id fot . perspective = @current_perspective raise "FeatureObjectType not saved!" unless fot . save set_timespan ( doc , fot ) extract_citations ( doc . at ( "/feature/fheader/fclass" ) , fot ) end
extract, create and save all of the object types and associate them to the current feature
extract create and save all of the object types and associate them to the current feature
# Tie this feature to a FeatureObjectType and through it an ObjectType # Does an object type exist for this code yet?  # Create a FeatureObjectType to tie this feature to an ObjectType #Perspective.find_or_create_by_code(@current_perspective_code)
doc
<not_specific>
feature
<not_specific>