Class: AddressInterpreter

AddressInterpreter

This Widget returns the address of specified coordinates.

new AddressInterpreter()

Extends

Requires

  • module:easejs
  • module:jquery
  • module:Interpreter
  • module:AttributeType
  • module:AttributeValue
  • module:Parameter

Members

privateadressArray

protecteddiscovererDiscoverer

Associated Discoverer.

idstring

Id of the Interpreter. Will be generated.

protectedinAttributeTypesAttributeTypeList

Types of all attributes that can be handled.

protectedinAttributeValuesAttributeValueList

List of the data that should be interpreted.

protectedlastInterpretationDate

Last interpretation time.

nameString

Name of the Interpreter. In this case: AddressInterpreter

protectedoutAttributeTypesAttributeTypeList

Types of all attributes that will be returned.

protectedoutAttributeValuesAttributeValueList

List of interpreted data.

Methods

inherited callInterpreter(_dataToInterpret, _function)

Validates the data and calls interpretData.
Name Type Description
_dataToInterpret AttributeValueList Data that should be interpreted.
_function function nullable For additional actions, if an asynchronous function is used.

inherited protectedcanHandle(_inAtts)

Checks whether the specified data match the expected.
Name Type Description
_inAtts AttributeValueList Data that should be verified.

privatecheckStatus(json)

Check status.
Name Type Description
json Array
Returns the id of the interpreter.
Returns the expected inAttributeTypes.
Returns the interpreted data.
Returns the description of this component.

inherited protectedgetLastInterpretionTime(){Date}

Returns the time of the last interpretation.
Returns the name of the interpreter.
Returns the provided outAttributeTypes.
Returns the type of this class, in this case "Interpreter".

privategoogleGetAddress(json, self)

Stores address in array.
Name Type Description
json Array
self AddressInterpreter

protectedinitInAttributes()

Initializes inAttributes. For this class: Latitude and Longitude

inherited privateinitInterpreter()

Initializes interpreter and sets the expected inAttributes and provided outAttributes.

protectedinitOutAttributes()

Initializes outAttributes. For this class: Address as String

protectedinterpretData(_data, _function)

Changes coordinates to address
Name Type Description
_data AttributeValueList list of data that should be interpreted
_function function nullable for additional actions, if an asynchronous function is used

inherited protectedisInAttribute(_attribute){boolean}

Verifies whether the specified attribute is contained in inAttributeList.
Name Type Description
_attribute AttributeValue Attribute that should be verified.

inherited protectedisOutAttribute(_attribute){boolean}

Verifies whether the specified attribute is contained in outAttributeList.
Name Type Description
_attribute AttributeValue Attribute that should be verified.
Registers the component to the associated Discoverer.

inherited setDiscoverer(_discoverer)

Sets and registers to the associated Discoverer.
Name Type Description
_discoverer Discoverer Discoverer

inherited protectedsetInAttribute(_name, _type, _value, _parameter)

Sets an inAttribute.
Name Type Description
_name string name of the attribute
_type string type of the attribute
_value string value of the attribute
_parameter ParameterList | Array Parameter of the attribute.

inherited protectedsetInAttributeValues(_attributeValueList)

Sets an inAttributes.
Name Type Description
_attributeValueList AttributeValueList | Array Attributes to set.

inherited protectedsetOutAttribute(_name, _type, _value, _parameter)

Adds an outAttribute.
Name Type Description
_name string name of the attribute
_type string type of the attribute
_value string value of the attribute
_parameter ParameterList | Array Parameter of the attribute.

Type Definitions

createAddress

Creates the address.

response

Success function for callback createAddress() used in interpretData(). Sets the outAttributes.