Exemplo n.º 1
0
    def __init__(self,
                 parent_uri,
                 parent_localname,
                 long_namespace_uri,
                 long_localname,
                 lat_namespace_uri,
                 lat_localname,
                 coordinate_system="wgs84",
                 range_value_positions=False,
                 invalid_values='reject'):
        """
        Create a geospatial element attribute pair index.
        """
        validate_coordinate_system(coordinate_system)
        validate_boolean(range_value_positions)
        validate_index_invalid_value_actions(invalid_values)

        self._config = {
            'parent-namespace-uri': parent_uri,
            'parent-localname': parent_localname,
            'longitude-namespace-uri': long_namespace_uri,
            'longitude-localname': long_localname,
            'latitude-namespace-uri': lat_namespace_uri,
            'latitude-localname': lat_localname,
            'coordinate-system': coordinate_system,
            'range-value-positions': range_value_positions,
            'invalid-values': invalid_values
        }
Exemplo n.º 2
0
    def __init__(self,
                 parent_uri,
                 parent_localname,
                 namespace_uri,
                 localname,
                 coordinate_system="wgs84",
                 point_format="point",
                 range_value_positions=False,
                 invalid_values='reject'):
        """
        Create a geospatial element index.
        """
        validate_coordinate_system(coordinate_system)
        validate_point_format(point_format)
        validate_boolean(range_value_positions)
        validate_index_invalid_value_actions(invalid_values)

        self._config = {
            'parent-namespace-uri': parent_uri,
            'parent-localname': parent_localname,
            'namespace-uri': namespace_uri,
            'localname': localname,
            'coordinate-system': coordinate_system,
            'point-format': point_format,
            'range-value-positions': range_value_positions,
            'invalid-values': invalid_values
        }
Exemplo n.º 3
0
    def __init__(self,
                 scalar_type,
                 field_name,
                 collation="",
                 range_value_positions=False,
                 invalid_values='reject'):
        """
        Create a field range index.
        """
        validate_index_type(scalar_type)
        validate_boolean(range_value_positions)
        validate_index_invalid_value_actions(invalid_values)
        validate_collation(scalar_type, collation)

        if collation == '':
            collation = None

        self._config = {
            'scalar-type': scalar_type,
            'field-name': field_name,
            'collation': '',
            'range-value-positions': range_value_positions,
            'invalid-values': invalid_values
        }

        if collation is not None:
            self._config['collation'] = collation
Exemplo n.º 4
0
    def __init__(self,
                 scalar_type,
                 parent_uri,
                 parent_localname,
                 namespace_uri,
                 localname,
                 collation="",
                 range_value_positions=False,
                 invalid_values='reject'):
        """
        Create an attribute range index.
        """
        validate_index_type(scalar_type)
        validate_boolean(range_value_positions)
        validate_index_invalid_value_actions(invalid_values)
        validate_collation(scalar_type, collation)

        if collation == '':
            collation = None

        self._config = {
            'scalar-type': scalar_type,
            'parent-namespace-uri': parent_uri,
            'parent-localname': parent_localname,
            'namespace-uri': namespace_uri,
            'localname': localname,
            'collation': '',
            'range-value-positions': range_value_positions,
            'invalid-values': invalid_values
        }

        if collation is not None:
            self._config['collation'] = collation
Exemplo n.º 5
0
    def set_range_value_positions(self, pos=False):
        """
        Sets the range value positions.

        :param pos: The range value positions setting

        :return: The index object
        """
        validate_boolean(pos)
        self._config['range-value-positions'] = pos
        return self
Exemplo n.º 6
0
    def __init__(self, path_expr,
                 coordinate_system="wgs84", point_format="point",
                 range_value_positions=False, invalid_values='reject'):
        """
        Create a geospatial path index.
        """
        validate_coordinate_system(coordinate_system)
        validate_point_format(point_format)
        validate_boolean(range_value_positions)
        validate_index_invalid_value_actions(invalid_values)

        self._config = {
            'path-expression': path_expr,
            'coordinate-system': coordinate_system,
            'point-format': point_format,
            'range-value-positions': range_value_positions,
            'invalid-values': invalid_values
        }