Class: HQMF2::DataCriteriaWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/hqmf-parser/2.0/types.rb

Overview

Creates a Data Criteria given a map of options, and is used when full

criteria parsing is not necessary.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ DataCriteriaWrapper

Returns a new instance of DataCriteriaWrapper.



432
433
434
# File 'lib/hqmf-parser/2.0/types.rb', line 432

def initialize(opts = {})
  opts.each { |k, v| instance_variable_set("@#{k}", v) }
end

Instance Attribute Details

#children_criteriaObject

Returns the value of attribute children_criteria.



426
427
428
# File 'lib/hqmf-parser/2.0/types.rb', line 426

def children_criteria
  @children_criteria
end

#code_list_idObject

Returns the value of attribute code_list_id.



430
431
432
# File 'lib/hqmf-parser/2.0/types.rb', line 430

def code_list_id
  @code_list_id
end

#commentsObject

Returns the value of attribute comments.



429
430
431
# File 'lib/hqmf-parser/2.0/types.rb', line 429

def comments
  @comments
end

#definitionObject

Returns the value of attribute definition.



430
431
432
# File 'lib/hqmf-parser/2.0/types.rb', line 430

def definition
  @definition
end

#derivation_operatorObject

Returns the value of attribute derivation_operator.



427
428
429
# File 'lib/hqmf-parser/2.0/types.rb', line 427

def derivation_operator
  @derivation_operator
end

#descriptionObject

Returns the value of attribute description.



427
428
429
# File 'lib/hqmf-parser/2.0/types.rb', line 427

def description
  @description
end

#effective_timeObject

Returns the value of attribute effective_time.



425
426
427
# File 'lib/hqmf-parser/2.0/types.rb', line 425

def effective_time
  @effective_time
end

#field_valuesObject

Returns the value of attribute field_values.



428
429
430
# File 'lib/hqmf-parser/2.0/types.rb', line 428

def field_values
  @field_values
end

#idObject

Returns the value of attribute id.



430
431
432
# File 'lib/hqmf-parser/2.0/types.rb', line 430

def id
  @id
end

#inline_code_listObject

Returns the value of attribute inline_code_list.



430
431
432
# File 'lib/hqmf-parser/2.0/types.rb', line 430

def inline_code_list
  @inline_code_list
end

#negationObject

Returns the value of attribute negation.



427
428
429
# File 'lib/hqmf-parser/2.0/types.rb', line 427

def negation
  @negation
end

#negation_code_list_idObject

Returns the value of attribute negation_code_list_id.



427
428
429
# File 'lib/hqmf-parser/2.0/types.rb', line 427

def negation_code_list_id
  @negation_code_list_id
end

#source_data_criteriaObject

Returns the value of attribute source_data_criteria.



428
429
430
# File 'lib/hqmf-parser/2.0/types.rb', line 428

def source_data_criteria
  @source_data_criteria
end

#specific_occurrenceObject

Returns the value of attribute specific_occurrence.



429
430
431
# File 'lib/hqmf-parser/2.0/types.rb', line 429

def specific_occurrence
  @specific_occurrence
end

#specific_occurrence_constObject

Returns the value of attribute specific_occurrence_const.



428
429
430
# File 'lib/hqmf-parser/2.0/types.rb', line 428

def specific_occurrence_const
  @specific_occurrence_const
end

#statusObject

Returns the value of attribute status.



425
426
427
# File 'lib/hqmf-parser/2.0/types.rb', line 425

def status
  @status
end

#subset_operatorsObject

Returns the value of attribute subset_operators.



426
427
428
# File 'lib/hqmf-parser/2.0/types.rb', line 426

def subset_operators
  @subset_operators
end

#temporal_referencesObject

Returns the value of attribute temporal_references.



426
427
428
# File 'lib/hqmf-parser/2.0/types.rb', line 426

def temporal_references
  @temporal_references
end

#titleObject

Returns the value of attribute title.



430
431
432
# File 'lib/hqmf-parser/2.0/types.rb', line 430

def title
  @title
end

#valueObject

Returns the value of attribute value.



425
426
427
# File 'lib/hqmf-parser/2.0/types.rb', line 425

def value
  @value
end

#variableObject

Returns the value of attribute variable.



430
431
432
# File 'lib/hqmf-parser/2.0/types.rb', line 430

def variable
  @variable
end

Instance Method Details

#to_modelObject

Generates this classes hqmf-model equivalent



437
438
439
440
441
442
443
444
445
446
# File 'lib/hqmf-parser/2.0/types.rb', line 437

def to_model
  mv = @value ? @value.to_model : nil
  met = @effective_time ? @effective_time.to_model : nil
  mtr = @temporal_references
  mso = @subset_operators
  HQMF::DataCriteria.new(@id, @title, nil, @description, @code_list_id, @children_criteria,
                         @derivation_operator, @definition, @status, mv, field_values, met, @inline_code_list,
                         @negation, @negation_code_list_id, mtr, mso, @specific_occurrence,
                         @specific_occurrence_const, @source_data_criteria, @comments, @variable)
end