Пример #1
0
def generateFeedChannel(index):
  me = 'mfo#FeedChannel'
  feed_channel_uri         = 'http://feed%d.feed.com/feed%d.rss' % (index % 1000, index)
  feed_channel_title       = 'Feed %d' % index
  feed_channel_description = 'Description %d' % (index % 1000)

  tools.addItem( me, feed_channel_uri, mfo_FeedChannel % locals() );
Пример #2
0
def generateMailFolder(index):
  me = 'nmo#MailFolder'
  mailfolder_uri     = 'qmf://groove.nokia.com/folder#%d' % index
  mailfolder_account = '<%s>' % tools.getRandomUri( 'nmo#MailAccount' )
  mailfolder_name    = 'Folder %d' % (index % 1000)

  tools.addItem( me, mailfolder_uri, nmo_MailFolder % locals() )
Пример #3
0
def generateEmailAddress(index):
    me = 'nco#EmailAddress'
    email_address = 'given%d.family%d@domain%d.com' % (index % 1000, index %
                                                       1000, index % 1000)
    email_address_uri = 'mailto:' + email_address

    tools.addItem(me, email_address_uri, nco_EmailAddress % locals())
Пример #4
0
def generateEquipment(index):
  me = 'nfo#Equipment'
  equipment_manufacturer = gen.create_equipment_manufacturer()
  equipment_model = gen.create_equipment_model(equipment_manufacturer)
  equipment_uri = 'urn:equipment:%s:%s:' % (equipment_manufacturer,equipment_model)

  tools.addItem( me, equipment_uri, nfo_Equipment % locals() )
Пример #5
0
def generateGeoLocation(index):
    me = 'slo#GeoLocation'
    geolocation_uri = 'urn:slogeoloc:%d' % index
    geolocation_comment = 'Comment geolocation %d' % index
    geolocation_altitude = '%f' % (index % 1000)

    geolocation_latitude = '%f' % (((index % 360) - 180) / 2.0)
    geolocation_longitude = '%f' % ((index % 720) / 4.0)
    geolocation_hacc = '3'
    geolocation_vacc = '3'
    geolocation_radius = '10'

    geolocation_latitudemax = '%f' % (((index % 700) - 340) / 4.0)
    geolocation_latitudemin = '%f' % (((index % 700) - 350) / 4.0)
    geolocation_longitudemax = '%f' % (((index % 350) + 10) / 2.0)
    geolocation_longitudemin = '%f' % (((index % 350)) / 2.0)

    geolocation_postaladdress = tools.getRandomUri('nco#PostalAddress')

    geolocation_saveas = (slo_GeoLocation_saveas_boundingbox % locals(),
                          slo_GeoLocation_saveas_point % locals(),
                          slo_GeoLocation_saveas_postaladdress %
                          locals())[index % 3]

    tools.addItem(me, geolocation_uri, slo_GeoLocation % locals())
Пример #6
0
def generateMusicPiece(index, discUri):
    me = 'nmm#MusicPiece'
    music_piece_uri = 'urn:music:%d' % index
    music_piece_title = 'Song %d' % index
    music_piece_size = str(index)
    music_piece_container = 'file://music/'
    music_piece_filename = 'Song_%d.mp3' % index
    music_piece_url = music_piece_container + music_piece_filename
    music_piece_mime = 'audio/mpeg'
    music_piece_date = '%d-%02d-%02dT01:01:01Z' % (2000 + (index % 10),
                                                   (index % 12) + 1,
                                                   (index % 25) + 1)
    music_piece_last_accessed = music_piece_date
    music_piece_last_modified = music_piece_date
    music_piece_codec = 'MPEG'
    music_piece_bitrate = '%d' % (16 + (index % 300))
    music_piece_genre = 'Genre %d' % (index % 1000)
    music_piece_channels = '2'
    music_piece_sample_rate = '44100.0'
    music_piece_album = tools.getLastUri('nmm#MusicAlbum')
    music_piece_artist = tools.getLastUri('nmm#Artist')
    music_piece_album_disk = discUri
    music_piece_length = '%d' % (1 + (index % 1000))
    music_piece_track = '%d' % (1 + (index % 100))

    tools.addItem(me, music_piece_uri, nmm_MusicPiece % locals())
Пример #7
0
def generateMailFolder(index):
    me = 'nmo#MailFolder'
    mailfolder_uri = 'qmf://groove.nokia.com/folder#%d' % index
    mailfolder_account = '<%s>' % tools.getRandomUri('nmo#MailAccount')
    mailfolder_name = 'Folder %d' % (index % 1000)

    tools.addItem(me, mailfolder_uri, nmo_MailFolder % locals())
Пример #8
0
def generateOwnEquipment():
  me = 'nfo#Equipment'
  equipment_manufacturer = 'NOKIA'
  equipment_model = ''
  equipment_uri = 'urn:equipment:%s:%s:' % (equipment_manufacturer,equipment_model)

  tools.addItem( me, equipment_uri, nfo_Equipment % locals() )  
Пример #9
0
def generateMailAccount(index):
    me = 'nmo#MailAccount'
    account_uri = 'qmf://groove.nokia.com/accounts#%d' % index
    account_from_address_uri = '<from:%d>' % index
    account_name = 'Account %d' % (index % 1000)
    account_signature = 'Signature %d' % (index % 1000)

    tools.addItem(me, account_uri, nmo_MailAccount % locals())
Пример #10
0
def generateIMAddress(index):
    me = 'nco#IMAddress'
    im_address_uri = 'urn:ima:%d' % index
    im_address_imid = 'IM ID %d' % (index % 1000)
    im_address_capability = '<%s>' % ('nco:im-capability-text-chat',
                                      'nco:im-capability-audio-calls')[index %
                                                                       2]
    tools.addItem(me, im_address_uri, nco_IMAddress % locals())
Пример #11
0
def generateGeoPoint(index):
  me = 'mlo#GeoPoint'
  geopoint_uri             = 'urn:geopoint:%d' % index
  geopoint_latitude        = '%f' % (((index % 360) - 180)/2.0)
  geopoint_longitude       = '%f' % ((index % 720)/4.0)
  geopoint_altitude        = '%f' % (index % 1000)

  tools.addItem( me, geopoint_uri, mlo_GeoPoint % locals() )
Пример #12
0
def generateEquipment(index):
    me = 'nfo#Equipment'
    equipment_manufacturer = gen.create_equipment_manufacturer()
    equipment_model = gen.create_equipment_model(equipment_manufacturer)
    equipment_uri = 'urn:equipment:%s:%s:' % (equipment_manufacturer,
                                              equipment_model)

    tools.addItem(me, equipment_uri, nfo_Equipment % locals())
Пример #13
0
def generateFeedChannel(index):
    me = 'mfo#FeedChannel'
    feed_channel_uri = 'http://feed%d.feed.com/feed%d.rss' % (index % 1000,
                                                              index)
    feed_channel_title = 'Feed %d' % index
    feed_channel_description = 'Description %d' % (index % 1000)

    tools.addItem(me, feed_channel_uri, mfo_FeedChannel % locals())
Пример #14
0
def generateMusicAlbumDisc(index):
    me = 'nmm#MusicAlbumDisc'
    album_disc_uri = 'urn:album-disk:%d' % index
    album_disc_name = 'Album Disc %d' % (index % 1000)

    tools.addItem(me, album_disc_uri, nmm_MusicAlbumDisc % locals())

    return album_disc_uri
Пример #15
0
def generateOwnEquipment():
    me = 'nfo#Equipment'
    equipment_manufacturer = 'NOKIA'
    equipment_model = ''
    equipment_uri = 'urn:equipment:%s:%s:' % (equipment_manufacturer,
                                              equipment_model)

    tools.addItem(me, equipment_uri, nfo_Equipment % locals())
Пример #16
0
def generateMailAccount(index):
  me = 'nmo#MailAccount'
  account_uri              = 'qmf://groove.nokia.com/accounts#%d' % index
  account_from_address_uri = '<from:%d>' % index
  account_name             = 'Account %d' % (index % 1000)
  account_signature        = 'Signature %d' % (index % 1000)

  tools.addItem( me, account_uri, nmo_MailAccount % locals() )
Пример #17
0
def generateLandmark(index):
  me = 'slo#Landmark'
  landmark_uri             = 'urn:slolandmark:%d' % index
  landmark_title           = 'Landmark %d' % index
  landmark_description     = 'Landmark %d description' % index
  landmark_location        = tools.getLastUri( 'slo#GeoLocation' )

  tools.addItem( me, landmark_uri, slo_Landmark % locals() )
Пример #18
0
def generateLandmark(index):
    me = 'slo#Landmark'
    landmark_uri = 'urn:slolandmark:%d' % index
    landmark_title = 'Landmark %d' % index
    landmark_description = 'Landmark %d description' % index
    landmark_location = tools.getLastUri('slo#GeoLocation')

    tools.addItem(me, landmark_uri, slo_Landmark % locals())
Пример #19
0
def generateMusicAlbumDisc(index):
  me = 'nmm#MusicAlbumDisc'
  album_disc_uri = 'urn:album-disk:%d' % index
  album_disc_name = 'Album Disc %d' % (index % 1000)

  tools.addItem( me, album_disc_uri, nmm_MusicAlbumDisc % locals() )

  return album_disc_uri
Пример #20
0
def generateContactCall(index):
  me = 'nco#ContactCall'
  callcontact_uri              = 'urn:contact:call%d' % index
  callcontact_name_given       = 'Given%d' % (index % 1000)
  callcontact_name_family      = 'Family%d' % (index % 1000)
  callcontact_nickname         = 'Nickname%d' % (index % 1000)
  callcontact_phonenumber_uri  = '<%s>' % tools.getLastUri( 'nco#PhoneNumber' )

  tools.addItem( me, callcontact_uri, nco_Contact_Call % locals() )
Пример #21
0
def generateContactEmail(index):
  me = 'nco#ContactEmail'
  emailcontact_uri              = 'urn:contact:email%d' % index
  emailcontact_name_given       = 'Given%d' % (index % 1000)
  emailcontact_name_family      = 'Family%d' % (index % 1000)
  emailcontact_nickname         = 'Nickname%d' % (index % 1000)
  emailcontact_email_address_uri= '<%s>' % tools.getLastUri( 'nco#EmailAddress' )

  tools.addItem( me, emailcontact_uri, nco_Contact_Email % locals() )
Пример #22
0
def generateFeedMessage(index):
  me = 'mfo#FeedMessage'
  feed_message_uri         = 'http://feed%d.feed.com/message%d.html' % (index % 1000, index)
  feed_message_title       = 'Message %d' % index
  feed_message_description = 'Description %d' % (index % 1000)
  feed_message_comment     = 'Comment %d' % index
  feed_message_channel     = tools.getLastUri( 'mfo#FeedChannel' )

  tools.addItem( me, feed_message_uri, mfo_FeedMessage % locals() )
Пример #23
0
def generateContactIM(index):
  me = 'nco#ContactIM'
  imcontact_uri              = 'urn:contact:im%d' % index
  imcontact_name_given       = 'Given%d' % (index % 1000)
  imcontact_name_family      = 'Family%d' % (index % 1000)
  imcontact_nickname         = 'Nickname%d' % (index % 1000)
  imcontact_imaddress_uri    = '<%s>' % tools.getLastUri( 'nco#IMAddress' )

  tools.addItem( me, imcontact_uri, nco_Contact_IM % locals() )
Пример #24
0
def generateContactCall(index):
    me = 'nco#ContactCall'
    callcontact_uri = 'urn:contact:call%d' % index
    callcontact_name_given = 'Given%d' % (index % 1000)
    callcontact_name_family = 'Family%d' % (index % 1000)
    callcontact_nickname = 'Nickname%d' % (index % 1000)
    callcontact_phonenumber_uri = '<%s>' % tools.getLastUri('nco#PhoneNumber')

    tools.addItem(me, callcontact_uri, nco_Contact_Call % locals())
Пример #25
0
def generateContactIM(index):
    me = 'nco#ContactIM'
    imcontact_uri = 'urn:contact:im%d' % index
    imcontact_name_given = 'Given%d' % (index % 1000)
    imcontact_name_family = 'Family%d' % (index % 1000)
    imcontact_nickname = 'Nickname%d' % (index % 1000)
    imcontact_imaddress_uri = '<%s>' % tools.getLastUri('nco#IMAddress')

    tools.addItem(me, imcontact_uri, nco_Contact_IM % locals())
Пример #26
0
def generateCommunicationChannel(index):
    me = 'nmo#CommunicationChannel'
    channel_uri = 'urn:channel:%d' % index
    channel_subject = '/org/freedesktop/Telepathy/Account/gabble/jabber/dut_40localhost0'
    channel_date = tools.now
    channel_modified = channel_date
    channel_last_message = channel_date
    channel_participant = tools.getRandomUri('nco#PersonContact')

    tools.addItem(me, channel_uri, nmo_CommunicationChannel % locals())
Пример #27
0
def generateContactEmail(index):
    me = 'nco#ContactEmail'
    emailcontact_uri = 'urn:contact:email%d' % index
    emailcontact_name_given = 'Given%d' % (index % 1000)
    emailcontact_name_family = 'Family%d' % (index % 1000)
    emailcontact_nickname = 'Nickname%d' % (index % 1000)
    emailcontact_email_address_uri = '<%s>' % tools.getLastUri(
        'nco#EmailAddress')

    tools.addItem(me, emailcontact_uri, nco_Contact_Email % locals())
Пример #28
0
def generateCommunicationChannel(index):
  me = 'nmo#CommunicationChannel'
  channel_uri          = 'urn:channel:%d' % index
  channel_subject      = '/org/freedesktop/Telepathy/Account/gabble/jabber/dut_40localhost0'
  channel_date         = tools.now
  channel_modified     = channel_date
  channel_last_message = channel_date
  channel_participant  = tools.getRandomUri( 'nco#PersonContact' )

  tools.addItem( me, channel_uri, nmo_CommunicationChannel % locals() )
Пример #29
0
def generateAlarm(index):
  me = 'ncal#Alarm'
  alarm_uri          = 'urn:x-ical:alarm%d' % index
  alarm_repeat       = '%d' % ( 3600 *  ((index % 10) + 1) )
  alarm_duration     = '%d' % ( 1 + (index % 10) )
  alarm_trigger_date = '%d-%02d-%02dT%02d:%02d:%02dZ' % (1900 + (index % 100), (index % 12) + 1, (index % 25) + 1, (index % 12) + 1, (index % 12) + 1, (index % 12) + 1)
  alarm_subject      = 'Subject %d' % index
  alarm_description  = 'Description %d' % index

  tools.addItem( me, alarm_uri, ncal_Alarm % locals() )
Пример #30
0
def generateTransferElement(index):
  me = 'mto#TransferElement'
  transfer_uri         = 'http://www.sopranolive.org/contexts/tracker/generated_unique_id/%d' % (index % 1000)
  transfer_source      = tools.getRandomUri( 'nmm#Photo' )
  transfer_destination = 'http://www.uploadsite%d.com/item%d' % (index % 100, index )
  transfer_started     = tools.now
  transfer_completed   = tools.now
  transfer_state       = 'http://www.tracker-project.org/temp/mto#state-done'

  tools.addItem( me, transfer_uri, mto_TransferElement % locals() )
Пример #31
0
def generateFeedMessage(index):
    me = 'mfo#FeedMessage'
    feed_message_uri = 'http://feed%d.feed.com/message%d.html' % (index % 1000,
                                                                  index)
    feed_message_title = 'Message %d' % index
    feed_message_description = 'Description %d' % (index % 1000)
    feed_message_comment = 'Comment %d' % index
    feed_message_channel = tools.getLastUri('mfo#FeedChannel')

    tools.addItem(me, feed_message_uri, mfo_FeedMessage % locals())
Пример #32
0
def generateTodo(index):
    me = 'ncal#Todo'
    todo_uri = 'urn:todo::%d' % index
    todo_uid = '%d' % index
    todo_summary = 'Todo %d' % index
    todo_created = tools.now
    todo_modified = todo_created
    alarm_uri = tools.getRandomUri('ncal#Alarm')
    calendar_uri = tools.getRandomUri('ncal#Calendar')

    tools.addItem(me, todo_uri, ncal_Todo % locals())
Пример #33
0
def generateTodo(index):
  me = 'ncal#Todo'
  todo_uri      = 'urn:todo::%d' % index
  todo_uid      = '%d' % index
  todo_summary  = 'Todo %d' % index
  todo_created  = tools.now
  todo_modified = todo_created
  alarm_uri     = tools.getRandomUri( 'ncal#Alarm' )
  calendar_uri  = tools.getRandomUri( 'ncal#Calendar' )

  tools.addItem( me, todo_uri, ncal_Todo % locals() )
Пример #34
0
def generateWebHistory(index):
  me = 'nfo#WebHistory'
  webhistory_uri       = 'urn:webhistory:%d' % index
  webhistory_title     = 'Web history %d' % (index % 1000)
  webhistory_date      = tools.now
  webhistory_created   = webhistory_date
  webhistory_modified  = webhistory_date
  webhistory_counter   = '%d' % (index % 10)
  webhistory_url       = 'http://www.%d.com/' % index

  tools.addItem( me, webhistory_uri, nfo_WebHistory % locals() )
Пример #35
0
def generatePostalAddress(index):
  me = 'nco#PostalAddress'
  postal_address_uri         = 'urn:pa:%d' % index
  postal_address_country     = 'Country %d' % (index % 1000)
  postal_address_locality    = 'Locality %d' % (index % 1000)
  postal_address_pobox       = str(index)
  postal_address_region      = 'Region %d' % (index % 1000)
  postal_address_postal_code = '%05d' % (index % 100000)
  postal_address_city        = 'City %d' % (index % 1000)
  postal_address_street      = 'Demo Street %d' % (index % 100)

  tools.addItem( me, postal_address_uri, nco_PostalAddress % locals() )
Пример #36
0
def generateTransferElement(index):
    me = 'mto#TransferElement'
    transfer_uri = 'http://www.sopranolive.org/contexts/tracker/generated_unique_id/%d' % (
        index % 1000)
    transfer_source = tools.getRandomUri('nmm#Photo')
    transfer_destination = 'http://www.uploadsite%d.com/item%d' % (index % 100,
                                                                   index)
    transfer_started = tools.now
    transfer_completed = tools.now
    transfer_state = 'http://www.tracker-project.org/temp/mto#state-done'

    tools.addItem(me, transfer_uri, mto_TransferElement % locals())
Пример #37
0
def generatePostalAddress(index):
    me = 'nco#PostalAddress'
    postal_address_uri = 'urn:pa:%d' % index
    postal_address_country = 'Country %d' % (index % 1000)
    postal_address_locality = 'Locality %d' % (index % 1000)
    postal_address_pobox = str(index)
    postal_address_region = 'Region %d' % (index % 1000)
    postal_address_postal_code = '%05d' % (index % 100000)
    postal_address_city = 'City %d' % (index % 1000)
    postal_address_street = 'Demo Street %d' % (index % 100)

    tools.addItem(me, postal_address_uri, nco_PostalAddress % locals())
Пример #38
0
def generateSoftwareApplication(index):
  me = 'nfo#SoftwareApplication'
  application_cmdline       = 'app%d' % index
  application_filename      = application_cmdline + '.desktop'
  application_uri           = 'file://applications/' + application_filename
  application_title         = 'Application %d' % index
  application_part_of       = tools.getRandomUri( 'nfo#SoftwareCategory' )
  application_url           = application_uri
  application_datasource    = tools.getRandomUri( 'tracker#Volume' )
  application_last_modified = '%d-%02d-%02dT01:01:01Z' % (2000 + (index % 10), (index % 12) + 1, (index % 25) + 1)
  application_icon          = 'urn:theme-icon:Icon-%d' % index

  tools.addItem( me, application_uri, nfo_SoftwareApplication % locals() )
Пример #39
0
def generateGeoLocation(index):
  me = 'mlo#GeoLocation'
  geolocation_uri                     = 'urn:geolocation:%d' % index

  geolocation_geopoint                = tools.getLastUri( 'mlo#GeoPoint' )
  geolocation_boundingbox             = tools.getLastUri( 'mlo#LocationBoundingBox' )
  geolocation_postaladdress           = tools.getRandomUri( 'nco#PostalAddress' )

  geolocation_saveas                  = (mlo_GeoLocation_saveas_boundingbox % locals(), mlo_GeoLocation_saveas_geopoint % locals(), mlo_GeoLocation_saveas_postaladdress % locals()) [ index %3 ]

  geolocation_comment                 = 'geolocation %d' % index

  tools.addItem( me, geolocation_uri, mlo_GeoLocation % locals() )
Пример #40
0
def generateVideo(index):
  me = 'nmm#Video'
  video_uri          = 'urn:video:%d' % index
  video_filename     = 'video%d.jpg' % index
  video_url          = 'file:///path/' + video_filename
  video_size         = str(1000000 + index)
  video_date         = '%d-%02d-%02dT01:01:01Z' % (2000 + (index % 10), (index % 12) + 1, (index % 25) + 1)
  video_equipment    = tools.getRandomUri( 'nfo#Equipment' )
  video_samplerate   = str(index)
  video_duration     = str(index)
  video_tag          = ('TEST', 'nomatch') [index %2]

  tools.addItem( me, video_uri, nmm_Video % locals() )
Пример #41
0
def generateEvent(index):
  me = 'ncal#Event'
  event_uri      = 'urn:x-ical:%d' % index
  event_uid      = '%d' % index
  event_start    = '%d-%02d-%02dT09:00:00Z' % (2010 + (index % 5), (index % 12) + 1, (index % 25) + 1)
  event_end      = '%d-%02d-%02dT17:00:00Z' % (2010 + (index % 5), (index % 12) + 1, (index % 25) + 1)
  event_summary  = 'Event %d' % index
  event_created  = tools.now
  event_modified = event_created
  alarm_uri      = tools.getLastUri( 'ncal#Alarm' )
  calendar_uri   = tools.getRandomUri( 'ncal#Calendar' )

  tools.addItem( me, event_uri, ncal_Event % locals() )
Пример #42
0
def generatePhoto(index):
  me = 'nmm#Photo'
  photo_uri          = 'urn:photo:%d' % index
  photo_filename     = 'photo%d.jpg' % index
  photo_url          = 'file:///path/' + photo_filename
  photo_size         = str(1000000 + index)
  photo_equipment    = tools.getRandomUri( 'nfo#Equipment' )
  photo_exposure     = '0.%d' % index
  photo_fnumber      = '%d.0' % (1 + (index % 20))
  photo_focal_length = '%d.0' % (1 + (index % 500))
  photo_date         = '%d-%02d-%02dT%02d:01:01Z' % (1100 + (index % 997), (index % 12) + 1, (index % 31) + 1, (index %24))
  photo_tag          = ('TEST', 'nomatch') [index %2]

  tools.addItem( me, photo_uri, nmm_Photo % locals() )
Пример #43
0
def generateUploadTransfer(index):
  me = 'mto#UploadTransfer'
  upload_uri     = 'mtransfer://%d' % index
  upload_state   = 'http://www.tracker-project.org/temp/mto#state-done'
  upload_method  = 'http://www.tracker-project.org/temp/mto#transfer-method-web'
  upload_created = tools.now
  upload_account = ('picasa', 'flickr', 'facebook', 'youtube')[ index % 4 ]

  # add some random transfers
  upload_transfers = ''
  for index in xrange (1, 2 + (index % 10)):
    upload_transfers += 'mto:transferList <%s> ;\n' % tools.getRandomUri( 'mto#TransferElement' )

  tools.addItem( me, upload_uri, mto_UploadTransfer % locals() )
Пример #44
0
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() )
Пример #45
0
def generateUploadTransfer(index):
    me = 'mto#UploadTransfer'
    upload_uri = 'mtransfer://%d' % index
    upload_state = 'http://www.tracker-project.org/temp/mto#state-done'
    upload_method = 'http://www.tracker-project.org/temp/mto#transfer-method-web'
    upload_created = tools.now
    upload_account = ('picasa', 'flickr', 'facebook', 'youtube')[index % 4]

    # add some random transfers
    upload_transfers = ''
    for index in xrange(1, 2 + (index % 10)):
        upload_transfers += 'mto:transferList <%s> ;\n' % tools.getRandomUri(
            'mto#TransferElement')

    tools.addItem(me, upload_uri, mto_UploadTransfer % locals())
Пример #46
0
def generateLocationBoundingBox(index):
  me = 'mlo#LocationBoundingBox'
  boundingbox_uri             = 'urn:boundingbox:%d' % index

  boundingbox_geopoint_se_uri             = 'urn:boundingbox:se:%d' % index
  boundingbox_geopoint_se_latitude        = '%f' % (((index % 700) - 350)/4.0)
  boundingbox_geopoint_se_longitude       = '%f' % (((index % 350) + 10) /2.0)
  boundingbox_geopoint_se_altitude        = '%f' % (index % 1000)

  boundingbox_geopoint_nw_uri             = 'urn:boundingbox:nw:%d' % index
  boundingbox_geopoint_nw_latitude        = '%f' % (((index % 700) - 340)/4.0)
  boundingbox_geopoint_nw_longitude       = '%f' % (((index % 350))/2.0)
  boundingbox_geopoint_nw_altitude        = '%f' % (index % 1000)

  tools.addItem( me, boundingbox_uri, mlo_LocationBoundingBox % locals() )
Пример #47
0
def generateCall(index):
  me = 'nmo#Call'
  call_uri         = 'urn:call:%d' % index
  call_subject     = 'Subject %d' % index
  call_date        = tools.now
  call_modified    = tools.now
  call_from        = tools.getRandomUri( 'nco#ContactCall' )
  call_to          = tools.getRandomUri( 'nco#ContactCall' )
  call_read        = 'true'
  call_sent        = 'true'
  call_received    = tools.now
  call_sent_date   = tools.now
  call_duration    = '%d' % ( 10 + (index % 3600) )

  tools.addItem( me, call_uri, nmo_Call % locals() )
Пример #48
0
def generateCall(index):
    me = 'nmo#Call'
    call_uri = 'urn:call:%d' % index
    call_subject = 'Subject %d' % index
    call_date = tools.now
    call_modified = tools.now
    call_from = tools.getRandomUri('nco#ContactCall')
    call_to = tools.getRandomUri('nco#ContactCall')
    call_read = 'true'
    call_sent = 'true'
    call_received = tools.now
    call_sent_date = tools.now
    call_duration = '%d' % (10 + (index % 3600))

    tools.addItem(me, call_uri, nmo_Call % locals())
Пример #49
0
def generateVideo(index):
    me = 'nmm#Video'
    video_uri = 'urn:video:%d' % index
    video_filename = 'video%d.jpg' % index
    video_url = 'file:///path/' + video_filename
    video_size = str(1000000 + index)
    video_date = '%d-%02d-%02dT01:01:01Z' % (2000 + (index % 10),
                                             (index % 12) + 1,
                                             (index % 25) + 1)
    video_equipment = tools.getRandomUri('nfo#Equipment')
    video_samplerate = str(index)
    video_duration = str(index)
    video_tag = ('TEST', 'nomatch')[index % 2]

    tools.addItem(me, video_uri, nmm_Video % locals())
Пример #50
0
def generateEvent(index):
    me = 'ncal#Event'
    event_uri = 'urn:x-ical:%d' % index
    event_uid = '%d' % index
    event_start = '%d-%02d-%02dT09:00:00Z' % (2010 + (index % 5),
                                              (index % 12) + 1,
                                              (index % 25) + 1)
    event_end = '%d-%02d-%02dT17:00:00Z' % (2010 + (index % 5),
                                            (index % 12) + 1, (index % 25) + 1)
    event_summary = 'Event %d' % index
    event_created = tools.now
    event_modified = event_created
    alarm_uri = tools.getLastUri('ncal#Alarm')
    calendar_uri = tools.getRandomUri('ncal#Calendar')

    tools.addItem(me, event_uri, ncal_Event % locals())
Пример #51
0
def generatePhoto(index):
    me = 'nmm#Photo'
    photo_uri = 'urn:photo:%d' % index
    photo_filename = 'photo%d.jpg' % index
    photo_url = 'file:///path/' + photo_filename
    photo_size = str(1000000 + index)
    photo_equipment = tools.getRandomUri('nfo#Equipment')
    photo_exposure = '0.%d' % index
    photo_fnumber = '%d.0' % (1 + (index % 20))
    photo_focal_length = '%d.0' % (1 + (index % 500))
    photo_date = '%d-%02d-%02dT%02d:01:01Z' % (1100 + (index % 997),
                                               (index % 12) + 1,
                                               (index % 31) + 1, (index % 24))
    photo_tag = ('TEST', 'nomatch')[index % 2]

    tools.addItem(me, photo_uri, nmm_Photo % locals())
Пример #52
0
def generateAlarm(index):
    me = 'ncal#Alarm'
    alarm_uri = 'urn:x-ical:alarm%d' % index
    alarm_repeat = '%d' % (3600 * ((index % 10) + 1))
    alarm_duration = '%d' % (1 + (index % 10))
    alarm_trigger_date = '%d-%02d-%02dT%02d:%02d:%02dZ' % (1900 +
                                                           (index % 100),
                                                           (index % 12) + 1,
                                                           (index % 25) + 1,
                                                           (index % 12) + 1,
                                                           (index % 12) + 1,
                                                           (index % 12) + 1)
    alarm_subject = 'Subject %d' % index
    alarm_description = 'Description %d' % index

    tools.addItem(me, alarm_uri, ncal_Alarm % locals())
Пример #53
0
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())
Пример #54
0
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() )
Пример #55
0
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() )
Пример #56
0
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())
Пример #57
0
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() )