Class: Es::VelocityField
Constant Summary
Constants inherited from Field
Field::ATTRIBUTE_TYPE, Field::AUTOINCREMENT_TYPE, Field::DATE_TYPE, Field::DURATION_TYPE, Field::FACT_TYPE, Field::FIELD_TYPES, Field::HID_TYPE, Field::HISTORIC_TYPE, Field::IS_DELETED_TYPE, Field::RECORDID_TYPE, Field::SNAPSHOT_TYPE, Field::TIMEATTRIBUTE_TYPE, Field::TIMESTAMP_TYPE, Field::TIME_TYPE, Field::VELOCITY_TYPE
Instance Attribute Summary collapse
-
#control_attribute ⇒ Object
Returns the value of attribute control_attribute.
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name, type, options = {}) ⇒ VelocityField
constructor
A new instance of VelocityField.
- #is_velocity? ⇒ Boolean
- #to_extract_fragment(pid, fields, options = {}) ⇒ Object
Methods inherited from Field
#==, #is_attribute?, #is_autoincrement?, #is_date?, #is_duration?, #is_fact?, #is_hid?, #is_recordid?, #is_snapshot?, #is_timestamp?, parse, #to_config_generator, #to_config_generator_extract, #to_load_config, #to_load_fragment
Constructor Details
#initialize(name, type, options = {}) ⇒ VelocityField
Returns a new instance of VelocityField.
876 877 878 879 |
# File 'lib/es.rb', line 876 def initialize(name, type, = {}) super(name, type) @control_attribute = [:control_attribute] || "StageName" end |
Instance Attribute Details
#control_attribute ⇒ Object
Returns the value of attribute control_attribute.
874 875 876 |
# File 'lib/es.rb', line 874 def control_attribute @control_attribute end |
#name ⇒ Object
Returns the value of attribute name.
874 875 876 |
# File 'lib/es.rb', line 874 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
874 875 876 |
# File 'lib/es.rb', line 874 def type @type end |
Instance Method Details
#is_velocity? ⇒ Boolean
881 882 883 |
# File 'lib/es.rb', line 881 def is_velocity? true end |
#to_extract_fragment(pid, fields, options = {}) ⇒ Object
885 886 887 888 889 890 891 892 893 894 895 896 897 |
# File 'lib/es.rb', line 885 def to_extract_fragment(pid, fields, = {}) { :name => "StageVelocity", :preferred => "stagevelocity", :definition => { :type => "velocity", :ops => [{ :type => "stream", :data => control_attribute }] } } end |