<commit_before># Copyright (c) 2014, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.

from __future__ import absolute_import

import stix

from cybox.common import Time, ToolInformationList

import stix.bindings.stix_common as stix_common_binding
import stix.bindings.extensions.identity.ciq_identity_3_0 as ciq_identity_binding
from stix.extensions.identity import CIQIdentity3_0Instance

from .identity import Identity
from .structured_text import StructuredText


class InformationSource(stix.Entity):
    _binding = stix_common_binding
    _namespace = 'http://stix.mitre.org/common-1'
    
    def __init__(self, identity=None, time=None, tools=None):
        self.description = None
        self.identity = identity
        #self.contributors = []
        self.time = time
        self.tools = tools
        #self.references = []
    
    @property
    def identity(self):
        return self._identity
    
    @identity.setter
    def identity(self, value):
        if value and not isinstance(value, Identity):
            raise ValueError('value must be instance of Identity')
    
        self._identity = value
    
    @property
    def time(self):
        return self._time
    
    @time.setter
    def time(self, value):
        if value and not isinstance(value, Time):
            raise ValueError('value must be instance of Time')
        
        self._time = value
        
    @property<commit_msg>Added description property to stix.common.InformationSource<commit_after># Copyright (c) 2014, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.

from __future__ import absolute_import

import stix

from cybox.common import Time, ToolInformationList

import stix.bindings.stix_common as stix_common_binding
import stix.bindings.extensions.identity.ciq_identity_3_0 as ciq_identity_binding
from stix.extensions.identity import CIQIdentity3_0Instance

from .identity import Identity
from .structured_text import StructuredText


class InformationSource(stix.Entity):
    _binding = stix_common_binding
    _namespace = 'http://stix.mitre.org/common-1'
    
    def __init__(self, identity=None, time=None, tools=None):
        self.description = None
        self.identity = identity
        #self.contributors = []
        self.time = time
        self.tools = tools
        #self.references = []
    
    @property
    def description(self):
        return self._description
    
    @description.setter
    def description(self, value):
        if isinstance(value, StructuredText):
            self._description = value
        else:
            self._description = StructuredText(value=value)
            
    @property
    def identity(self):
        return self._identity
    
    @identity.setter
    def identity(self, value):
        if value and not isinstance(value, Identity):
            raise ValueError('value must be instance of Identity')
    
        self._identity = value
    
    @property
    def time(self):
        return self._time
    
    @time.setter
    def time(self, value):
        if value and not isinstance(value, Time):
            raise ValueError('value must be instance of Time')
        
        self._time = value
        
    @property
{'fraction_non_alphanumeric': 0.07449417535254445, 'fraction_numerical': 0.005518087063151441, 'mean_word_length': 2.699546485260771, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '952782', 'n_tokens_mistral': 896, 'n_tokens_neox': 883, 'n_words': 252}