mtpgwlib.MTMLPolarisReader
index
/home/klokan/Projects/MarineTrans/opt/mtpgw/lib/mtpgwlib/MTMLPolarisReader.py

MTMLPolarisReader module
------------------------
Defines Reader for MTML (Marine Trading Markup Language) format of XML
in version used by old system - Polaris.
 
NOW ONLY REQUISITION AND ATTACHMENT IS SUPPORTED BY THIS READER
 
MTP - Marine Trans Purchasing
 
Copyright (2005) Klokan Petr Pridal

 
Modules
       
lxml.etree

 
Classes
       
mtpgwlib.MTPDocument.MTPDocument
MTMLPolarisReader

 
class MTMLPolarisReader(mtpgwlib.MTPDocument.MTPDocument)
    Reader which parse (ev. validate) MTML Polaris Document given as string
 
  Methods defined here:
__init__(self, string='')
Initialization of Reader - optional string contain MTP document
parse(self, string, validate=True)
Parsing of given string and converting it to internal MTPDocument structure
xpath(self, expression, returnText=True, raw=False)

Static methods defined here:
polarisDate2XMLDate(date)
Convert Polaris textual Date (as string) to XMLSchema compliant date
representation
 
>>> MTMLPolarisReader().polarisDate2XMLDate('20051230')
'2005-12-30'
polarisDate2date(date)
Convert Polaris textual Date (as string) to datetime.date representation

Methods inherited from mtpgwlib.MTPDocument.MTPDocument:
__getitem__(self, key)
diff(self)
Returns variables which differs in instance and this parent class -
used by readers to check what they have implemented
valid(self)
Throw exception if values puted in attributes don't create valid MTP
Document. Returns MTP XML Document of attributes.

Data and other attributes inherited from mtpgwlib.MTPDocument.MTPDocument:
attachments = []
deliverToAddress = ''
deliverToBillingAddress = ''
deliverToCountry = ''
deliverToCountryCode = ''
deliverToEmail = ''
deliverToFax = ''
deliverToID = ''
deliverToName = ''
deliverToTelephone = ''
deliverToWeb = ''
deliveryPortCity = ''
deliveryPortCountry = ''
deliveryPortCountryCode = ''
deliveryPortETA = ''
deliveryPortETD = ''
deliveryPortPier = ''
deliveryPortPort = ''
documentNoteFromSupplier = ''
documentSupplierReference = ''
equipmentManufacturer = ''
equipmentModel = ''
equipmentName = ''
equipmentSerialNumber = ''
jobBudget = ''
jobBudgetCode = ''
jobID = ''
jobJustification = ''
jobNeedByDate = ''
jobNoteToSupplier = ''
jobPriority = 'Medium'
jobREQRaised = ''
jobREQReceived = ''
jobState = ''
jobType = '_4'
lineItems = []
preparationDate = ''
preparationSystem = ''
preparationSystemVersion = ''
preparationTime = ''
shipOwnerAddress = ''
shipOwnerBillingAddress = ''
shipOwnerCountry = ''
shipOwnerCountryCode = ''
shipOwnerEmail = ''
shipOwnerFax = ''
shipOwnerID = ''
shipOwnerName = ''
shipOwnerTelephone = ''
shipOwnerWeb = ''
submittedBy = ''
supplierAddress = ''
supplierBillingAddress = ''
supplierCountry = ''
supplierCountryCode = ''
supplierEmail = ''
supplierFax = ''
supplierID = ''
supplierName = ''
supplierTelephone = ''
supplierWeb = ''
vesselContact = ''
vesselContactTelephone = ''
vesselIMO = ''
vesselName = ''

 
Data
        ContentQualifiers = {'': '', '_1': 'Consumables', '_2': 'Guarantee', '_3': 'General stores', '_4': 'Spares', '_5': 'Services'}
MTMLPOLARISXSD = '/opt/mtpgw/lib/mtpgwlib/schema/mtmlPolaris.xsd'
config = <mtpgwlib.Config.Config instance>
mtmlPolarisXMLSchema = <etree.XMLSchema object>