本文整理汇总了Python中stix.data_marking.MarkingStructure.from_obj方法的典型用法代码示例。如果您正苦于以下问题:Python MarkingStructure.from_obj方法的具体用法?Python MarkingStructure.from_obj怎么用?Python MarkingStructure.from_obj使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类stix.data_marking.MarkingStructure
的用法示例。
在下文中一共展示了MarkingStructure.from_obj方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: from_obj
# 需要导入模块: from stix.data_marking import MarkingStructure [as 别名]
# 或者: from stix.data_marking.MarkingStructure import from_obj [as 别名]
def from_obj(obj):
if not obj:
return None
m = TermsOfUseMarkingStructure()
MarkingStructure.from_obj(obj, m)
m.terms_of_use = obj.Terms_Of_Use
return m
示例2: from_obj
# 需要导入模块: from stix.data_marking import MarkingStructure [as 别名]
# 或者: from stix.data_marking.MarkingStructure import from_obj [as 别名]
def from_obj(obj):
if not obj:
return None
m = TLPMarkingStructure()
MarkingStructure.from_obj(obj, m)
m.color = obj.color
return m
示例3: from_obj
# 需要导入模块: from stix.data_marking import MarkingStructure [as 别名]
# 或者: from stix.data_marking.MarkingStructure import from_obj [as 别名]
def from_obj(obj):
if not obj:
return None
m = SimpleMarkingStructure()
MarkingStructure.from_obj(obj, m)
m.statement = obj.Statement
return m
示例4: from_obj
# 需要导入模块: from stix.data_marking import MarkingStructure [as 别名]
# 或者: from stix.data_marking.MarkingStructure import from_obj [as 别名]
def from_obj(cls, obj, return_obj=None):
if not obj:
return None
if not return_obj:
return_obj = cls()
MarkingStructure.from_obj(obj, return_obj=return_obj)
return_obj.color = obj.color
return return_obj
示例5: from_obj
# 需要导入模块: from stix.data_marking import MarkingStructure [as 别名]
# 或者: from stix.data_marking.MarkingStructure import from_obj [as 别名]
def from_obj(cls, obj, return_obj=None):
if not obj:
return None
if not return_obj:
return_obj = cls()
MarkingStructure.from_obj(obj, return_obj=return_obj)
return_obj.terms_of_use = obj.Terms_Of_Use
return return_obj
示例6: from_obj
# 需要导入模块: from stix.data_marking import MarkingStructure [as 别名]
# 或者: from stix.data_marking.MarkingStructure import from_obj [as 别名]
def from_obj(cls, obj, return_obj=None):
if not obj:
return None
if not return_obj:
return_obj = cls()
MarkingStructure.from_obj(obj, return_obj)
return_obj.statement = obj.Statement
return return_obj
示例7: from_obj
# 需要导入模块: from stix.data_marking import MarkingStructure [as 别名]
# 或者: from stix.data_marking.MarkingStructure import from_obj [as 别名]
def from_obj(obj):
if not obj:
return None
m = ISAMarkingStructure()
MarkingStructure.from_obj(obj, m)
m.isam_version = obj.isam_version
m.identifier = EDH2Text.from_obj(obj.identifier)
m.createdatetime = EDH2Text.from_obj(obj.createdatetime)
m.responsibleentity = EDH2Text.from_obj(obj.responsibleentity)
m.authref = EDH2Text.from_obj(obj.authref)
return m