コード例 #1
0
    def __init__(self, MetaInfoClass, QMetaInfoClass, MetaDataClass, QMetaDataClass):
        '''
        Construct the meta info base service for the provided classes.
        
        @param MetaInfoClass: class
            A class that extends MetaInfo meta class.
        @param QMetaInfoClass: class
            A class that extends QMetaInfo API class.
        @param MetaDataClass: class
            A class that extends MetaData meta class.
        @param QMetaDataClass: class
            A class that extends QMetaData API class.
        '''
        assert isclass(MetaInfoClass) and issubclass(MetaInfoClass, MetaInfo), \
        'Invalid meta info class %s' % MetaInfoClass
        assert isclass(QMetaInfoClass) and issubclass(QMetaInfoClass, QMetaInfo), \
        'Invalid meta info query class %s' % QMetaInfoClass
        assert isclass(MetaDataClass) and issubclass(MetaDataClass, MetaDataMapped), \
        'Invalid meta data class %s' % MetaDataClass
        assert isclass(QMetaDataClass) and issubclass(QMetaDataClass, QMetaData), \
        'Invalid meta data query class %s' % QMetaDataClass
        EntityGetCRUDServiceAlchemy.__init__(self, MetaInfoClass)

        self.MetaInfo = MetaInfoClass
        self.QMetaInfo = QMetaInfoClass
        self.MetaData = MetaDataClass
        self.QMetaData = QMetaDataClass
コード例 #2
0
    def __init__(self, MetaInfoClass, QMetaInfoClass, MetaDataClass,
                 QMetaDataClass, searchProvider, metaDataService, type):
        '''
        Construct the meta info base service for the provided classes.

        @param MetaInfoClass: class
            A class that extends MetaInfo meta class.
        @param QMetaInfoClass: class
            A class that extends QMetaInfo API class.
        @param MetaDataClass: class
            A class that extends MetaData meta class.
        @param QMetaDataClass: class
            A class that extends QMetaData API class.
        @param searchProvider: ISearchProvider
            The provider that will be used for search related actions
        @param metaDataService: MetaDataServiceBaseAlchemy
            The current meta data for media archive
        @param type: str
            The media archive type        
        '''

        assert isclass(MetaInfoClass) and issubclass(MetaInfoClass, MetaInfo), \
        'Invalid meta info class %s' % MetaInfoClass
        assert isclass(QMetaInfoClass) and issubclass(QMetaInfoClass, QMetaInfo), \
        'Invalid meta info query class %s' % QMetaInfoClass
        assert isclass(MetaDataClass) and issubclass(MetaDataClass, MetaDataMapped), \
        'Invalid meta data class %s' % MetaDataClass
        assert isclass(QMetaDataClass) and issubclass(QMetaDataClass, QMetaData), \
        'Invalid meta data query class %s' % QMetaDataClass
        assert isinstance(
            searchProvider,
            ISearchProvider), 'Invalid search provider %s' % searchProvider
        assert isinstance(metaDataService, MetaDataServiceBaseAlchemy
                          ), 'Invalid meta data service %s' % metaDataService
        assert isinstance(type, str), 'Invalid media type%s' % type

        EntityGetCRUDServiceAlchemy.__init__(self, MetaInfoClass)

        self.MetaInfo = MetaInfoClass
        self.QMetaInfo = QMetaInfoClass
        self.MetaData = MetaDataClass
        self.QMetaData = QMetaDataClass
        self.searchProvider = searchProvider
        self.metaDataService = metaDataService
        self.type = type
コード例 #3
0
    def __init__(self, MetaInfoClass, QMetaInfoClass, MetaDataClass, QMetaDataClass, searchProvider, metaDataService, type):
        '''
        Construct the meta info base service for the provided classes.

        @param MetaInfoClass: class
            A class that extends MetaInfo meta class.
        @param QMetaInfoClass: class
            A class that extends QMetaInfo API class.
        @param MetaDataClass: class
            A class that extends MetaData meta class.
        @param QMetaDataClass: class
            A class that extends QMetaData API class.
        @param searchProvider: ISearchProvider
            The provider that will be used for search related actions
        @param metaDataService: MetaDataServiceBaseAlchemy
            The current meta data for media archive
        @param type: str
            The media archive type        
        '''

        assert isclass(MetaInfoClass) and issubclass(MetaInfoClass, MetaInfo), \
        'Invalid meta info class %s' % MetaInfoClass
        assert isclass(QMetaInfoClass) and issubclass(QMetaInfoClass, QMetaInfo), \
        'Invalid meta info query class %s' % QMetaInfoClass
        assert isclass(MetaDataClass) and issubclass(MetaDataClass, MetaDataMapped), \
        'Invalid meta data class %s' % MetaDataClass
        assert isclass(QMetaDataClass) and issubclass(QMetaDataClass, QMetaData), \
        'Invalid meta data query class %s' % QMetaDataClass
        assert isinstance(searchProvider, ISearchProvider), 'Invalid search provider %s' % searchProvider
        assert isinstance(metaDataService, MetaDataServiceBaseAlchemy), 'Invalid meta data service %s' % metaDataService
        assert isinstance(type, str), 'Invalid media type%s' % type

        EntityGetCRUDServiceAlchemy.__init__(self, MetaInfoClass)

        self.MetaInfo = MetaInfoClass
        self.QMetaInfo = QMetaInfoClass
        self.MetaData = MetaDataClass
        self.QMetaData = QMetaDataClass
        self.searchProvider = searchProvider
        self.metaDataService = metaDataService
        self.type = type
コード例 #4
0
 def __init__(self):
     '''
     Construct the source service.
     '''
     EntityGetCRUDServiceAlchemy.__init__(self, SourceMapped)
コード例 #5
0
ファイル: collaborator.py プロジェクト: rismalrv/Superdesk
 def __init__(self):
     '''
     Construct the collaborator service.
     '''
     EntityGetCRUDServiceAlchemy.__init__(self, CollaboratorMapped)
コード例 #6
0
ファイル: collaborator.py プロジェクト: gizm0bill/Superdesk
 def __init__(self):
     '''
     Construct the collaborator service.
     '''
     EntityGetCRUDServiceAlchemy.__init__(self, CollaboratorMapped)
コード例 #7
0
ファイル: message.py プロジェクト: AtomLaw/Ally-Py
 def __init__(self):
     EntityGetCRUDServiceAlchemy.__init__(self, Message, QMessage)
コード例 #8
0
 def __init__(self):
     EntityGetCRUDServiceAlchemy.__init__(self, Message, QMessage)
コード例 #9
0
ファイル: source.py プロジェクト: robchrstr/Superdesk
 def __init__(self):
     """
     Construct the source service.
     """
     EntityGetCRUDServiceAlchemy.__init__(self, SourceMapped, QSource)