Class: MarkLogic::DatabaseSettings::GeospatialElementPairIndex
- Inherits:
-
Object
- Object
- MarkLogic::DatabaseSettings::GeospatialElementPairIndex
- Defined in:
- lib/marklogic/database_settings/geospatial_element_pair_index.rb
Instance Attribute Summary collapse
-
#facet ⇒ Object
Returns the value of attribute facet.
-
#latitude_localname ⇒ Object
Returns the value of attribute latitude_localname.
-
#longitude_localname ⇒ Object
Returns the value of attribute longitude_localname.
-
#parent_localname ⇒ Object
Returns the value of attribute parent_localname.
Instance Method Summary collapse
- #append_to_db(database) ⇒ Object
-
#initialize(element_name, latitude_localname, longitude_localname, options = {}) ⇒ GeospatialElementPairIndex
constructor
A new instance of GeospatialElementPairIndex.
- #key ⇒ Object
- #to_json(options = nil) ⇒ Object
Constructor Details
#initialize(element_name, latitude_localname, longitude_localname, options = {}) ⇒ GeospatialElementPairIndex
Returns a new instance of GeospatialElementPairIndex.
7 8 9 10 11 12 13 14 15 |
# File 'lib/marklogic/database_settings/geospatial_element_pair_index.rb', line 7 def initialize(element_name, latitude_localname, longitude_localname, = {}) @parent_localname = element_name @latitude_localname = latitude_localname @longitude_localname = longitude_localname @coordinate_system = [:coordinate_system] || MarkLogic::GEO_WGS84 @range_value_positions = [:range_value_positions] || false @invalid_values = [:invalid_values] || MarkLogic::REJECT @facet = [:facet] || false end |
Instance Attribute Details
#facet ⇒ Object
Returns the value of attribute facet.
5 6 7 |
# File 'lib/marklogic/database_settings/geospatial_element_pair_index.rb', line 5 def facet @facet end |
#latitude_localname ⇒ Object
Returns the value of attribute latitude_localname.
5 6 7 |
# File 'lib/marklogic/database_settings/geospatial_element_pair_index.rb', line 5 def latitude_localname @latitude_localname end |
#longitude_localname ⇒ Object
Returns the value of attribute longitude_localname.
5 6 7 |
# File 'lib/marklogic/database_settings/geospatial_element_pair_index.rb', line 5 def longitude_localname @longitude_localname end |
#parent_localname ⇒ Object
Returns the value of attribute parent_localname.
5 6 7 |
# File 'lib/marklogic/database_settings/geospatial_element_pair_index.rb', line 5 def parent_localname @parent_localname end |
Instance Method Details
#append_to_db(database) ⇒ Object
21 22 23 |
# File 'lib/marklogic/database_settings/geospatial_element_pair_index.rb', line 21 def append_to_db(database) database.add_index("geospatial-element-pair-index", self) end |
#key ⇒ Object
17 18 19 |
# File 'lib/marklogic/database_settings/geospatial_element_pair_index.rb', line 17 def key %Q{#{self.class.to_s}-#{@localname}} end |
#to_json(options = nil) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/marklogic/database_settings/geospatial_element_pair_index.rb', line 25 def to_json( = nil) { "geospatial-element-pair-index" => { "parent-namespace-uri" => "", "parent-localname" => @parent_localname, "latitude-namespace-uri" => "", "latitude-localname" => @latitude_localname, "longitude-namespace-uri" => "", "longitude-localname" => @longitude_localname, "coordinate-system" => @coordinate_system, "range-value-positions" => @range_value_positions, "invalid-values" => @invalid_values } } end |