JCSDLDefinition Object Defaults Overview

The following table shows the properties defined in the JCSDLDefinition object. To learn how to overwrite the defaults follow the explanation in the how-to section for Overwriting defaults in the Query Builder.

Target definitions

Property

Type

Used By

Description

Name

String

Builder

Human-friendly name of the target/field.

Icon

String

Builder

By default, the builder gives each target an icon with a corresponding name (CSS class). This property can override it.

Type

String

Builder, Parser, Input fields

The type of data accepted by the target (used by the parser).

Input

String

Builder

What input type is used by this target? Possible values are "text", "number", "slider", "select", "geo_box", "geo_radius", "geo_polygon". There is a special case (for the "geo" inputs) in which this property can be an Array of Strings of possible input fields. In this case the builder will create an additional step for the user to choose the appropriate input type.

Operators

Array

Builder

List of operators that can be chosen for this target field. If there is only one operator in the Array then the builder will automatically select and hide it.

CS

Boolean

Text Input

Whether the 'case sensitivity' toggle should be displayed.

Operator definitions

Operator

Label

Short Description

substr

Substring

Filter for a sequence of characters that form a word or part of a word.

contains_any

Contains words

Filter for one or more string values from a list of strings.

contains_near

Contains words near

Filter for two or more words that occur near to each other.

different

Different

Not equal to...

equals

Equals

Equal to...

'in'

'In'

Filter for one or more values from a list.

greaterThan

>=

Greater than...

lowerThan

Lower than...

exists

Exists

Check whether a target is present.

regex_partial

Partial Regex

Filter for content by a regular expression that matches any part of the target.

regex_exact

Exact Regex

Filter for content by a regular expression that matches the entire target.

geo_box

Geo Box

Filter for content originating from geographical locations within a bounding box.

geo_radius

Geo Radius

Filter for content originating from geographical locations within a circle.

geo_polygon

Geo Polygon

Filter for content originating from geographical locations defined by a polygon with up to 32 vertices.

Additional configuration of input types:

Text input type
Attributes:
arrayOperators - array of the selectable operators
operator - Default selected operator
Default:

text : {
    arrayOperators : ['contains_any', 'contains_near', 'in'],
    operator : 'contains_any'
}

Number input type:
Attributes:
arrayOperators - array of the selectable operators
operator - Default selected operator

Default:

number : {
    arrayOperators : ['in'],
    operator : 'equals'
}

Select input type
Attributes:
operator -
sets - Defined sets of selectable lists with the values and names of the items

Default:

select : {
    operator : 'in',
    sets : {
        language : {'af': 'Afrikaans', 'bg': 'Bulgarian', 'zh': 'Chinese', 'cs': 'Czech', 'da': 'Danish', 'nl': 'Dutch', 'en': 'English', 'et': 'Estonian', 'fi': 'Finnish', 'fr': 'French', 'de': 'German', 'el': 'Greek', 'he': 'Hebrew', 'hu': 'Hungarian', 'is': 'Icelandic', 'it': 'Italian', 'ja': 'Japanese', 'ko': 'Korean', 'la': 'Latin', 'lt': 'Lithuanian', 'lv': 'Latvian', 'no': 'Norwegian', 'pl': 'Polish', 'pt': 'Portuguese', 'ro': 'Romanian', 'ru': 'Russian', 'es': 'Spanish', 'sv': 'Swedish', 'tl': 'Tagalog'},
        salienceTopics : {'Advertising':'Advertising','Agriculture':'Agriculture','Art':'Art','Automotive':'Automotive','Aviation':'Aviation','Banking':'Banking','Beverages':'Beverages','Biotechnology':'Biotechnology','Business':'Business','Crime':'Crime','Disasters':'Disasters','Economics':'Economics','Education':'Education','Elections':'Elections','Energy':'Energy','Fashion':'Fashion','Food':'Food','Hardware':'Hardware','Health':'Health','Hotels':'Hotels','Intellectual Property':'Intellectual Property','Investing':'Investing','Labor':'Labor','Law':'Law','Marriage':'Marriage','Mobile Devices':'Mobile Devices','Politics':'Politics','Real Estate':'Real Estate','Renewable Energy':'Renewable Energy','Robotics':'Robotics','Science':'Science','Social Media':'Social Media','Software and Internet':'Software and Internet','Space':'Space','Sports':'Sports','Technology':'Technology','Traditional':'Traditional','Travel':'Travel','Video Games':'Video Games','War':'War','Weather':'Weather'},
        newscredCategories : {'Africa':'Africa', 'Asia':'Asia', 'Business':'Business', 'Entertainment':'Entertainment', 'Environment':'Environment', 'Europe':'Europe', 'Health':'Health', 'Lifestyle':'Lifestyle', 'Other':'Other', 'Politics':'Politics', 'Regional':'Regional', 'Sports':'Sports', 'Technology':'Technology', 'Travel':'Travel', 'U.K.':'U.K.', 'U.S.':'U.S.', 'World':'World'}
    }
}
}

Slider input type
Attributes:
operator -
min - minimum value of the slider
max - maximum value of the slider
step - the value of one step on the slider
'default' - the default value on the slider
displayFormat -

Default:

slider : {
    operator : 'greaterThan',
    min : 0,
    max : 100,
    step : 1,
    'default': 50,
    displayFormat : function(v) {return v;}
}

Geo box input type
Attributes:
operators -
instructions
- Short step by step intructions for the input field.

Default:

geo_box : {
    operators : ['geo_box'],
    instructions : [
        'Click on the map to mark first corner of the box.',
        'Now click on the map to mark the second corner of the box.',
        'You can drag the markers around to change the box coordinates.'
    ]
}

Geo radius input type:
Attributes:
operators -
instructions - Short step by step intructions for the input field.

Default:

geo_radius : {
    operators : ['geo_radius'],
    instructions : [
        'Click on the map to mark the center of the selection.',
        'Click again to set the radius.',
        'You can drag the markers around to move the center of the circle or the radius.'
    ]
}

Geo polygon input type
Attributes:
operators -
instructions - Short step by step intructions for the input field.

Default:

geo_polygon : {
    operators : ['geo_polygon'],
    instructions : [
        'Click on the map to mark first tip of the polygon selection.',
        'Click on the map to mark the second tip of the polygon.',
        'Click on the map to mark the third tip and close the shape.',
        'Click on the map to add new markers or drag them around. Double-click a marker to remove it.'
    ]
}