Class: ODDB::FachinfoDocument

Inherits:
Object
  • Object
show all
Includes:
OddbYaml, Persistence
Defined in:
src/model/fachinfo.rb,
ext/fiparse/src/fiparse.rb,
ext/export/src/oddb_yaml.rb,
test/test_model/fachinfo.rb,
test/test_plugin/text_info.rb,
ext/fiparse/test/fachinfo_pdf_test.rb,
ext/fiparse/test/test_fachinfo_hpricot.rb

Direct Known Subclasses

FachinfoDocument2001, ODDB::FiPDF::FachinfoProxy

Constant Summary

CHAPTERS =
[
  :galenic_form,
  :composition,
  :effects,
  :kinetic,
  :indications,
  :usage,
  :restrictions,
  :unwanted_effects,
  :interactions,
  :overdose,
  :other_advice,
  :delivery,
  :distribution,
  :fabrication,
  #:reference,
  :iksnrs,
  :packages,
  :date,
]
EXPORT_PROPERTIES =
[
  '@name',
  '@galenic_form',
  '@composition',
  '@effects',
  '@kinetic',
  '@indications',
  '@usage',
  '@restrictions',
  '@unwanted_effects',
  '@interactions',
  '@overdose',
  '@other_advice',
  '@delivery',
  '@distribution',
  '@fabrication',
  '@reference',
  '@iksnrs',
  '@date',
]

Constants included from OddbYaml

EXPORT_PROPERTIES, YAML_URI

Constants included from Persistence

ODBA_PREDEFINE_SERIALIZABLE

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods included from OddbYaml

#to_yaml_properties, #to_yaml_type

Methods included from PersistenceMethods

#checkout, #data_origin, #data_origins, #diff, #init, #nil_if_empty, #parent, #pointer_descr, #structural_ancestors, #undiffable?, #update_values

Constructor Details

- (FachinfoDocument) initialize

A new instance of FachinfoDocument



20
21
# File 'ext/fiparse/src/fiparse.rb', line 20

def initialize
end

Instance Attribute Details

- (Object) composition

Returns the value of attribute composition



85
86
87
# File 'src/model/fachinfo.rb', line 85

def composition
  @composition
end

- (Object) date

Returns the value of attribute date



89
90
91
# File 'src/model/fachinfo.rb', line 89

def date
  @date
end

- (Object) delivery

Returns the value of attribute delivery



90
91
92
# File 'src/model/fachinfo.rb', line 90

def delivery
  @delivery
end

- (Object) distribution

Returns the value of attribute distribution



90
91
92
# File 'src/model/fachinfo.rb', line 90

def distribution
  @distribution
end

- (Object) effects

Returns the value of attribute effects



86
87
88
# File 'src/model/fachinfo.rb', line 86

def effects
  @effects
end

- (Object) fabrication

Returns the value of attribute fabrication



90
91
92
# File 'src/model/fachinfo.rb', line 90

def fabrication
  @fabrication
end

- (Object) galenic_form

Returns the value of attribute galenic_form



85
86
87
# File 'src/model/fachinfo.rb', line 85

def galenic_form
  @galenic_form
end

- (Object) iksnrs

Returns the value of attribute iksnrs



89
90
91
# File 'src/model/fachinfo.rb', line 89

def iksnrs
  @iksnrs
end

- (Object) indications

Returns the value of attribute indications



86
87
88
# File 'src/model/fachinfo.rb', line 86

def indications
  @indications
end

- (Object) interactions

Returns the value of attribute interactions



88
89
90
# File 'src/model/fachinfo.rb', line 88

def interactions
  @interactions
end

- (Object) kinetic

Returns the value of attribute kinetic



86
87
88
# File 'src/model/fachinfo.rb', line 86

def kinetic
  @kinetic
end

- (Object) name

Returns the value of attribute name



85
86
87
# File 'src/model/fachinfo.rb', line 85

def name
  @name
end

- (Object) other_advice

Returns the value of attribute other_advice



88
89
90
# File 'src/model/fachinfo.rb', line 88

def other_advice
  @other_advice
end

- (Object) overdose

Returns the value of attribute overdose



88
89
90
# File 'src/model/fachinfo.rb', line 88

def overdose
  @overdose
end

- (Object) packages

Returns the value of attribute packages



89
90
91
# File 'src/model/fachinfo.rb', line 89

def packages
  @packages
end

- (Object) reference

Returns the value of attribute reference



89
90
91
# File 'src/model/fachinfo.rb', line 89

def reference
  @reference
end

- (Object) registrations

Returns the value of attribute registrations



18
19
20
# File 'test/test_model/fachinfo.rb', line 18

def registrations
  @registrations
end

- (Object) restrictions

Returns the value of attribute restrictions



87
88
89
# File 'src/model/fachinfo.rb', line 87

def restrictions
  @restrictions
end

- (Object) unwanted_effects

Returns the value of attribute unwanted_effects



87
88
89
# File 'src/model/fachinfo.rb', line 87

def unwanted_effects
  @unwanted_effects
end

- (Object) usage

Returns the value of attribute usage



86
87
88
# File 'src/model/fachinfo.rb', line 86

def usage
  @usage
end

Instance Method Details

- (Object) chapter_names



113
114
115
116
117
# File 'src/model/fachinfo.rb', line 113

def chapter_names
  chapters.select { |chapter|
    respond_to?(chapter) && self.send(chapter)
  }
end

- (Object) chapters



118
119
120
# File 'src/model/fachinfo.rb', line 118

def chapters
  self::class::CHAPTERS
end

- (Object) each_chapter(&block)



121
122
123
124
125
126
127
# File 'src/model/fachinfo.rb', line 121

def each_chapter(&block)
  chapter_names.each { |chap|
    if(chapter = self.send(chap))
      block.call(chapter)
    end
  }
end

- (Boolean) empty?

Returns:

  • (Boolean)


111
112
# File 'src/model/fachinfo.rb', line 111

def empty?
end

- (Object) first_chapter



128
129
130
131
132
133
134
# File 'src/model/fachinfo.rb', line 128

def first_chapter
  chapter = nil
  chapters.find { |chapter| 
    respond_to?(chapter) && chapter = self.send(chapter)
  }
  chapter 
end

- (Object) odba_id



13
14
15
# File 'test/test_plugin/text_info.rb', line 13

def odba_id
  1
end