Пример #1
0
class ArchiveFileSearchSchema(colander.MappingSchema):
    ead_id = el('string')
    archiveFile = el('string')
    archive_id = el('int')
    archivefile_id = el('string')
    has_scans = el('boolean')
    status = el('int')

    start = el('int', default=0)
    limit = el('int', default=1000)
Пример #2
0
class SearchSchema(colander.MappingSchema):
    user = el('string')
    date_from = el('datetime')
    date_to = el('datetime')
    object_id = el('string')
    object_type = el('string', validator=colander.OneOf(['scan', 'ead']))
    message = el('string', validator=colander.OneOf(
        ["create", "update", "move", "delete"]))
    start = el('int', default=0)
    limit = el('int', default=1000)
    order_by = el('string', default='date', missing='date')
    order_dir = colander.SchemaNode(colander.String(),
        validator=colander.OneOf(['ASC', 'DESC']),
        missing='ASC', default='ASC')
Пример #3
0
class EadSearchSchema(colander.MappingSchema):
    archive = el('string')
    archive_id = el('string')
    country = el('string')
    findingaid = el('string')
    institution = el('string')
    language = el('string')
Пример #4
0
class ArchiveFileGetSchema(colander.MappingSchema):
    # parameters to pass to GET archiveFile
    archive_id = el('int')
    archiveFile = el('string')
Пример #5
0
class ArchiveFilePutSchema(colander.MappingSchema):
    # parameters for "PUT" archiveFile
    status = el('int')
    user = el('string')
Пример #6
0
class EadSchema(colander.MappingSchema):
    user = el('string')
    status = colander.SchemaNode(colander.Int(),
                                 validator=colander.OneOf([0, 1, 2]),
                                 missing=1,
                                 default=1)
Пример #7
0
class ArchiveSchema(colander.MappingSchema):
    archive = el('string')
    archive_description = el('string')
    country_code = el('string')
    institution = el('string')
    institution_description = el('string')
Пример #8
0
class ComponentSearchSchema(colander.MappingSchema):
    archive = el('string')
    archiveFile = el('string')
    archive_id = el('int')
    contains_text = el('string')
    country = el('string')
    date_from = el('date')
    date_to = el('date')
    ead_id = el('string')
    findingaid = el('string')
    institution = el('string')
    is_archiveFile = el('boolean')
    is_component = el('boolean')
    language = el('string')
    limit = el('int', default=1000)
    order_by = el('string')
    start = el('int', default=0)
    xpath = el('string')
Пример #9
0
class GetComponentForViewerSchema(colander.MappingSchema):
    ead_id = el('string', required=True)
    xpath = el('string', required=False)
    archiveFile = el('string', required=False)
    show_in_tree = el('boolean')
Пример #10
0
class ComponentTreeSearchSchema(colander.MappingSchema):
    ead_id = el('string', required=True)
    # is_component has default True mostly for reasons of backwards compatility
    is_component = el('boolean', default=True)
    prune = el('boolean', default=True)