Esempio n. 1
0
    def __init__(self,
                 label,
                 startedAtTime,
                 endedAtTime,
                 wasAssociatedWith=None,
                 uri=None,
                 comment=None,
                 used_entities=None,
                 generated_entities=None,
                 wasInformedBy=None):

        OwlClass.__init__(self, label, uri, comment)

        self.__set_startedAtTime(startedAtTime)
        self.__set_endedAtTime(endedAtTime)

        if wasAssociatedWith:
            self.__set_wasAssociatedWith(wasAssociatedWith)
        else:
            self.wasAssociatedWith = None

        if used_entities:
            self.__set_used_entities(used_entities)
        else:
            self.used_entities = None

        if generated_entities:
            self.__set_generated_entities(generated_entities)
        else:
            self.generated_entities = None

        if wasInformedBy:
            self.__set_wasInformedBy(wasInformedBy)
        else:
            self.wasInformedBy = None
Esempio n. 2
0
    def __init__(self, label, uri=None, comment=None, actedOnBehalfOf=None):

        OwlClass.__init__(self, label, uri, comment)

        if actedOnBehalfOf:
            self.set_actedOnBehalfOf(actedOnBehalfOf)
        else:
            self.actedOnBehalfOf = None
Esempio n. 3
0
    def __init__(self,
                 label,
                 wasReportedBy,
                 nativeId,
                 reportActivity,
                 generatedAtTime,
                 comment=None):

        OwlClass.__init__(self, label, comment)

        self.uri = 'http://placeholder.org#' + str(uuid.uuid4())
        self.__set_wasReportedBy(wasReportedBy)
        self.__set_nativeId(nativeId)
        self.__set_reportActivity(reportActivity)
        self.__set_generatedAtTime(generatedAtTime)
Esempio n. 4
0
    def __init__(self,
                 label,
                 uri=None,
                 comment=None,
                 wasAttributedTo=None,
                 value=None):

        OwlClass.__init__(self, label, uri, comment)

        if wasAttributedTo:
            self.__set_wasAttributedTo(wasAttributedTo)
        else:
            self.wasAttributedTo = None

        if value:
            self.__set_value(value)
        else:
            self.value = None
Esempio n. 5
0
    def __init__(self,
                 label,
                 uri=None,
                 blockchainuri=None,
                 comment=None,
                 wasAttributedTo=None,
                 value=None,
                 scanTime=None):
        OwlClass.__init__(self, label, uri, blockchainuri, comment)
        if wasAttributedTo:
            self.__set_wasAttributedTo(wasAttributedTo)
        else:
            self.wasAttributedTo = None

        if value:
            self.__set_value(value)
        else:
            self.value = None
        self.scanTime = scanTime if scanTime else datetime.strptime(
            "2071-01-01T00:00:00", "%Y-%m-%dT%H:%M:%S")
Esempio n. 6
0
    def __init__(self,
                 label,
                 wasReportedBy,
                 nativeId,
                 reportActivity,
                 generatedAtTime,
                 comment=None):

        OwlClass.__init__(self, label, comment)

        self.uri = 'http://www.lsutech.com#' + str(
            HashValue(
                "%(label)s#%(cmt)s#%(blcu)s#%(rnds)s" % {
                    "blcu": self.blockchainuri if self.blockchainuri else "",
                    "label": self.label,
                    "cmt": self.comment,
                    "rnds": str(uuid4())
                }))
        self.__set_wasReportedBy(wasReportedBy)
        self.__set_nativeId(nativeId)
        self.__set_reportActivity(reportActivity)
        self.__set_generatedAtTime(generatedAtTime)