Package | com.esri.baserver.tasks.businessessearch |
Class | public class SelectBusinessesParameters |
Inheritance | SelectBusinessesParameters BAUtilityParameters BABaseParameters Object |
Implements | IBAResultProcessor |
Business points can be selected using any combination of three search criteria—a search string criterion, a spatial filter, and business type filters. A business point will be selected if it matches all search criteria specified.
The search string criterion is specified with the searchString
parameter.
Its value is searched in textual attribute fields of a business point record using the following rules:
searchString
parameter value as a word.searchString
parameter value contains a number of words delimited with spaces,
a search field value is considered to match the search when all these words are found in it.searchString
parameter value means logical OR operation, e.g.
"term1;term2;term3"
mean search for "term1"
OR "term2"
OR "term3"
.searchString
parameter value is the wildcard. It means any number
of arbitrary symbols.AND
and OR
words in the search string.
If you want to search for business points containing these words, use lowercase and
and or
.matchExactly
option is true, the search fields are tested to contain the whole value
of the searchString
parameter. This is the same as enclosing the whole search string in double quotes.useSimpleSearch
option is true, the search is restricted to the most important search
field (the company name field for USA).
Example | Description |
---|---|
"Fireproofing"
| Searches for a single "FIREPROOFING" word. |
"Burger King"
| Searches for both "BURGER" and "KING" words. |
"Burger;King"
| Searches for "BURGER" or "KING" word. |
"\"Burger King\""
| Searches for "BURGER KING" phrase. |
"Don*"
| Searches for a word starting with "DON". |
"*Don"
| Searches for a word ending with "DON". |
"Don*ld"
| Searches for a word starting with "DON" and ending with "LD". |
"\"Burger King\";\"Mc Donald\""
| Searches for "BURGER KING" or "MC DONALD" phrase. |
The spatial filter is specified with the spatialFilter
parameter.
It restricts the search in one of three possible ways—by specifying either an analysis extent,
a boundary layer, or a list of business locations.
The business type filters are specified with the businessTypeFilters
parameter.
This parameter contains a list of business type filters of the BusinessTypeFilter
type to be subsequently
applied to selected business points. For USA, either the NAICS or SIC filter is useful as a business type filter.
If both filters are specified in the businessTypeFilters
parameter value, selected business points
will match both of them.
See also
Property | Defined By | ||
---|---|---|---|
activeDatasetID : String
Active dataset ID. | BAUtilityParameters | ||
businessTypeFilters : Array
An array of BusinessTypeFilter items restricting the search. | SelectBusinessesParameters | ||
featuresLimit : int
The limit of returned business points. | SelectBusinessesParameters | ||
matchExactly : Boolean
True value of the parameter means the exact match of the string to search. | SelectBusinessesParameters | ||
outputSpatialReference : SpatialReference
The spatial reference to return the output feature set in. | SelectBusinessesParameters | ||
resultType : BAResultType [read-only]
Type of a result returned by the task associated with these parameters. | BABaseParameters | ||
returnGeometry : Boolean
An option specifying the presence of the shape attribute in the returned record set. | SelectBusinessesParameters | ||
searchString : String
A string of characters which is used in the search query. | SelectBusinessesParameters | ||
spatialFilter : SpatialFilter
A spatial filter restricting the search. | SelectBusinessesParameters | ||
taskName : String [read-only]
Name of a Business Analyst Server task associated with these parameters. | BABaseParameters | ||
useSimpleSearch : Boolean
True value of the parameter means a simple search (in company names only). | SelectBusinessesParameters |
Method | Defined By | ||
---|---|---|---|
Creates a new instance of the SelectBusinessesParameters class. | SelectBusinessesParameters |
businessTypeFilters | property |
businessTypeFilters:Array
An array of BusinessTypeFilter items restricting the search.
public function get businessTypeFilters():Array
public function set businessTypeFilters(value:Array):void
See also
featuresLimit | property |
featuresLimit:int
The limit of returned business points.
The default value is 1000
.
public function get featuresLimit():int
public function set featuresLimit(value:int):void
matchExactly | property |
matchExactly:Boolean
True value of the parameter means the exact match of the string to search.
The default value is false
.
public function get matchExactly():Boolean
public function set matchExactly(value:Boolean):void
outputSpatialReference | property |
outputSpatialReference:SpatialReference
The spatial reference to return the output feature set in.
public function get outputSpatialReference():SpatialReference
public function set outputSpatialReference(value:SpatialReference):void
returnGeometry | property |
returnGeometry:Boolean
An option specifying the presence of the shape attribute in the returned record set.
The default value is true
.
public function get returnGeometry():Boolean
public function set returnGeometry(value:Boolean):void
searchString | property |
searchString:String
A string of characters which is used in the search query.
public function get searchString():String
public function set searchString(value:String):void
spatialFilter | property |
spatialFilter:SpatialFilter
A spatial filter restricting the search.
public function get spatialFilter():SpatialFilter
public function set spatialFilter(value:SpatialFilter):void
useSimpleSearch | property |
useSimpleSearch:Boolean
True value of the parameter means a simple search (in company names only).
public function get useSimpleSearch():Boolean
public function set useSimpleSearch(value:Boolean):void
SelectBusinessesParameters | () | Constructor |
public function SelectBusinessesParameters()
Creates a new instance of the SelectBusinessesParameters class.
var parameters : SelectBusinessesParameters = new SelectBusinessesParameters(); // All parameters of this task are optional. You can specify any combination of search criteria. // Specify a string of words to search for, e.g. //parameters.searchString = "Fireproofing"; // The matchExactly option can be used if you want to find the whole phrase as is. //parameters.matchExactly = true; // The useSimpleSearch option can be used if you want to search in company names only. //parameters.useSimpleSearch = true; // The spatialFilter parameter can restrict the analysis to a spatial/geographic extent, or to // a boundary layer or to a list of business locations. Allowed business locations can be retrieved // with the Select Locations task. When specified in spatial filter, business location fields are joined // into comma-separated string. //parameters.spatialFilter = new SpatialFilter(analysisExtent); //parameters.spatialFilter = new SpatialFilter(boundaries); //parameters.spatialFilter = new SpatialFilter(["CA,REDDING,96002", "CA,Red Mountain,93558"]); // The businessTypeFilters array can specify filters restricting the analysis to required business categories. // Business classification codes are considered matching if they start with any code specified in the // business type filter. //parameters.businessTypeFilters = [ new BusinessTypeFilter("NAICS", ["55", "212111", "56291001"]) ]; // The featuresLimit parameter specifies the maximum number of business points to be returned. // Its default value is 1000. parameters.featuresLimit = 100; selectBusinessesTask.execute(parameters, new Responder(resultHandler, faultHandler));