translate.services.lookupservice.lookupServer

Package translate :: Package services :: Module lookupservice :: Class lookupServer |
[hide private]
[frames] | no frames]

# Class lookupServer

source code

Instance Methods | [hide private]
__init__(self, addr, storage) Loads the initial tbx file from the given filename | source code
_dispatch(self, method, params) Dispatches the XML-RPC method. | source code
internal_lookup(self, message) Could perhaps include some intelligence in future, like case trying with different casing, etc. | source code
public_lookup(self, message) Returns the source string of whatever was found. | source code
public_translate(self, message) Translates the message from the storage and returns a plain string | source code
public_matches(self, message, max_candidates=15, min_similarity=50) Returns matches from the storage with the associated similarity | source code
Inherited from `SocketServer.TCPServer`: `close_request`, `fileno`, `get_request`, `server_activate`, `server_bind`, `server_close` Inherited from `SocketServer.BaseServer`: `finish_request`, `handle_error`, `handle_request`, `process_request`, `serve_forever`, `verify_request` Inherited from `SimpleXMLRPCServer.SimpleXMLRPCDispatcher`: `register_function`, `register_instance`, `register_introspection_functions`, `register_multicall_functions`, `system_listMethods`, `system_methodHelp`, `system_methodSignature`, `system_multicall` Inherited from `SimpleXMLRPCServer.SimpleXMLRPCDispatcher` (private): `_marshaled_dispatch`

Class Variables | [hide private]
Inherited from `SimpleXMLRPCServer.SimpleXMLRPCServer`: `allow_reuse_address` Inherited from `SocketServer.TCPServer`: `address_family`, `request_queue_size`, `socket_type`

Method Details | [hide private]

### __init__(self, addr, storage) (Constructor) | source code
Loads the initial tbx file from the given filename Overrides: SimpleXMLRPCServer.SimpleXMLRPCDispatcher.__init__

### _dispatch(self, method, params) | source code
Dispatches the XML-RPC method. XML-RPC calls are forwarded to a registered function that matches the called XML-RPC method name. If no such function exists then the call is forwarded to the registered instance, if available. If the registered instance has a _dispatch method then that method will be called with the name of the XML-RPC method and its parameters as a tuple e.g. instance._dispatch('add',(2,3)) If the registered instance does not have a _dispatch method then the instance will be searched to find a matching method and, if found, will be called. Methods beginning with an '_' are considered private and will not be called. Overrides: SimpleXMLRPCServer.SimpleXMLRPCDispatcher._dispatch (inherited documentation)

### public_lookup(self, message) | source code
Returns the source string of whatever was found. Keep in mind that this might not be what you want.