<commit_before># Generated by Xpand using M2Make template.

# Model of 'EModel' package.

ifndef __model_model_mk
__model_model_mk := 1

include mk/model/model_impl.mk

#
# Model object 'EObject'.
#
# The following features and operations are defined:
#   - reference 'eMetaClass'
#   - attribute 'eMetaClassId'
#   - attribute 'eResource'
#   - operation 'isAncestorOf'
#   - operation 'eContainer'
#   - operation 'eContainerOfType'
#   - operation 'eRootContainer'
#   - operation 'eContents'
#   - operation 'eContentsOfType'
#   - operation 'eAllContents'
#   - operation 'eAllContentsOfType'
#   - operation 'eLinks'
#   - operation 'eResolvedLinks'
#   - operation 'eUnresolvedLinks'
#
define class-EObject

	# Reference 'eMetaClass' [0..1]: derived, read-only.
	$(property eMetaClass : EMetaClass)
	# PROTECTED REGION ID(EModel_EObject_eMetaClass) ENABLED START
	$(getter eMetaClass,
		$($(get eMetaClassId)))
	# PROTECTED REGION END

	# Attribute 'eMetaClassId': derived, read-only.
	$(property eMetaClassId)
	# PROTECTED REGION ID(EModel_EObject_eMetaClassId) ENABLED START
	$(getter eMetaClassId,$(error Subclass must override eMetaClassId property))
	# PROTECTED REGION END

	# Attribute 'eResource': derived, read-only.
	$(property eResource)
	# PROTECTED REGION ID(EModel_EObject_eResource) ENABLED START
	$(getter eResource,
		$(get-field $(invoke eRootContainer).__eContainer))
	# PROTECTED REGION END

	# Method 'isAncestorOf'.
	#   1. object : EObject
	# PROTECTED REGION ID(EModel_EObject_isAncestorOf) ENABLED START
	$(method isAncestorOf,
		$(for container <- $(invoke 1->eContainer),
			$(or $(filter $(this),$(container)),
				$(invoke isAncestorOf,$(container)))))
	# PROTECTED REGION END

	# Method 'eContainer : EObject'.
	# PROTECTED REGION ID(EModel_EObject_eContainer) ENABLED START
	$(method eContainer : EObject,
		$(for c <- $(get-field __eContainer),
			$(if $(basename $c),$(suffix $c))))
	# PROTECTED REGION END

	# Method 'eContainerOfType : EObject'.
	#   1. someClass : EMetaClass
	# PROTECTED REGION ID(EModel_EObject_eContainerOfType) ENABLED START
	$(method eContainerOfType,
		$(for container <- $(invoke eContainer),
			$(if $(invoke 1->isInstance,$(container)),
				$(container),$(invoke container->eContainerOfType,$1))))
	# PROTECTED REGION END

	# Method 'eRootContainer : EObject'.
	# PROTECTED REGION ID(EModel_EObject_eRootContainer) ENABLED START
	$(method eRootContainer : EObject,
		$(or $(for container <- $(invoke eContainer),
				$(invoke container->eRootContainer)),
			$(this)))
	# PROTECTED REGION END

	# Method 'eContents... : EObject'.
	# PROTECTED REGION ID(EModel_EObject_eContents) ENABLED START
	$(method eContents... : EObject,
		$(for metaReference <- $(get $(get eMetaClass).eAllContainments),
			$(get $(get metaReference->instanceProperty))))
	# PROTECTED REGION END

	# Method 'eContentsOfType... : EObject'.
	#   1. someClass : EMetaClass
	# PROTECTED REGION ID(EModel_EObject_eContentsOfType) ENABLED START
	$(method eContentsOfType... : EObject,
		$(for metaReference <- $(get $(get eMetaClass).eAllContainments),
			$(if $(invoke 1->isSuperTypeOf,
					$(get metaReference->eReferenceType)),
				$(get $(get metaReference->instanceProperty)),
				$(for child <- $(get $(get metaReference->instanceProperty)),
					$(invoke child->eContentsOfType,$1))
			)
		)
	)
	# PROTECTED REGION END

	# Method 'eAllContents... : EObject'.
	# PROTECTED REGION ID(EModel_EObject_eAllContents) ENABLED START
	$(method eAllContents... : EObject,
		$(for child <- $(invoke eContents),
			$(child) $(invoke child->eAllContents)))
	# PROTECTED REGION END

	# Method 'eAllContentsOfType... : EObject'.
	#   1. someClass : EMetaClass
	# PROTECTED REGION ID(EModel_EObject_eAllContentsOfType) ENABLED START
	$(method eAllContentsOfType... : EObject,
		$(for child <- $(invoke eContentsOfType,$1),
			$(child) $(invoke child->eAllContentsOfType,$1)))
	# PROTECTED REGION END

	# Method 'eLinks... : ELink'.
	# PROTECTED REGION ID(EModel_EObject_eLinks) ENABLED START
	$(method eLinks... : ELink,
		$(subst ./,,$(dir \
			$(for metaReference <- $(get $(get eMetaClass).eAllLinkables),
				$(get-field $(get-field metaReference->instanceProperty)))
		))
	)
	# PROTECTED REGION END

	# Method 'eResolvedLinks... : ELink'.
	# PROTECTED REGION ID(EModel_EObject_eResolvedLinks) ENABLED START
	$(method eResolvedLinks... : ELink,
		$(for l <- $(invoke eLinks),
			$(if $(invoke l->eTarget),$l))
	)
	# PROTECTED REGION END

	# Method 'eUnresolvedLinks... : ELink'.
	# PROTECTED REGION ID(EModel_EObject_eUnresolvedLinks) ENABLED START
	$(method eUnresolvedLinks... : ELink,
		$(subst ./,,$(filter %./,
			$(for metaReference <- $(get $(get eMetaClass).eAllLinkables),
				$(get-field $(get-field metaReference->instanceProperty)))
		))
	)
	# PROTECTED REGION END

	# PROTECTED REGION ID(EModel_EObject) ENABLED START

	# 'property/oppositeProperty.object'
	# '.object' for resource containment.
	$(field __eContainer : EObject)

	# 'property[.link].object'
	$(field __eOppositeRefs... : EObject)

	$(method __serialize_extra_objects,
		$(invoke eLinks) \
		$(suffix $(get-field __eOppositeRefs) \
			$(basename $(get-field __eOppositeRefs))))

	# PROTECTED REGION END
endef

#
# Model object 'ENamedObject'.
#
# The following features and operations are defined:
#   - attribute 'name'
#   - attribute 'qualifiedName'
#   - attribute 'origin'
#   - operation 'eInverseResolvedLinks'
#
define class-ENamedObject
	# Extends 'EObject' class (implicitly).
	$(eobject EModel_ENamedObject,
		ENamedObject,,)

	# Property 'name'.
	$(eobject-attribute EModel_ENamedObject_name,
		name,changeable)

	# Attribute 'qualifiedName': derived, read-only.<commit_msg>mybuild: serialization logic changed<commit_after># Generated by Xpand using M2Make template.

# Model of 'EModel' package.

ifndef __model_model_mk
__model_model_mk := 1

include mk/model/model_impl.mk

#
# Model object 'EObject'.
#
# The following features and operations are defined:
#   - reference 'eMetaClass'
#   - attribute 'eMetaClassId'
#   - attribute 'eResource'
#   - operation 'isAncestorOf'
#   - operation 'eContainer'
#   - operation 'eContainerOfType'
#   - operation 'eRootContainer'
#   - operation 'eContents'
#   - operation 'eContentsOfType'
#   - operation 'eAllContents'
#   - operation 'eAllContentsOfType'
#   - operation 'eLinks'
#   - operation 'eResolvedLinks'
#   - operation 'eUnresolvedLinks'
#
define class-EObject

	# Reference 'eMetaClass' [0..1]: derived, read-only.
	$(property eMetaClass : EMetaClass)
	# PROTECTED REGION ID(EModel_EObject_eMetaClass) ENABLED START
	$(getter eMetaClass,
		$($(get eMetaClassId)))
	# PROTECTED REGION END

	# Attribute 'eMetaClassId': derived, read-only.
	$(property eMetaClassId)
	# PROTECTED REGION ID(EModel_EObject_eMetaClassId) ENABLED START
	$(getter eMetaClassId,$(error Subclass must override eMetaClassId property))
	# PROTECTED REGION END

	# Attribute 'eResource': derived, read-only.
	$(property eResource)
	# PROTECTED REGION ID(EModel_EObject_eResource) ENABLED START
	$(getter eResource,
		$(get-field $(invoke eRootContainer).__eContainer))
	# PROTECTED REGION END

	# Method 'isAncestorOf'.
	#   1. object : EObject
	# PROTECTED REGION ID(EModel_EObject_isAncestorOf) ENABLED START
	$(method isAncestorOf,
		$(for container <- $(invoke 1->eContainer),
			$(or $(filter $(this),$(container)),
				$(invoke isAncestorOf,$(container)))))
	# PROTECTED REGION END

	# Method 'eContainer : EObject'.
	# PROTECTED REGION ID(EModel_EObject_eContainer) ENABLED START
	$(method eContainer : EObject,
		$(for c <- $(get-field __eContainer),
			$(if $(basename $c),$(suffix $c))))
	# PROTECTED REGION END

	# Method 'eContainerOfType : EObject'.
	#   1. someClass : EMetaClass
	# PROTECTED REGION ID(EModel_EObject_eContainerOfType) ENABLED START
	$(method eContainerOfType,
		$(for container <- $(invoke eContainer),
			$(if $(invoke 1->isInstance,$(container)),
				$(container),$(invoke container->eContainerOfType,$1))))
	# PROTECTED REGION END

	# Method 'eRootContainer : EObject'.
	# PROTECTED REGION ID(EModel_EObject_eRootContainer) ENABLED START
	$(method eRootContainer : EObject,
		$(or $(for container <- $(invoke eContainer),
				$(invoke container->eRootContainer)),
			$(this)))
	# PROTECTED REGION END

	# Method 'eContents... : EObject'.
	# PROTECTED REGION ID(EModel_EObject_eContents) ENABLED START
	$(method eContents... : EObject,
		$(for metaReference <- $(get $(get eMetaClass).eAllContainments),
			$(get $(get metaReference->instanceProperty))))
	# PROTECTED REGION END

	# Method 'eContentsOfType... : EObject'.
	#   1. someClass : EMetaClass
	# PROTECTED REGION ID(EModel_EObject_eContentsOfType) ENABLED START
	$(method eContentsOfType... : EObject,
		$(for metaReference <- $(get $(get eMetaClass).eAllContainments),
			$(if $(invoke 1->isSuperTypeOf,
					$(get metaReference->eReferenceType)),
				$(get $(get metaReference->instanceProperty)),
				$(for child <- $(get $(get metaReference->instanceProperty)),
					$(invoke child->eContentsOfType,$1))
			)
		)
	)
	# PROTECTED REGION END

	# Method 'eAllContents... : EObject'.
	# PROTECTED REGION ID(EModel_EObject_eAllContents) ENABLED START
	$(method eAllContents... : EObject,
		$(for child <- $(invoke eContents),
			$(child) $(invoke child->eAllContents)))
	# PROTECTED REGION END

	# Method 'eAllContentsOfType... : EObject'.
	#   1. someClass : EMetaClass
	# PROTECTED REGION ID(EModel_EObject_eAllContentsOfType) ENABLED START
	$(method eAllContentsOfType... : EObject,
		$(for child <- $(invoke eContentsOfType,$1),
			$(child) $(invoke child->eAllContentsOfType,$1)))
	# PROTECTED REGION END

	# Method 'eLinks... : ELink'.
	# PROTECTED REGION ID(EModel_EObject_eLinks) ENABLED START
	$(method eLinks... : ELink,
		$(subst ./,,$(dir \
			$(for metaReference <- $(get $(get eMetaClass).eAllLinkables),
				$(get-field $(get-field metaReference->instanceProperty)))
		))
	)
	# PROTECTED REGION END

	# Method 'eResolvedLinks... : ELink'.
	# PROTECTED REGION ID(EModel_EObject_eResolvedLinks) ENABLED START
	$(method eResolvedLinks... : ELink,
		$(for l <- $(invoke eLinks),
			$(if $(invoke l->eTarget),$l))
	)
	# PROTECTED REGION END

	# Method 'eUnresolvedLinks... : ELink'.
	# PROTECTED REGION ID(EModel_EObject_eUnresolvedLinks) ENABLED START
	$(method eUnresolvedLinks... : ELink,
		$(subst ./,,$(filter %./,
			$(for metaReference <- $(get $(get eMetaClass).eAllLinkables),
				$(get-field $(get-field metaReference->instanceProperty)))
		))
	)
	# PROTECTED REGION END

	# PROTECTED REGION ID(EModel_EObject) ENABLED START

	# 'property/oppositeProperty.object'
	# '.object' for resource containment.
	$(field __eContainer : EObject)

	# 'property[.link].object'
	$(field __eOppositeRefs... : EObject)

	$(method __serialize_extra_objects,
		$(invoke eLinks) \
		$(suffix $(get-field __eOppositeRefs) \
			$(basename $(get-field __eOppositeRefs))) \
		# XXX truely natu:rlich
		$(for metaReference <- $(get $(get eMetaClass).eAllCrossReferences),
			$(if $(filter-out eMeta%,$(get metaReference->instanceProperty)),
				$(get $(get metaReference->instanceProperty))))))

	# PROTECTED REGION END
endef

#
# Model object 'ENamedObject'.
#
# The following features and operations are defined:
#   - attribute 'name'
#   - attribute 'qualifiedName'
#   - attribute 'origin'
#   - operation 'eInverseResolvedLinks'
#
define class-ENamedObject
	# Extends 'EObject' class (implicitly).
	$(eobject EModel_ENamedObject,
		ENamedObject,,)

	# Property 'name'.
	$(eobject-attribute EModel_ENamedObject_name,
		name,changeable)

	# Attribute 'qualifiedName': derived, read-only.
{'fraction_non_alphanumeric': 0.13859769719883142, 'fraction_numerical': 0.0025777625021481355, 'mean_word_length': 4.582254196642686, 'pattern_counts': {'":': 0, '<': 28, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2049290', 'n_tokens_mistral': 4244, 'n_tokens_neox': 3984, 'n_words': 917}