Example #1
0
class Description(StructuredNode):
    """
    Wrapper for the description of a creation.

    Attributes:
        text              Textual descriptions include synopses, plot
                          summaries, reviews, transcripts or shot lists.
                          They can occur in more than one language and they can
                          have statements of authorship or references to
                          external resources.
        language          The language of the description text.
        description_type  A keyword denoting the type of description.
        source_ref        Either the name of the institution, or an URI
                          identifying the source directly or via a reference
                          system such as an on-line catalogue.
    """
    text = StringProperty(index=True, required=True, show=True)
    language = StringProperty(choices=codelists.LANGUAGE, show=True)
    description_type = StringProperty(choices=codelists.DESCRIPTION_TYPES,
                                      show=True)
    source_ref = StringProperty(show=True)
    creation = RelationshipFrom('Creation',
                                'HAS_DESCRIPTION',
                                cardinality=One,
                                show=True)
Example #2
0
class Provider(IdentifiedNode):
    """
    name         The name of the archive supplying the record.
    identifier   An unambiguous reference to the archive supplying the record.
    scheme       Name of the registration scheme encoding the institution name
                 ("ISIL code" or "Institution acronym")
    address      The address of the archive
    phone        The phone number of the archive
    fax          The fax number of the archive
    website      The website of the archive
    email        The email of the archive
    city         The city which the items refer to
    """
    name = StringProperty(index=True, required=True, show=True)
    identifier = StringProperty(required=True, show=True)
    scheme = StringProperty(choices=codelists.PROVIDER_SCHEMES,
                            required=True,
                            show=True)
    address = StringProperty(required=False, show=True)
    phone = StringProperty(required=False, show=True)
    fax = StringProperty(required=False, show=True)
    website = StringProperty(required=False, show=True)
    email = EmailProperty(required=False, show=True)
    city = StringProperty(required=False, show=True)
    record_source = RelationshipFrom('RecordSource',
                                     'RECORD_SOURCE',
                                     cardinality=ZeroOrMore)
Example #3
0
class Keyword(StructuredNode):
    """
    A term or set of vocabulary terms describing the content of a creation.
    This can be keywords or other vocabularies to describe subjects. Controlled
    and uncontrolled terms can be used together, but not within a single set of
    terms. Likewise, if more than one controlled vocabulary is used, then terms
    from each of these must be contained in a separate instance of this
    element. A separate instance is also required for each language if terms in
    more than one language are taken from a multilingual vocabulary.

    Attributes:
        term            The term value. This can be the textual value of the
                        term. For non-textual terms the classification codes,
                        preferably a combination of the code and the verbal
                        class description should be indicated.
        termID          A non-text identifier that can be combined with the
                        scheme ID from a unique resource identifier for the
                        term within a controlled vocabulary.
        keyword_type    Type of information described by the keywords.
        language        The language of the content of each subject.
        schemeID        A unique identifier denoting the controlled vocabulary
                        (preferably URI). If the subject terms are not from a
                        controlled vocabulary, the value of this element should
                        be set to "uncontrolled".
    """
    term = StringProperty(index=True, required=True, show=True)
    termID = IntegerProperty(show=True)
    keyword_type = StringProperty(choices=codelists.KEYWORD_TYPES, show=True)
    language = StringProperty(choices=codelists.LANGUAGE, show=True)
    schemeID = StringProperty(show=True)
    creation = RelationshipFrom('Creation',
                                'HAS_KEYWORD',
                                cardinality=One,
                                show=True)
Example #4
0
class ResourceBody(AnnotationBody):
    iri = StringProperty(required=True, index=True, show=True)
    name = StringProperty(index=True, show=True)
    spatial = ArrayProperty(FloatProperty(), show=True)  # [lat, long]
    detected_objects = RelationshipFrom('ODBody',
                                        'CONCEPT',
                                        cardinality=ZeroOrMore)
Example #5
0
class VideoFormat(StructuredNode):
    """
    The description of the physical artefact or digital file on which an
    audiovisual manifestation is fixed.

    Attributes:
        gauge           The width of the film stock or other carrier (such as
                        magnetic tape) used for the manifestation.
        aspect_ratio    The ratio between width and height of the image (e.g.
                        "full frame", "cinemascope", "1:1,33").
        sound           Element from values list.
        colour          Element from values list.
    """
    gauge = StringProperty(choices=codelists.GAUGE, show=True)
    aspect_ratio = StringProperty(choices=codelists.ASPECT_RATIO, show=True)
    sound = StringProperty(choices=codelists.VIDEO_SOUND, show=True)
    colour = StringProperty(choices=codelists.COLOUR, show=True)
    creation = RelationshipFrom('AVEntity',
                                'VIDEO_FORMAT',
                                cardinality=One,
                                show=True)

    def __str__(self):
        return "VideoFormat: [gauge: {}, aspect_ratio: {}, sound: {}; colour {}]".format(
            self.gauge, self.aspect_ratio, self.sound, self.colour)
Example #6
0
class Group(IdentifiedNode):
    fullname = StringProperty(required=True, unique_index=True, show=True)
    shortname = StringProperty(required=True, unique_index=True, show=True)

    members = RelationshipFrom('User',
                               'BELONGS_TO',
                               cardinality=ZeroOrMore,
                               show=True)
    coordinator = RelationshipFrom('User',
                                   'PI_FOR',
                                   cardinality=ZeroOrMore,
                                   show=True)
    stage_files = RelationshipFrom('Stage',
                                   'IS_OWNED_BY',
                                   cardinality=ZeroOrMore,
                                   show=False)
Example #7
0
class VideoSegment(IdentifiedNode, AnnotationTarget):
    """Video Segment"""
    start_frame_idx = IntegerProperty(required=True, show=True)
    end_frame_idx = IntegerProperty(required=True, show=True)
    annotation_body = RelationshipFrom('TVSBody',
                                       'SEGMENT',
                                       cardinality=ZeroOrMore)
    within_shots = RelationshipTo('Shot', 'WITHIN_SHOT', cardinality=OneOrMore)
Example #8
0
class Shot(VideoSegment):
    """Shot class"""
    shot_num = IntegerProperty(required=True, show=True)
    frame_uri = StringProperty()
    thumbnail_uri = StringProperty()
    timestamp = StringProperty(show=True)
    duration = FloatProperty(show=True)
    revision_confirmed = BooleanProperty(default=False, show=True)
    revision_check = BooleanProperty(default=False, show=True)
    item = RelationshipFrom('Item', 'SHOT', cardinality=One)
    embedded_segments = RelationshipFrom('VideoSegment',
                                         'WITHIN_SHOT',
                                         cardinality=ZeroOrMore)
    revised_by = RelationshipTo('User',
                                'REVISED_BY',
                                cardinality=ZeroOrMore,
                                model=RevisionRel)
Example #9
0
class Token(StructuredNode):
    jti = StringProperty(required=True, unique_index=True)
    token = StringProperty(required=True, unique_index=True)
    token_type = StringProperty()
    creation = DateTimeProperty(required=True)
    expiration = DateTimeProperty()
    last_access = DateTimeProperty()
    IP = StringProperty()
    hostname = StringProperty()
    emitted_for = RelationshipFrom('User', 'HAS_TOKEN', cardinality=ZeroOrOne)
Example #10
0
class ExternalAccounts(StructuredNode):
    username = StringProperty(required=True, unique_index=True)
    token = StringProperty(required=True)
    email = StringProperty()
    certificate_cn = StringProperty()
    proxyfile = StringProperty()
    description = StringProperty(default='No description')
    main_user = RelationshipFrom(User,
                                 'HAS_AUTHORIZATION',
                                 cardinality=OneOrMore)
Example #11
0
class User(UserBase):

    declared_institution = StringProperty(required=False,
                                          show=True,
                                          default="none")
    items = RelationshipFrom('Item', 'IS_OWNED_BY', cardinality=ZeroOrMore)
    annotations = RelationshipFrom('Annotation',
                                   'IS_ANNOTATED_BY',
                                   cardinality=ZeroOrMore)
    belongs_to = RelationshipTo('Group', 'BELONGS_TO', show=True)
    coordinator = RelationshipTo('Group',
                                 'PI_FOR',
                                 cardinality=ZeroOrMore,
                                 show=True)
    items_under_revision = RelationshipFrom('Item',
                                            'REVISION_BY',
                                            cardinality=ZeroOrMore)
    revised_shots = RelationshipFrom('Shot',
                                     'REVISED_BY',
                                     cardinality=ZeroOrMore)
Example #12
0
class Language(StructuredNode):
    """
    ISO-639-1 LanguageCS

    Attributes:
        code   The language code.
        labels The translation into different languages.
    """
    code = StringProperty(choices=codelists.LANGUAGE, show=True, required=True)
    creation = RelationshipFrom('Creation',
                                'HAS_LANGUAGE',
                                cardinality=ZeroOrMore)
Example #13
0
class Rightholder(IdentifiedNode):
    """ Rightholder.

    Attributes:
        name    Name of the copyright holder.
        url     If available, URL to the homepage of the copyright holder.
    """
    name = StringProperty(required=True, show=True)
    url = StringProperty(show=True)
    creation = RelationshipFrom('Creation',
                                'COPYRIGHTED_BY',
                                cardinality=ZeroOrMore)
Example #14
0
class Country(StructuredNode):
    """
    ISO 3166-1,
    ISO 3166-2 (Region codes),
    ISO 3166-3,
    AFNOR XP2 44-002

    Attributes:
        code   The country code.
        labels The translation into different languages.
    """
    code = StringProperty(choices=codelists.COUNTRY, show=True, required=True)
    creation = RelationshipFrom('AVEntity',
                                'COUNTRY_OF_REFERENCE',
                                cardinality=ZeroOrMore)
Example #15
0
class Coverage(StructuredNode):
    """
    The spatial or temporal topic of the creation object.

    Attributes:
        spatial     This may be a named place, a location, a spatial
                    coordinate, a named administrative entity or an URI to a
                    LOD-service.
        temporal    This may be a period, date or range date.
    """
    spatial = ArrayProperty(StringProperty(), required=True, show=True)
    temporal = ArrayProperty(StringProperty(), show=True)
    creation = RelationshipFrom('Creation',
                                'HAS_COVERAGE',
                                cardinality=One,
                                show=True)
Example #16
0
class RecordSource(StructuredNode):
    """ A reference to the IMC content provider and their local ID.

    Attributes:
        source_id       The local identifier of the record. If this does not
                        exist in the content providerĀ“s database the value is
                        "undefined".
        is_shown_at     An unambiguous URL reference to the digital object on
                        the web site of the source provider and/or on the
                        content provider's web site in its full information
                        context.
    """
    source_id = StringProperty(required=True, show=True)
    is_shown_at = StringProperty(show=True)
    provider = RelationshipTo('Provider',
                              'PROVIDED_BY',
                              cardinality=One,
                              show=True)
    creation = RelationshipFrom('Creation', 'RECORD_SOURCE', cardinality=One)
Example #17
0
class Title(StructuredNode):
    """Wrapper class for title.

    Attributes:
        text                The textual expression of the title.
        language            The language of the title.
        part_designations   A combination of the name of a structuring unit and
                            the count value that identifies the current entity
                            as an individual part of a complex work.
        relation            The type of relationship between the title and the
                            entity to which it is assigned (e.g. "Original
                            title", "Distribution title", "Translated title"
                            etc).
    """
    text = StringProperty(required=True, show=True)
    language = StringProperty(choices=codelists.LANGUAGE, show=True)
    part_designations = ArrayProperty(StringProperty(), show=True)
    relation = StringProperty(choices=codelists.AV_TITLE_TYPES, show=True)
    creation = RelationshipFrom('Creation',
                                'HAS_TITLE',
                                cardinality=One,
                                show=True)
Example #18
0
class Agent(IdentifiedNode):
    """
    It refers mostly to agents which are involved in the creation of the
    objects.

    Attributes:
        uuid                Identifier generated by the system.
        external_ids        IDs chosen from external schemas.
        record_sources      List of sources from which the record comes.
        agent_type          Defines the type of the Agent (person, corporate
                            body, family etc.).
        names               Name(s) by which the entity is (or was) known.
        birth_date          Date of birth ("CCYY-MM-DD" or "CCYY").
        death_date          Date of death ("CCYY-MM-DD" or "CCYY").
        biographical_note   Short biographical note about a person or
                            organisation.
        biography_views     Unambiguous URL references to a full biographical
                            entry in an external database or on content
                            provider's website.
    """
    # record_sources = RelationshipTo(
    #     'RecordSource', 'RECORD_SOURCE', cardinality=OneOrMore, show=True)
    external_ids = ArrayProperty(StringProperty(), show=True)
    agent_type = StringProperty(required=True,
                                choices=codelists.AGENT_TYPES,
                                show=True)
    names = ArrayProperty(StringProperty(), required=True, show=True)
    birth_date = DateProperty(show=True)
    death_date = DateProperty(default=None, show=True)
    biographical_note = StringProperty()
    sex = StringProperty(choices=codelists.SEXES, show=True)
    biography_views = ArrayProperty(StringProperty())
    creation = RelationshipFrom('Creation',
                                'CONTRIBUTED_BY',
                                cardinality=ZeroOrMore,
                                show=True)
Example #19
0
class Role(StructuredNode):
    name = StringProperty(required=True, unique_index=True, show=True)
    description = StringProperty(default='No description', show=True)
    privileged = RelationshipFrom(User, 'HAS_ROLE', cardinality=OneOrMore)
Example #20
0
class MetaStage(Stage):
    item = RelationshipFrom('Item', 'META_SOURCE', cardinality=ZeroOrOne)
Example #21
0
class FragmentSelector(HeritableStructuredNode):
    annotation = RelationshipFrom('Annotation',
                                  'REFINED_SELECTION',
                                  cardinality=One)
Example #22
0
class ContentStage(Stage):
    item = RelationshipFrom('Item', 'CONTENT_SOURCE', cardinality=ZeroOrOne)
Example #23
0
class AnnotationTarget(HeritableStructuredNode):
    annotation = RelationshipFrom('Annotation',
                                  'HAS_TARGET',
                                  cardinality=ZeroOrMore)
Example #24
0
class Item(TimestampedNode, AnnotationTarget):
    """
    The Item Entity points to the digital file held in the IMC repository.
    The item functions as a logical wrapper for the digital object displayed in
    IMC.

    Attributes:
        is_shown_by     An unambiguous URL reference to the digital object in
                        the IMC repository.
        is_shown_at     An unambiguous URL reference to the digital object on
                        the IMC web site and/or on the content provider's web
                        site in its full information context.
        thumbnail       Link to the reduced-size image of the AV or NonAV
                        digital object.
        summary         Link to the summary image of the AV digital object (not
                        available for NonAV digital object)
        duration        The running time of the digitised audiovisual
                        manifestation measured in minutes and seconds.
        framerate       Optional value for the projection speed, given in
                        frames per second, to which the given duration refers.
        dimension       The total physical dimension of the digital object
                        (i.e. file size in bytes) represented as numeric value.
        digital_format  The description of the digital file in which a content
                        object is stored. Array[0]=container; Array[1]=coding;
                        Array[2]=format; Array[3]=resolution:
                        - container: e.g."AVI", "MP4", "3GP", "RealMedia"
                        - coding: e.g. "WMA","WMV", "MPEG-4", "RealVideo"
                        - format: RFC 2049 MIME types, e.g. "image/jpg", etc.
                        - resolution: The degree of sharpness of the digital
                                     object expressed in lines or pixel
        uri             An unambiguous URI to the resource within the IMC
                        context.
        item_type       "Text", "Image" or "Video"
        license         A reference to the license that applies to the digital
                        item.
    """
    thumbnail = StringProperty()
    summary = StringProperty()
    duration = FloatProperty(show=True)
    dimension = IntegerProperty(show=True)
    framerate = StringProperty(show=True)
    digital_format = ArrayProperty(StringProperty(), required=False, show=True)
    uri = StringProperty()
    item_type = StringProperty(required=True,
                               choices=codelists.CONTENT_TYPES,
                               show=True)
    ownership = RelationshipTo('Group',
                               'IS_OWNED_BY',
                               cardinality=One,
                               show=True)
    content_source = RelationshipTo('ContentStage',
                                    'CONTENT_SOURCE',
                                    cardinality=ZeroOrOne)
    meta_source = RelationshipTo('MetaStage', 'META_SOURCE', cardinality=One)
    creation = RelationshipTo('Creation', 'CREATION', cardinality=ZeroOrOne)
    sourcing_annotations = RelationshipFrom('Annotation',
                                            'SOURCE',
                                            cardinality=ZeroOrMore)
    targeting_annotations = RelationshipFrom('Annotation',
                                             'HAS_TARGET',
                                             cardinality=ZeroOrMore)
    shots = RelationshipTo('Shot', 'SHOT', cardinality=ZeroOrMore)
    revision = RelationshipTo('User',
                              'REVISION_BY',
                              cardinality=ZeroOrOne,
                              model=RevisionRel,
                              show=True)
    other_version = RelationshipTo('Item',
                                   'OTHER_VERSION',
                                   cardinality=ZeroOrOne,
                                   show=True)
Example #25
0
class AnnotationBody(HeritableStructuredNode):
    annotation = RelationshipFrom('Annotation', 'HAS_BODY', cardinality=One)
Example #26
0
class Creation(IdentifiedNode, HeritableStructuredNode):
    """
    It stores descriptive metadata on IMC objects provided by the archives with
    the initial ingest.
    It is an abstraction for both 'audiovisual' and 'non audiovisual' works.

    Attributes:
        external_ids:       IDs chosen from external schemas.
        record_sources      List of sources from which the record comes.
        titles              List of titles. Titles can be a word, phrase or
                            character, naming the work or a group of works, a
                            particular manifestation or an individual item.
        keywords            Set of vocabulary terms describing the content of a
                            creation.
        descriptions        Textual descriptions.
        languages           The languages of the spoken, sung or written
                            content.
        coverages           The spatial or temporal topics of the creation
                            object.
        rights_status       Specifies the copyright status of the digital item.
        rightholders        Right holders.
        collection_title    A textual title of the archival collection of which
                            the creation is part.
        contributors        Agents which are involved in the creation of the
                            objects.
    """
    external_ids = ArrayProperty(StringProperty(), show=True)
    record_sources = RelationshipTo('RecordSource',
                                    'RECORD_SOURCE',
                                    cardinality=OneOrMore,
                                    show=True)
    titles = RelationshipTo('Title',
                            'HAS_TITLE',
                            cardinality=OneOrMore,
                            show=True)
    keywords = RelationshipTo('Keyword',
                              'HAS_KEYWORD',
                              cardinality=ZeroOrMore,
                              show=True)
    descriptions = RelationshipTo('Description',
                                  'HAS_DESCRIPTION',
                                  cardinality=ZeroOrMore,
                                  show=True)
    languages = RelationshipTo('Language',
                               'HAS_LANGUAGE',
                               cardinality=ZeroOrMore,
                               model=LanguageRel,
                               show=True)
    coverages = RelationshipTo('Coverage',
                               'HAS_COVERAGE',
                               cardinality=ZeroOrMore,
                               show=True)
    rights_status = StringProperty(choices=codelists.RIGHTS_STATUS,
                                   required=True,
                                   show=True)
    rightholders = RelationshipTo('Rightholder',
                                  'COPYRIGHTED_BY',
                                  cardinality=ZeroOrMore,
                                  show=True)
    collection_title = StringProperty(show=True)
    contributors = RelationshipTo('Agent',
                                  'CONTRIBUTED_BY',
                                  cardinality=ZeroOrMore,
                                  show=True,
                                  model=ContributionRel)
    item = RelationshipFrom('Item', 'CREATION', cardinality=One, show=True)