(self, data, analyst, message_id, hostname, feed, block_label,
                 begin=None, end=None, poll_time=None, use_hdr_src=False,
                 errors=[], selected=True)
Populate the class attributes

        :param data: The STIX content
        :type data: string
        :param analyst: The analyst who retrieved or provided the data
        :type analyst: string
        :param message_id: A reference to the data (ID of the TAXII message)
        :type message_id: string
        :param hostname: The source of the data (or TAXII server hostname)
        :type hostname: string
        :param feed: Name of the TAXII feed/collection, or ZIP file name
        :type feed: string
        :param block_label: Filename, or when block submitted to TAXII server
        :type block_label: string
        :param begin: Exclusive begin component of the timerange that was polled
        :type begin: :class:`datetime.datetime`
        :param end: Inclusive end component of the timerange that was polled
        :type end: :class:`datetime.datetime`
        :param poll_time: When the data was polled or uploaded
        :type poll_time: :class:`datetime.datetime`
        :param use_hdr_src: Indicates if STIX Header Info Source is preferred
        :type use_hdr_src: boolean
        :param errors: Errors that occurred while parsing or importing content
        :type errors: list
        :param selected: Boolean indicating that the block is selected for import
        :type selected: boolean
Populate the class attributes
Populate the class attributes
def populate(self, data, analyst, message_id, hostname, feed, block_label,
                 begin=None, end=None, poll_time=None, use_hdr_src=False,
                 errors=[], selected=True):
        """
        Populate the class attributes

        :param data: The STIX content
        :type data: string
        :param analyst: The analyst who retrieved or provided the data
        :type analyst: string
        :param message_id: A reference to the data (ID of the TAXII message)
        :type message_id: string
        :param hostname: The source of the data (or TAXII server hostname)
        :type hostname: string
        :param feed: Name of the TAXII feed/collection, or ZIP file name
        :type feed: string
        :param block_label: Filename, or when block submitted to TAXII server
        :type block_label: string
        :param begin: Exclusive begin component of the timerange that was polled
        :type begin: :class:`datetime.datetime`
        :param end: Inclusive end component of the timerange that was polled
        :type end: :class:`datetime.datetime`
        :param poll_time: When the data was polled or uploaded
        :type poll_time: :class:`datetime.datetime`
        :param use_hdr_src: Indicates if STIX Header Info Source is preferred
        :type use_hdr_src: boolean
        :param errors: Errors that occurred while parsing or importing content
        :type errors: list
        :param selected: Boolean indicating that the block is selected for import
        :type selected: boolean
        """

        if data or errors:
            self.taxii_msg_id = message_id
            self.hostname = hostname
            self.use_hdr_src = use_hdr_src
            self.feed = feed
            self.block_label = block_label
            self.poll_time = poll_time or datetime.now()
            if end: # TAXII poll will always have end timestamp
                end = end.strftime('%Y-%m-%d %H:%M:%S')
                begin = begin.strftime('%Y-%m-%d %H:%M:%S') if begin else 'None'
                self.timerange = '%s to %s' % (begin, end)
            else: # Must be a STIX file upload
                self.timerange = 'STIX File Upload'
            self.analyst = analyst
            self.content = data or ""
            self.errors = errors
            self.import_failed = False
            self.selected = True
def populate ( self , data , analyst , message_id , hostname , feed , block_label , begin = None , end = None , poll_time = None , use_hdr_src = False , errors = [ ] , selected = True ) : if data or errors : self . taxii_msg_id = message_id self . hostname = hostname self . use_hdr_src = use_hdr_src self . feed = feed self . block_label = block_label self . poll_time = poll_time or datetime . now ( ) if end : # TAXII poll will always have end timestamp end = end . strftime ( '%Y-%m-%d %H:%M:%S' ) begin = begin . strftime ( '%Y-%m-%d %H:%M:%S' ) if begin else 'None' self . timerange = '%s to %s' % ( begin , end ) else : # Must be a STIX file upload self . timerange = 'STIX File Upload' self . analyst = analyst self . content = data or "" self . errors = errors self . import_failed = False self . selected = True