def core_Tool(case_doc, toolType=Missing(), vendor=Missing()): ''' :param toolType: Any number of type string. :param vendor: Any number of type string. :return: A CoreCategory object. ''' if not isinstance(toolType, Missing): assert isinstance(toolType, list),\ "[core_Tool] toolType must be of type List of string." assert XSDValidator.validateXSD(toolType, "string", autogenerated_xsd),\ "[core_Tool] toolType must be of type List of string." else: miss_prop_list.append(toolType) if not isinstance(vendor, Missing): assert isinstance(vendor, list),\ "[core_Tool] vendor must be of type List of string." assert XSDValidator.validateXSD(vendor, "string", autogenerated_xsd),\ "[core_Tool] vendor must be of type List of string." else: miss_prop_list.append(vendor) return case_doc.create_CoreCategory('Tool', toolType=toolType, vendor=vendor)
def core_Relationship(case_doc, bidirectional=Missing(), kindOfRelationship=Missing(), target=Missing()): ''' :param bidirectional: Any number of type boolean. :param kindOfRelationship: Any number of type string. :param target: Any number of type UcoObject. :return: A CoreCategory object. ''' if not isinstance(bidirectional, Missing): assert isinstance(bidirectional, list),\ "[core_Relationship] bidirectional must be of type List of boolean." assert XSDValidator.validateXSD(bidirectional, "boolean", autogenerated_xsd),\ "[core_Relationship] bidirectional must be of type List of boolean." else: miss_prop_list.append(bidirectional) if not isinstance(kindOfRelationship, Missing): assert isinstance(kindOfRelationship, list),\ "[core_Relationship] kindOfRelationship must be of type List of string." assert XSDValidator.validateXSD(kindOfRelationship, "string", autogenerated_xsd),\ "[core_Relationship] kindOfRelationship must be of type List of string." else: miss_prop_list.append(kindOfRelationship) if not isinstance(target, Missing): assert isinstance(target, list),\ "[core_Relationship] target must be of type List of UcoObject." assert XSDValidator.validateXSD(target, "UcoObject", autogenerated_xsd),\ "[core_Relationship] target must be of type List of UcoObject." else: miss_prop_list.append(target) return case_doc.create_CoreCategory('Relationship', bidirectional=bidirectional, kindOfRelationship=kindOfRelationship, target=target)
def duck_sub_FilePath(case_doc, parent_object, delimiter=Missing(), filePathSegments=Missing()): ''' :param delimiter: Any number of type string. :param filePathSegments: Any number of type OrderedList. :return: A SubCategory object. ''' assert (isinstance(parent_object, case.DuckCategory) and parent_object.type=='SupportingClasses')),\ "[duck_sub_FilePath] parent_object must be of type SupportingClasses." if not isinstance(delimiter, Missing): assert isinstance(delimiter, list),\ "[duck_sub_FilePath] delimiter must be of type List of string." assert XSDValidator.validateXSD(delimiter, "string", autogenerated_xsd),\ "[duck_sub_FilePath] delimiter must be of type List of string." else: miss_prop_list.append(delimiter) if not isinstance(filePathSegments, Missing): assert isinstance(filePathSegments, list),\ "[duck_sub_FilePath] filePathSegments must be of type List of OrderedList." assert all(isinstance(i, case.DuckCategory)) and (i.type=="OrderedList") for i in filePathSegments),\ "[duck_sub_FilePath] filePathSegments must be of type List of OrderedList." else: miss_prop_list.append(filePathSegments) return case_doc.create_SubCategory('FilePath', delimiter=delimiter, filePathSegments=filePathSegments)
def duck_sub_ConfigurationSetting(case_doc, parent_object, itemDescription=Missing(), itemName=Missing(), itemType=Missing(), itemValue=Missing()): ''' :param itemDescription: Any number of type string. :param itemName: Any number of type string. :param itemType: Any number of type string. :param itemValue: Any number of type string. :return: A SubCategory object. ''' assert (isinstance(parent_object, case.DuckCategory) and parent_object.type=='SupportingClasses')),\ "[duck_sub_ConfigurationSetting] parent_object must be of type SupportingClasses." if not isinstance(itemDescription, Missing): assert isinstance(itemDescription, list),\ "[duck_sub_ConfigurationSetting] itemDescription must be of type List of string." assert XSDValidator.validateXSD(itemDescription, "string", autogenerated_xsd),\ "[duck_sub_ConfigurationSetting] itemDescription must be of type List of string." else: miss_prop_list.append(itemDescription) if not isinstance(itemName, Missing): assert isinstance(itemName, list),\ "[duck_sub_ConfigurationSetting] itemName must be of type List of string." assert XSDValidator.validateXSD(itemName, "string", autogenerated_xsd),\ "[duck_sub_ConfigurationSetting] itemName must be of type List of string." else: miss_prop_list.append(itemName) if not isinstance(itemType, Missing): assert isinstance(itemType, list),\ "[duck_sub_ConfigurationSetting] itemType must be of type List of string." assert XSDValidator.validateXSD(itemType, "string", autogenerated_xsd),\ "[duck_sub_ConfigurationSetting] itemType must be of type List of string." else: miss_prop_list.append(itemType) if not isinstance(itemValue, Missing): assert isinstance(itemValue, list),\ "[duck_sub_ConfigurationSetting] itemValue must be of type List of string." assert XSDValidator.validateXSD(itemValue, "string", autogenerated_xsd),\ "[duck_sub_ConfigurationSetting] itemValue must be of type List of string." else: miss_prop_list.append(itemValue) return case_doc.create_SubCategory('ConfigurationSetting', itemDescription=itemDescription, itemName=itemName, itemType=itemType, itemValue=itemValue)
def core_Action(case_doc, actionStatus=Missing(), environment=Missing(), error=Missing(), subAction=Missing()): ''' :param actionStatus: Any number of type ActionStatus. :param environment: Any number of type UcoObject. :param error: Any number of type UcoObject. :param subAction: Any number of type Action. :return: A CoreCategory object. ''' if not isinstance(actionStatus, Missing): assert isinstance(actionStatus, list),\ "[core_Action] actionStatus must be of type List of ActionStatus." assert all(isinstance(i, case.DuckCategory)) and (i.type=="ActionStatus") for i in actionStatus),\ "[core_Action] actionStatus must be of type List of ActionStatus." else: miss_prop_list.append(actionStatus) if not isinstance(environment, Missing): assert isinstance(environment, list),\ "[core_Action] environment must be of type List of UcoObject." assert XSDValidator.validateXSD(environment, "UcoObject", autogenerated_xsd),\ "[core_Action] environment must be of type List of UcoObject." else: miss_prop_list.append(environment) if not isinstance(error, Missing): assert isinstance(error, list),\ "[core_Action] error must be of type List of UcoObject." assert XSDValidator.validateXSD(error, "UcoObject", autogenerated_xsd),\ "[core_Action] error must be of type List of UcoObject." else: miss_prop_list.append(error) if not isinstance(subAction, Missing): assert isinstance(subAction, list),\ "[core_Action] subAction must be of type List of Action." assert all(isinstance(i, case.CoreCategory)) and (i.type=="Action") for i in subAction),\ "[core_Action] subAction must be of type List of Action." else: miss_prop_list.append(subAction) return case_doc.create_CoreCategory('Action', actionStatus=actionStatus, environment=environment, error=error, subAction=subAction)
def duck_UcoObject(case_doc, createdBy=Missing(), propertyBundle=Missing(), specVersion=Missing(), type=Missing()): ''' :param createdBy: Any number of type Identity. :param propertyBundle: Any number of type PropertyBundle. :param specVersion: Any number of type string. :param type: Any number of type string. :return: A DuckCategory object. ''' if not isinstance(createdBy, Missing): assert isinstance(createdBy, list),\ "[duck_UcoObject] createdBy must be of type List of Identity." assert all(isinstance(i, case.CoreCategory)) and (i.type=="Identity") for i in createdBy),\ "[duck_UcoObject] createdBy must be of type List of Identity." else: miss_prop_list.append(createdBy) if not isinstance(propertyBundle, Missing): assert isinstance(propertyBundle, list),\ "[duck_UcoObject] propertyBundle must be of type List of PropertyBundle." assert all(isinstance(i, case.DuckCategory)) and (i.type=="PropertyBundle") for i in propertyBundle),\ "[duck_UcoObject] propertyBundle must be of type List of PropertyBundle." else: miss_prop_list.append(propertyBundle) if not isinstance(specVersion, Missing): assert isinstance(specVersion, list),\ "[duck_UcoObject] specVersion must be of type List of string." assert XSDValidator.validateXSD(specVersion, "string", autogenerated_xsd),\ "[duck_UcoObject] specVersion must be of type List of string." else: miss_prop_list.append(specVersion) if not isinstance(type, Missing): assert isinstance(type, list),\ "[duck_UcoObject] type must be of type List of string." assert XSDValidator.validateXSD(type, "string", autogenerated_xsd),\ "[duck_UcoObject] type must be of type List of string." else: miss_prop_list.append(type) return case_doc.create_DuckCategory('UcoObject', createdBy=createdBy, propertyBundle=propertyBundle, specVersion=specVersion, type=type)
def core_ProvenanceRecord(case_doc, exhibitNumber=Missing()): ''' :param exhibitNumber: Any number of type string. :return: A CoreCategory object. ''' if not isinstance(exhibitNumber, Missing): assert isinstance(exhibitNumber, list),\ "[core_ProvenanceRecord] exhibitNumber must be of type List of string." assert XSDValidator.validateXSD(exhibitNumber, "string", autogenerated_xsd),\ "[core_ProvenanceRecord] exhibitNumber must be of type List of string." else: miss_prop_list.append(exhibitNumber) return case_doc.create_CoreCategory('ProvenanceRecord', exhibitNumber=exhibitNumber)
def duck_sub_ReceivedEvent(case_doc, parent_object, receivedTime=Missing(), receiver=Missing()): ''' :param receivedTime: Any number of type dateTimeStamp. :param receiver: Any number of type Trace. :return: A SubCategory object. ''' assert (isinstance(parent_object, case.DuckCategory) and parent_object.type=='SupportingClasses')),\ "[duck_sub_ReceivedEvent] parent_object must be of type SupportingClasses." if not isinstance(receivedTime, Missing): assert isinstance(receivedTime, list),\ "[duck_sub_ReceivedEvent] receivedTime must be of type List of dateTimeStamp." assert XSDValidator.validateXSD(receivedTime, "dateTimeStamp", autogenerated_xsd),\ "[duck_sub_ReceivedEvent] receivedTime must be of type List of dateTimeStamp."
def core_Investigation(case_doc, endAction=Missing(), forensicActions=Missing(), investigator=Missing(), startAction=Missing(), suspectedOffense=Missing(), victim=Missing()): ''' :param endAction: Any number of type Action. :param forensicActions: Any number of type OrderedList. :param startAction: Any number of type Action. :param suspectedOffense: Any number of type string. :return: A CoreCategory object. ''' if not isinstance(endAction, Missing): assert isinstance(endAction, list),\ "[core_Investigation] endAction must be of type List of Action." assert all(isinstance(i, case.CoreCategory)) and (i.type=="Action") for i in endAction),\ "[core_Investigation] endAction must be of type List of Action." else: miss_prop_list.append(endAction) if not isinstance(forensicActions, Missing): assert isinstance(forensicActions, list),\ "[core_Investigation] forensicActions must be of type List of OrderedList." assert all(isinstance(i, case.DuckCategory)) and (i.type=="OrderedList") for i in forensicActions),\ "[core_Investigation] forensicActions must be of type List of OrderedList." else: miss_prop_list.append(forensicActions) if not isinstance(startAction, Missing): assert isinstance(startAction, list),\ "[core_Investigation] startAction must be of type List of Action." assert all(isinstance(i, case.CoreCategory)) and (i.type=="Action") for i in startAction),\ "[core_Investigation] startAction must be of type List of Action." else: miss_prop_list.append(startAction) if not isinstance(suspectedOffense, Missing): assert isinstance(suspectedOffense, list),\ "[core_Investigation] suspectedOffense must be of type List of string." assert XSDValidator.validateXSD(suspectedOffense, "string", autogenerated_xsd),\ "[core_Investigation] suspectedOffense must be of type List of string." else: miss_prop_list.append(suspectedOffense) return case_doc.create_CoreCategory('Investigation', endAction=endAction, forensicActions=forensicActions, investigator=investigator, startAction=startAction, suspectedOffense=suspectedOffense, victim=victim)
def duck_sub_DomainName(case_doc, parent_object, isTLD=Missing()): ''' :param isTLD: Any number of type boolean. :return: A SubCategory object. ''' assert (isinstance(parent_object, case.DuckCategory) and parent_object.type=='SupportingClasses')),\ "[duck_sub_DomainName] parent_object must be of type SupportingClasses." if not isinstance(isTLD, Missing): assert isinstance(isTLD, list),\ "[duck_sub_DomainName] isTLD must be of type List of boolean." assert XSDValidator.validateXSD(isTLD, "boolean", autogenerated_xsd),\ "[duck_sub_DomainName] isTLD must be of type List of boolean." else: miss_prop_list.append(isTLD) return case_doc.create_SubCategory('DomainName', isTLD=isTLD)
def duck_sub_DictionaryItem(case_doc, parent_object, key=Missing()): ''' :param key: Any number of type string. :return: A SubCategory object. ''' assert (isinstance(parent_object, case.DuckCategory) and parent_object.type=='SupportingClasses')),\ "[duck_sub_DictionaryItem] parent_object must be of type SupportingClasses." if not isinstance(key, Missing): assert isinstance(key, list),\ "[duck_sub_DictionaryItem] key must be of type List of string." assert XSDValidator.validateXSD(key, "string", autogenerated_xsd),\ "[duck_sub_DictionaryItem] key must be of type List of string." else: miss_prop_list.append(key) return case_doc.create_SubCategory('DictionaryItem', key=key)
def core_sub_Annotation(case_doc, parent_object, tag=Missing()): ''' :param tag: Any number of type string. :return: A SubCategory object. ''' assert (isinstance(parent_object, case.CoreCategory) and parent_object.type=='Assertion')),\ "[core_sub_Annotation] parent_object must be of type Assertion." if not isinstance(tag, Missing): assert isinstance(tag, list),\ "[core_sub_Annotation] tag must be of type List of string." assert XSDValidator.validateXSD(tag, "string", autogenerated_xsd),\ "[core_sub_Annotation] tag must be of type List of string." else: miss_prop_list.append(tag) return case_doc.create_SubCategory('Annotation', tag=tag)