VideotexMapper Object

The VideotexMapper object is used to drive the Carapace Videotex mapping. The map for a particular Videotex service is defined as as set of page definitions. These are loaded into the VideotexMapper object which then performs the mapping.

VideotexMapper Creation

The create function can be used to create a VideotexMapper object eg.

    (create VideotexMapper)
Once created, this object is tailored using its properties and methods.

VideotexMapper Properties

A VideotexMapper object supports the following properties:

property name property type description
newPageEvent Event an event which page triggers can set when a new page is detected -- this event is usually set through use of the method detectNewPage
screen Screen holds a representation of the current Videotex screen
currentPage VideotexMapPage if non-() holds the definition for the currently matched Videotex page
environment HashTable an environment for use by the mapping triggers which persists across different pages
upload HashTable data available to be uploaded to the Videotex service

VideotexMapper Methods

A VideotexMapper object supports the following methods:

method name description
loadPages load page definitions from the supplied file
clearPages remove all the currently loaded page definitions
isCursorAt test if the cursor is at the given location
isCursorOnAt test if the cursor is on and located at the given position
detectNewPage mark the arrival a new Videotex page if the cursor is on at the given position
identifyScreen attempt to identify the current Videotex screen from the loaded page definitions
isComplete test if the current page is complete and ready for mapping
scrapeCurrentPage scrape the data from the current Videotex page according to the current page definition
displayFile display the Videotex stored in the supplied file
mapCurrentPage map the current page
currentPageOptions list the options for the current page
setError record an error within the mapper -- this is typically picked up and processed by a different thread
setLog use the supplied log


loadPages

Load page definitions from the supplied file -- the name of the first page is returned.

Arguments:

filenameString

Return type: String


clearPages

Remove all the currently loaded page definitions.

Arguments: none

Return type: the empty List ()


isCursorAt

Test if the cursor is at the given location.

Arguments:

rowInteger
columnInteger

Return type: the empty List () is returned if the cursor is not at the supplied position.


isCursorOnAt

Test if the cursor is on and located at the given position.

Arguments:

rowInteger
columnInteger

Return type: the empty List () is returned if the test fails.


detectNewPage

Mark the arrival a new Videotex page if the cursor is on at the given position. This is usually used within a trigger -- e.g. a hotPatch trigger, so the function allows for the trigger to be re-enabled on the screen.

Arguments:

rowInteger
columnInteger
triggerNameString

Return type: the empty List ()


identifyScreen

Attempt to identify the current Videotex screen from the loaded page definitions -- returns the string unknown or the name of a matching page.

Arguments: none

Return type: String


isComplete

Test if the current page is complete and ready for mapping.

Arguments: none

Return type: the empty List () if the page is not complete.


scrapeCurrentPage

Scrape the data from the current Videotex page according to the current page definition -- this is stored in the "history" part of the environment unless an argument is supplied.

This uses the extractFields part of the page definition.

Arguments:

(optional) recordObject

Return type: HashTable


displayFile

Display the Videotex stored in the supplied file.

Arguments:

emulatorDispatch
filenameString

Return type: the empty List ()


mapCurrentPage

Map the current page. The value returned is that returned by the map method setup for the current page.

Arguments: none

Return type: Object


currentPageOptions

List the options for the current page as defined by the page's options statement.

Arguments: none

Return type: List of Strings.


setError

Record an error within the mapper -- this is typically picked up and processed by a different thread.

Arguments:

errError

Return type: the empty List ()


Contents Current topic: videotex Related topics: Carapace Hub