Esempio n. 1
0
def create_project(with_datasets=False, with_images=False):
    project = ProjectI()
    project.id = rlong(1L)
    project.name = rstring("the_name")
    project.description = rstring("the_description")
    dataset_count = 2

    if not with_datasets:
        return project
    for dataset_id in range(0, dataset_count):
        dataset = DatasetI()
        dataset.id = rlong(dataset_id + 1)
        dataset.name = rstring("dataset_name_%d" % (dataset_id + 1))
        dataset.description = rstring("dataset_description_%d" % (dataset_id + 1))
        project.linkDataset(dataset)
        if not with_images:
            continue
        for image_id in range(1, 3):
            image_id = (dataset_id * dataset_count) + image_id
            dataset.linkImage(create_image(image_id))
    return project
Esempio n. 2
0
def create_project(with_datasets=False, with_images=False):
    project = ProjectI()
    project.id = rlong(1)
    project.name = rstring('the_name')
    project.description = rstring('the_description')
    dataset_count = 2

    if not with_datasets:
        return project
    for dataset_id in range(0, dataset_count):
        dataset = DatasetI()
        dataset.id = rlong(dataset_id + 1)
        dataset.name = rstring('dataset_name_%d' % (dataset_id + 1))
        dataset.description = rstring('dataset_description_%d' %
                                      (dataset_id + 1))
        project.linkDataset(dataset)
        if not with_images:
            continue
        for image_id in range(1, 3):
            image_id = (dataset_id * dataset_count) + image_id
            dataset.linkImage(create_image(image_id))
    return project
def project():
    o = ProjectI()
    o.id = rlong(1L)
    o.name = rstring('the_name')
    o.description = rstring('the_description')
    return o
Esempio n. 4
0
def project():
    o = ProjectI()
    o.id = rlong(1L)
    o.name = rstring('the_name')
    o.description = rstring('the_description')
    return o