Advanced properties on model elements - mondo-project/mondo-hawk GitHub Wiki
When querying through EOL, we can access several extra properties on any model element:
eContainer
: returns the model element that contains this one, or fails if it does not have a container.eContainers
: safer version ofeContainer
which returns a single-element collection with the model element that contains this one, or an empty collection if it does not have a container. Useful for closures.eContents
: returns a collection with all the model elements contained within this one.hawkFile
: returns a string with the repository paths of the files that this model element belongs to, separated by ";".hawkFiles
: returns a collection with the repository paths of all the files that this model element belongs to.hawkIn
: returns a collection with all the model elements accessible through incoming references.hawkInEdges
: returns a collection with all the incoming references (see their attributes below).hawkOut
: returns a collection with all the model elements accessible through outgoing references.hawkOutEdges
: returns a collection with all the outgoing references (see their attributes below).hawkRepo
: returns a string with the URLs of the repositories that this model element belongs to, separated by ";".hawkRepos
: returns a collection with all the repositories that this model element belongs to.hawkURIFragment
: returns the URI fragment of the model element within its file.
There is also the isContainedWithin(repo, path)
method for checking if an element is directly or indirectly contained within a certain file.
References are wrapped into entities of their own, with the following attributes:
edge
: raw edge, without wrapping.type
/name
: name of the reference.source
/startNode
: source of the reference.target
/endNode
: target of the reference.