ModelMembers

reqt.ModelMembers
transparent trait ModelMembers

Operations of trait Model *

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Model
Self type

Members list

Value members

Concrete methods

def +(e: Elem): Model
def ++(other: Model): Model

A new Model with each elem of other Model added to elems of this Model. Same as m.addAll(other) *

A new Model with each elem of other Model added to elems of this Model. Same as m.addAll(other) *

Attributes

def +:(e: Elem): Model

A new Model with elem e prepended to the elems of this Model. Same as m.prepend(e)

A new Model with elem e prepended to the elems of this Model. Same as m.prepend(e)

Attributes

def -(e: Elem): Model
def -(t: ElemType): Model
def -(l: Link): Model
def /(link: Link): Model

A sub-model of Link *

A sub-model of Link *

Attributes

def /(p: LinkPath): Model

A deep sub-model recursing into a sequence of links in a LinkPath. *

A deep sub-model recursing into a sequence of links in a LinkPath. *

Attributes

def /[T](a: Attr[T]): Boolean
def /[T](at: AttrType[T]): Vector[T]
def /(e: Ent): Boolean
def /(et: EntType): Vector[String]
def /[T](u: Undefined[T]): Vector[Undefined[T]]
def /(ut: Undefined.type): Vector[Undefined[_]]
def /[T](p: AttrTypePath[T]): Vector[T]
def /[T](p: AttrPath[T]): Boolean
def /[T](p: EntPath): Boolean
def /[T](p: EntTypePath): Vector[String]
def :+(e: Elem): Model

A new Model with elem e appended to the elems of this Model. Same as m.append(e)

A new Model with elem e appended to the elems of this Model. Same as m.append(e)

Attributes

def :++(other: Model): Model
def add(e: Elem): Model

Append an elem if not already exists at top level. Relations are merged using mergeFirst.

Append an elem if not already exists at top level. Relations are merged using mergeFirst.

Attributes

def addAll(es: Elem*): Model
def addAll(es: Vector[Elem]): Model
def addAll(other: Model): Model
def append(e: Elem): Model

A new Model with elem e appended to the elems of this Model. Same as m :+ e

A new Model with elem e appended to the elems of this Model. Same as m :+ e

Attributes

def append(other: Model): Model

A new Model with other Model's elems appended to elems. Same as: m :++ other NOTE: Different from m ++ other

A new Model with other Model's elems appended to elems. Same as: m :++ other NOTE: Different from m ++ other

Attributes

Attributes

def atoms: Vector[Elem]
def attrs: Vector[Attr[_]]
def attrsOfType(sat: StrAttrType): Vector[StrAttr]
def attrsOfType(iat: IntAttrType): Vector[IntAttr]
def bottom(n: Int): Model
def cut(depth: Int): Model

Cut all relations so that no relations is deeper than depth. cut(0) == tip, cut(1) == top *

Cut all relations so that no relations is deeper than depth. cut(0) == tip, cut(1) == top *

Attributes

A new model constructed by adding all elems using add one by one giving no duplicates per level.

A new model constructed by adding all elems using add one by one giving no duplicates per level.

Attributes

A new Model with recursive de-duplication of its attributes by type on all levels. *

A new Model with recursive de-duplication of its attributes by type on all levels. *

Attributes

A new Model with recursive de-duplication of its elems on all levels. *

A new Model with recursive de-duplication of its elems on all levels. *

Attributes

A new Model that is distinct by top-level attribute type (non-recursive). *

A new Model that is distinct by top-level attribute type (non-recursive). *

Attributes

A new Model with distinct top-level elems (non-recursive). *

A new Model with distinct top-level elems (non-recursive). *

Attributes

def entTypes: Vector[EntType]
def entTypesOfId(id: String): Set[EntType]
def ents: Vector[Ent]
def entsOfId(id: String): Vector[Ent]
def entsOfType(et: EntType): Vector[Ent]
def expand: Model
def firstEntOfId(id: String): Option[Ent]
def intAttrs: Vector[IntAttr]
def intValues: Vector[Int]
def isIdTypeDistinct: Boolean
def isNormal: Boolean

True if this model is in normal form.

True if this model is in normal form.

Attributes

infix def keep(s: Expr): Model

A Model with elems deeply filtered according to a selection expression. *

A Model with elems deeply filtered according to a selection expression. *

Attributes

def leafRelsOf[T](at: AttrType[T]): Model
def linkMapOf(et: EntType): Map[Link, Model]

Submodels with same link are merged *

Submodels with same link are merged *

Attributes

def md: String
def mergeFirst(r: Rel): Model

merge sub model of r with the sub model of first relations with the same link or append r to elems

merge sub model of r with the sub model of first relations with the same link or append r to elems

Attributes

def nodes: Vector[Node]
def nonTypeDistinctIds: Map[String, Set[EntType]]

A Model in normal form: elems are added one by one replacing same nodes and then sorted. *

A Model in normal form: elems are added one by one replacing same nodes and then sorted. *

Attributes

def paths: Vector[Path]
def pathsOf[T](at: AttrType[T]): Vector[AttrPath[T]]
def prepend(e: Elem): Model

A new Model with elem e prepended to the elems of this Model. Same as e +: m

A new Model with elem e prepended to the elems of this Model. Same as e +: m

Attributes

def prune: Model
def relTypes: Vector[RelType]
def rels: Vector[Rel]

All empty relations at any depth are replaced by its entity.

All empty relations at any depth are replaced by its entity.

Attributes

def showCompact: String
def showLines: String
def size: Int

The number of elems at top level plus the sum of sizes of all sub models *

The number of elems at top level plus the sum of sizes of all sub models *

Attributes

def sortLeafRelsBy[T](iat: IntAttrType, rt: RelType): Vector[Ent]
def sorted(using Ordering[Elem]): Model

Recursively sort elems alphabetically.

Recursively sort elems alphabetically.

Attributes

def strAttrs: Vector[StrAttr]
def strValues: Vector[String]
def sub: Model
def tip: Model

A Model with the nodes but not relations at the top of this Model.

A Model with the nodes but not relations at the top of this Model.

Attributes

def toMarkdown: String
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
def top: Model

A Model with the tip of this Model and the tip of its sub-models.

A Model with the tip of this Model and the tip of its sub-models.

Attributes

def trim: Model

Attributes

def undefined: Vector[Undefined[_]]
def updated[T](a: Attr[T]): Model

A new model first attribute of same type updated to a or appended to elems if not in elems.tip.

A new model first attribute of same type updated to a or appended to elems if not in elems.tip.

Attributes

def withRank(iat: IntAttrType, rt: RelType): Vector[Rel]
def withRankDistinct(et: EntType, iat: IntAttrType, rt: RelType): Vector[Rel]

Concrete fields

lazy val idMap: Map[String, Vector[Ent]]
lazy val idTypeMap: Map[String, Set[EntType]]
lazy val ids: Vector[String]
lazy val leafRels: Model
lazy val leafs: Model