C# Class Lucene.Net.Spatial.Queries.SpatialArgsParser

ファイルを表示 Open project: apache/lucenenet Class Usage Examples

Public Methods

Method Description
Parse ( string v, SpatialContext ctx ) : SpatialArgs

Parses a string such as "Intersects(ENVELOPE(-10,-8,22,20)) distErrPct=0.025".

WriteSpatialArgs ( SpatialArgs args ) : string

Writes a close approximation to the parsed input format.

Protected Methods

Method Description
NewSpatialArgs ( SpatialOperation op, IShape shape ) : SpatialArgs
ParseMap ( string body ) : string>.IDictionary

Parses "a=b c=d f" (whitespace separated) into name-value pairs. If there is no '=' as in 'f' above then it's short for f=f.

ParseShape ( string str, SpatialContext ctx ) : IShape
ReadBool ( string v, bool defaultValue ) : bool
ReadDouble ( string v ) : double?
ReadNameValuePairs ( SpatialArgs args, string>.IDictionary nameValPairs ) : void

Method Details

NewSpatialArgs() protected method

protected NewSpatialArgs ( SpatialOperation op, IShape shape ) : SpatialArgs
op SpatialOperation
shape IShape
return SpatialArgs

Parse() public method

Parses a string such as "Intersects(ENVELOPE(-10,-8,22,20)) distErrPct=0.025".
if the parameters don't make sense or an add-on parameter is unknown If there is a problem parsing the string When the coordinates are invalid for the shape
public Parse ( string v, SpatialContext ctx ) : SpatialArgs
v string The string to parse. Mandatory.
ctx Spatial4n.Core.Context.SpatialContext The spatial context. Mandatory.
return SpatialArgs

ParseMap() protected static method

Parses "a=b c=d f" (whitespace separated) into name-value pairs. If there is no '=' as in 'f' above then it's short for f=f.
protected static ParseMap ( string body ) : string>.IDictionary
body string
return string>.IDictionary

ParseShape() protected method

protected ParseShape ( string str, SpatialContext ctx ) : IShape
str string
ctx Spatial4n.Core.Context.SpatialContext
return IShape

ReadBool() protected static method

protected static ReadBool ( string v, bool defaultValue ) : bool
v string
defaultValue bool
return bool

ReadDouble() protected static method

protected static ReadDouble ( string v ) : double?
v string
return double?

ReadNameValuePairs() protected method

protected ReadNameValuePairs ( SpatialArgs args, string>.IDictionary nameValPairs ) : void
args SpatialArgs
nameValPairs string>.IDictionary
return void

WriteSpatialArgs() public static method

Writes a close approximation to the parsed input format.
public static WriteSpatialArgs ( SpatialArgs args ) : string
args SpatialArgs
return string