Model

@Entity
class Model(var dataID: Long? = null, nodes: MutableSet<Node> = HashSet(), var fragment: Fragment? = null)

The Model is the part of a Fragment representing type information. The Model is an object-oriented class structure. Classes are denoted as Nodes. Nodes can be connected through associations and inheritance. These relations are directed edges and are owned by the starting node. A Node can compose other Nodes (part-of relationship).

Constructors

Link copied to clipboard
constructor()
constructor(dataID: Long? = null, nodes: MutableSet<Node> = HashSet(), fragment: Fragment? = null)

Properties

Link copied to clipboard
var dataID: Long?

Technical database (JPA) identifier used for relation joins. The dataID is system specific and not exported to XML. It must not be used to identify elements in distributed use-cases. It should not be used to identify elements from outside the service. All model elements provide other suitable identifiers to be used.

Link copied to clipboard

Backlink to Fragment to improve traversal.

Functions

Link copied to clipboard
fun addNode(node: Node): Boolean
Link copied to clipboard
fun autowire()
Link copied to clipboard
fun findNode(uri: String): Node?
Link copied to clipboard
fun findScript(scriptURI: String): Script?

Find the Script with the provided URI in the set of Nodes.

Link copied to clipboard
fun getNodes(): Set<Node>
Link copied to clipboard
Link copied to clipboard
fun removeNode(node: Node): Boolean
Link copied to clipboard
fun sliceDeep(rootNodeURI: String): Set<Node>

Create a slice of the Node set. The slice includes the inheritance hierarchy of the root as well as compositions and their inheritance hierarchies recursively. This method is cycle-safe.