(self, data, analyst, method, def_ci=None, preview_only=False)
Instantiation of the STIXParser can take the data to parse, the analyst
        doing the parsing, and the method of data aquisition.

        :param data: The data to parse.
        :type data: str
        :param analyst: The analyst parsing the document.
        :type analyst: str
        :param method: The method of acquiring this data.
        :type method: str
        :param def_ci: The default Indicator (confidence, impact).
        :type def_ci: tuple
        :param preview_only: If True, nothing is imported and a preview is returned
        :type preview_only: boolean
Instantiation of the STIXParser can take the data to parse, the analyst
        doing the parsing, and the method of data aquisition.
Instantiation of the STIXParser can take the data to parse the analyst doing the parsing and the method of data aquisition .
def __init__(self, data, analyst, method, def_ci=None, preview_only=False):
        """
        Instantiation of the STIXParser can take the data to parse, the analyst
        doing the parsing, and the method of data aquisition.

        :param data: The data to parse.
        :type data: str
        :param analyst: The analyst parsing the document.
        :type analyst: str
        :param method: The method of acquiring this data.
        :type method: str
        :param def_ci: The default Indicator (confidence, impact).
        :type def_ci: tuple
        :param preview_only: If True, nothing is imported and a preview is returned
        :type preview_only: boolean
        """

        self.data = data
        self.def_ci = def_ci or (None, None)
        self.obs_as_ind = False
        self.preview = preview_only

        self.package = None
        self.stix_version = None

        self.source = EmbeddedSource() # source.name comes from the stix header.
        self.source_instance = EmbeddedSource.SourceInstance()
        # The reference attribute and appending it to the source is
        # done after the TAXII message ID is determined.
        self.source_instance.analyst = analyst
        self.source_instance.method = method

        self.pkg_event = None # optional Event TLO relating to all pkg objects
        self.event_rels = {} # track relationships to the event
        self.relationships = [] # track other relationships that need forming
        self.pkg_rels = {} # track relationships between packages, if any
        self.idMap = {} # map child IDs to parent IDs for relationship building
        self.importedByPkg = {} # track which items were imported from which package
        self.imported = {} # track items that are imported
        self.updates = {} # track new/updated CRITs TLOs
        self.parsed = [] # track items that have been parsed, but not necessarily imported
        self.failed = [] # track STIX/CybOX items that failed import
        self.saved_artifacts = {}
def __init__ ( self , data , analyst , method , def_ci = None , preview_only = False ) : self . data = data self . def_ci = def_ci or ( None , None ) self . obs_as_ind = False self . preview = preview_only self . package = None self . stix_version = None self . source = EmbeddedSource ( ) # source.name comes from the stix header. self . source_instance = EmbeddedSource . SourceInstance ( ) # The reference attribute and appending it to the source is # done after the TAXII message ID is determined. self . source_instance . analyst = analyst self . source_instance . method = method self . pkg_event = None # optional Event TLO relating to all pkg objects self . event_rels = { } # track relationships to the event self . relationships = [ ] # track other relationships that need forming self . pkg_rels = { } # track relationships between packages, if any self . idMap = { } # map child IDs to parent IDs for relationship building self . importedByPkg = { } # track which items were imported from which package self . imported = { } # track items that are imported self . updates = { } # track new/updated CRITs TLOs self . parsed = [ ] # track items that have been parsed, but not necessarily imported self . failed = [ ] # track STIX/CybOX items that failed import self . saved_artifacts = { }