def generatePlainTextDocument(index): me = 'nfo#PlainTextDocument' plaintext_document_datasource = tools.getRandomUri( 'tracker#Volume' ) plaintext_document_filename = 'Plain_text_document_%d.txt' % (index % 1000) plaintext_document_container = 'file://documents/' plaintext_document_url = plaintext_document_container + plaintext_document_filename plaintext_document_uri = plaintext_document_url plaintext_document_mime = 'text/plain' plaintext_document_content = gen.create_text(5,300) plaintext_document_stored_as = plaintext_document_url plaintext_document_last_accessed ='%d-%02d-%02dT01:01:01Z' % (2000 + (index % 10), (index % 12) + 1, (index % 25) + 1) plaintext_document_last_modified ='%d-%02d-%02dT01:01:01Z' % (2000 + (index % 10), (index % 12) + 1, (index % 25) + 1) plaintext_document_size = '%d' % (1 + (index % 1000000)) tools.addItem( me, plaintext_document_uri, nfo_PlainTextDocument % locals() )
def generateEmail(index): me = 'nmo#Email' email_uri = 'qmf://groove.nokia.com/email%d' % index email_mime = 'multipart/mixed' email_stored_as = 'urn:uuid:XX:%d' % index email_account = tools.getRandomUri( 'nmo#MailAccount' ) email_folder = tools.getRandomUri( 'nmo#MailFolder' ) email_size = str(index) email_to = tools.getRandomUri( 'nco#ContactEmail' ) email_id = str(index) email_subject = 'Subject %d' % (index % 1000) email_received = '%d-%02d-%02dT01:01:01Z' % (2000 + (index % 10), (index % 12) + 1, (index % 25) + 1) email_from = tools.getRandomUri( 'nco#ContactEmail' ) email_sent = '%d-%02d-%02dT01:01:02Z' % (2000 + (index % 10), (index % 12) + 1, (index % 25) + 1) email_content = gen.create_text(2,30) email_draft = 'false' email_deleted = 'false' tools.addItem( me, email_uri, nmo_Email % locals() )
def generateIMMessage(index): me = 'nmo#IMMessage' immessage_uri = 'urn:immessage:%d' % index immessage_content = 'Lorem IM Ipsum %d' % index immessage_date = tools.now immessage_modified = tools.now immessage_from = tools.getRandomUri( 'nco#ContactIM' ) immessage_to = tools.getRandomUri( 'nco#ContactIM' ) immessage_draft = ('false', 'true')[index % 2] immessage_read = ('false', 'true')[index % 2] immessage_sent = 'true' immessage_deleted = 'false' immessage_message_id = '%d' % index immessage_received = tools.now immessage_sent_date = tools.now immessage_channel_uri = tools.getRandomUri( 'nmo#CommunicationChannel' ) immessage_content = gen.create_text( 1, 2 ) tools.addItem( me, immessage_uri, nmo_IMMessage % locals() )
def generateIMMessage(index): me = 'nmo#IMMessage' immessage_uri = 'urn:immessage:%d' % index immessage_content = 'Lorem IM Ipsum %d' % index immessage_date = tools.now immessage_modified = tools.now immessage_from = tools.getRandomUri('nco#ContactIM') immessage_to = tools.getRandomUri('nco#ContactIM') immessage_draft = ('false', 'true')[index % 2] immessage_read = ('false', 'true')[index % 2] immessage_sent = 'true' immessage_deleted = 'false' immessage_message_id = '%d' % index immessage_received = tools.now immessage_sent_date = tools.now immessage_channel_uri = tools.getRandomUri('nmo#CommunicationChannel') immessage_content = gen.create_text(1, 2) tools.addItem(me, immessage_uri, nmo_IMMessage % locals())
def generateSMSMessage(index): me = 'nmo#SMSMessage' smsmessage_uri = 'urn:sms:%d' % index smsmessage_id = '%d' % index smsmessage_content = 'Lorem SMS Ipsum %d' % index smsmessage_date = tools.now smsmessage_modified = tools.now smsmessage_from = tools.getRandomUri( 'nco#PersonContact' ) smsmessage_to = tools.getRandomUri( 'nco#PersonContact' ) smsmessage_draft = ('false', 'true')[index % 2] smsmessage_read = ('false', 'true')[index % 2] smsmessage_sent = 'true' smsmessage_deleted = 'false' smsmessage_message_id = '%d' % index smsmessage_received = tools.now smsmessage_sent_date = tools.now smsmessage_channel_uri = tools.getRandomUri( 'nmo#CommunicationChannel' ) smsmessage_content = gen.create_text( 1, 5 ) tools.addItem( me, smsmessage_uri, nmo_SMSMessage % locals() )
def generateSMSMessage(index): me = 'nmo#SMSMessage' smsmessage_uri = 'urn:sms:%d' % index smsmessage_id = '%d' % index smsmessage_content = 'Lorem SMS Ipsum %d' % index smsmessage_date = tools.now smsmessage_modified = tools.now smsmessage_from = tools.getRandomUri('nco#PersonContact') smsmessage_to = tools.getRandomUri('nco#PersonContact') smsmessage_draft = ('false', 'true')[index % 2] smsmessage_read = ('false', 'true')[index % 2] smsmessage_sent = 'true' smsmessage_deleted = 'false' smsmessage_message_id = '%d' % index smsmessage_received = tools.now smsmessage_sent_date = tools.now smsmessage_channel_uri = tools.getRandomUri('nmo#CommunicationChannel') smsmessage_content = gen.create_text(1, 5) tools.addItem(me, smsmessage_uri, nmo_SMSMessage % locals())
def generateEmail(index): me = 'nmo#Email' email_uri = 'qmf://groove.nokia.com/email%d' % index email_mime = 'multipart/mixed' email_stored_as = 'urn:uuid:XX:%d' % index email_account = tools.getRandomUri('nmo#MailAccount') email_folder = tools.getRandomUri('nmo#MailFolder') email_size = str(index) email_to = tools.getRandomUri('nco#ContactEmail') email_id = str(index) email_subject = 'Subject %d' % (index % 1000) email_received = '%d-%02d-%02dT01:01:01Z' % (2000 + (index % 10), (index % 12) + 1, (index % 25) + 1) email_from = tools.getRandomUri('nco#ContactEmail') email_sent = '%d-%02d-%02dT01:01:02Z' % (2000 + (index % 10), (index % 12) + 1, (index % 25) + 1) email_content = gen.create_text(2, 30) email_draft = 'false' email_deleted = 'false' tools.addItem(me, email_uri, nmo_Email % locals())