Skip to content

Commit

Permalink
Commented out unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan Worrell committed Mar 2, 2015
1 parent 658abeb commit 3b86d0c
Showing 1 changed file with 34 additions and 33 deletions.
67 changes: 34 additions & 33 deletions stix/common/confidence.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import stix.utils as utils
import stix.bindings.stix_common as common_binding

from . import vocabs, VocabString
from .structured_text import StructuredText
from .vocabs import VocabString, HighMediumLow


class Confidence(stix.Entity):
Expand Down Expand Up @@ -44,7 +44,7 @@ def value(self, value):
if isinstance(value, VocabString):
self._value = value
else:
self._value = HighMediumLow(value=value)
self._value = vocabs.HighMediumLow(value=value)

@property
def source(self):
Expand Down Expand Up @@ -151,36 +151,37 @@ def from_dict(cls, d, return_obj=None):

return return_obj

class ConfidenceAssertionChain(stix.Entity):
_namespace = 'http://stix.mitre.org/common-2'
_binding = common_binding

def __init__(self):
self.confidence_assertions = []

def add_confidence_assertion(self, confidence_assertion):
if isinstance(confidence_assertion, Confidence):
self.confidence_assertions.append(confidence_assertion)
else:
tmp_confidence = Confidence(value=confidence_assertion)
self.confidence_assertions.append(tmp_confidence)

def to_obj(self, return_obj=None, ns_info=None):
super(ConfidenceAssertionChain, self).to_obj(return_obj=return_obj, ns_info=ns_info)

if not return_obj:
return_obj = self._binding.ConfidenceAssertionChainType()

return None

@classmethod
def from_obj(cls, obj, return_obj=None):
return None

def to_dict(self):
return {}

@classmethod
def from_dict(cls, dict_repr, return_obj=None):
return None
# class ConfidenceAssertionChain(stix.Entity):
# _namespace = 'http://stix.mitre.org/common-2'
# _binding = common_binding
#
# def __init__(self):
# self.confidence_assertions = []
#
# def add_confidence_assertion(self, confidence_assertion):
# if isinstance(confidence_assertion, Confidence):
# self.confidence_assertions.append(confidence_assertion)
# else:
# tmp_confidence = Confidence(value=confidence_assertion)
# self.confidence_assertions.append(tmp_confidence)
#
# def to_obj(self, return_obj=None, ns_info=None):
# super(ConfidenceAssertionChain, self).to_obj(return_obj=return_obj, ns_info=ns_info)
#
# if not return_obj:
# return_obj = self._binding.ConfidenceAssertionChainType()
#
# return None
#
# @classmethod
# def from_obj(cls, obj, return_obj=None):
# return None
#
# def to_dict(self):
# return {}
#
# @classmethod
# def from_dict(cls, dict_repr, return_obj=None):
# return None

0 comments on commit 3b86d0c

Please sign in to comment.