当前位置: 首页>>代码示例>>Python>>正文


Python PatternFieldGroup.is_plain方法代码示例

本文整理汇总了Python中cybox.common.PatternFieldGroup.is_plain方法的典型用法代码示例。如果您正苦于以下问题:Python PatternFieldGroup.is_plain方法的具体用法?Python PatternFieldGroup.is_plain怎么用?Python PatternFieldGroup.is_plain使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cybox.common.PatternFieldGroup的用法示例。


在下文中一共展示了PatternFieldGroup.is_plain方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: is_plain

# 需要导入模块: from cybox.common import PatternFieldGroup [as 别名]
# 或者: from cybox.common.PatternFieldGroup import is_plain [as 别名]
    def is_plain(self):
        """Whether the Property can be represented as a single value.

        The `datatype` can be inferred by the particular BaseProperty subclass,
        so if `datatype` and `value` are the only non-None properties, the
        BaseProperty can be represented by a single value rather than a
        dictionary. This makes the JSON representation simpler without losing
        any data fidelity.
        """
        return (
            # ignore value
            self.id_ is None and
            self.idref is None and
            # ignore datatype
            self.appears_random is None and
            self.is_obfuscated is None and
            self.obfuscation_algorithm_ref is None and
            self.is_defanged is None and
            self.defanging_algorithm_ref is None and
            self.refanging_transform_type is None and
            self.refanging_transform is None and
            self.observed_encoding is None and

            PatternFieldGroup.is_plain(self)
        )
开发者ID:pfinn1977,项目名称:python-cybox,代码行数:27,代码来源:properties.py

示例2: is_plain

# 需要导入模块: from cybox.common import PatternFieldGroup [as 别名]
# 或者: from cybox.common.PatternFieldGroup import is_plain [as 别名]
    def is_plain(self):
        """Whether the VocabString can be represented as a single value.

        """
        return (
            self.xsi_type is None and
            self.vocab_name is None and
            self.vocab_reference is None and
            PatternFieldGroup.is_plain(self)
        )
开发者ID:aravindpfpt,项目名称:python-cybox,代码行数:12,代码来源:vocabs.py

示例3: is_plain

# 需要导入模块: from cybox.common import PatternFieldGroup [as 别名]
# 或者: from cybox.common.PatternFieldGroup import is_plain [as 别名]
    def is_plain(self):
        """Whether the VocabString can be represented as a single value.

        If `xsi:type` and `value` are the only non-None properties, the
        VocabString can be represented by a single value rather than a
        dictionary. This makes the JSON representation simpler without losing
        any data fidelity.
        """
        return (
            # ignore value and xsi_type
            self.vocab_name is None and
            self.vocab_reference is None and

            PatternFieldGroup.is_plain(self)
        )
开发者ID:treyka,项目名称:python-cybox,代码行数:17,代码来源:vocabs.py

示例4: is_plain

# 需要导入模块: from cybox.common import PatternFieldGroup [as 别名]
# 或者: from cybox.common.PatternFieldGroup import is_plain [as 别名]
    def is_plain(self):
        """Whether the VocabString can be represented as a single value.

        If `value` is the only non-None properties and a custom XSI type has
        not been set, the VocabString can be represented by a single value
        rather than a dictionary. This makes the JSON representation simpler
        without losing any data fidelity.
        """
        return (
            # ignore value
            self.vocab_name is None and
            self.vocab_reference is None and
            self.xsi_type == self._XSI_TYPE and

            PatternFieldGroup.is_plain(self)
        )
开发者ID:luisgf,项目名称:watsondt,代码行数:18,代码来源:vocabs.py


注:本文中的cybox.common.PatternFieldGroup.is_plain方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。