EdgeType

scalation.database.graph.EdgeType
See theEdgeType companion object
class EdgeType(_name: String, val from: VertexType, val schema: Schema, val to: VertexType, val edges: ArrayBuffer[Edge], val color: Color, val shape: CurvilinearShape) extends Identifiable, Serializable

The EdgeType class collects edges of the same type, e.g., knows relationship type. An edge-type is analogous to a relation with foreign keys in an RDBMS.

Value parameters

_name

the name of this edge-type ('name' from Identifiable)

color

the display color for edges of this type

edges

the set of edges having this edge-type (extension)

from

the source vertex

schema

the property names for this edge-type

shape

the display shape template for edges of this type

to

the target vertex

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Identifiable
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

inline def -(et2: EdgeType): EdgeType
def add(es: Edge*): Unit

Add edges into the existing list of edges in this edge-type.

Add edges into the existing list of edges in this edge-type.

Value parameters

es

the edges to add

Attributes

def check: Boolean

Check that the properties names are in the schema for this edge-type, returning whether they match the schema.

Check that the properties names are in the schema for this edge-type, returning whether they match the schema.

Attributes

def delete(e: Edge): EdgeType

Delete a single edge from the existing list of edges in this edge-type. returning the updated edge type/set.

Delete a single edge from the existing list of edges in this edge-type. returning the updated edge type/set.

Value parameters

e

the edge to delete

Attributes

Make all the edges in this edge-type distinct, i.e., no duplicate edges.

Make all the edges in this edge-type distinct, i.e., no duplicate edges.

Attributes

Expand this edge-type with both its from and to vertex-types.

Expand this edge-type with both its from and to vertex-types.

Attributes

Expand this edge-type with its from vertex-type.

Expand this edge-type with its from vertex-type.

Attributes

Expand this edge-type with its 'to' vertex-type, appending its properties.

Expand this edge-type with its 'to' vertex-type, appending its properties.

Attributes

def insert(e: Edge): EdgeType

Insert a single edge into the existing list of edges in this edge-type. returning the updated edge type/set.

Insert a single edge into the existing list of edges in this edge-type. returning the updated edge type/set.

Value parameters

e

the edge to insert

Attributes

infix def intersect(et2: EdgeType): EdgeType

Intersect this edge-type with a second edge-type.

Intersect this edge-type with a second edge-type.

Value parameters

et2

the second edge-type

Attributes

def limit(n: Int, s: Int): EdgeType

Limit the number of edges to n after skipping the first s.

Limit the number of edges to n after skipping the first s.

Value parameters

n

the number of edges to keep

s

the number of edges to skip

Attributes

infix def minus(et2: EdgeType): EdgeType

Subtract (minus) second edge-type from this edge-type.

Subtract (minus) second edge-type from this edge-type.

Value parameters

et2

the second edge-type

Attributes

Return a new shape object based on the shape template.

Return a new shape object based on the shape template.

Attributes

def orderBy(pname: String): EdgeType

Order the edges within this edge-type by the values of the given property name.

Order the edges within this edge-type by the values of the given property name.

Value parameters

pname

the property name on which to sort

Attributes

Project each edge in this edge-type down to the given subschema x of properties.

Project each edge in this edge-type down to the given subschema x of properties.

Value parameters

x

the subset of property names (subschema) to project onto

Attributes

inline def project(x: String): EdgeType
def rename(pOld: String, pNew: String): EdgeType

Rename the old property name with the new property name.

Rename the old property name with the new property name.

Value parameters

pNew

new property name

pOld

existing property name

Attributes

def select(pred: Property => Boolean): EdgeType

Select the edges in this edge-type that satisfy the predicate.

Select the edges in this edge-type that satisfy the predicate.

Value parameters

pred

the predicate to satisfy

Attributes

def show(rng: Range): Unit

SHOW/print this table, one edge per row. Formatting: regular column is 'width_' chars wide, 'X' is double that FIX - currently only works for width_, not width

SHOW/print this table, one edge per row. Formatting: regular column is 'width_' chars wide, 'X' is double that FIX - currently only works for width_, not width

Value parameters

rng

the range of edges to show (e.g, 0 until 10), defaults to all

Attributes

override def toString: String

Convert this edge-type to a string.

Convert this edge-type to a string.

Attributes

Definition Classes
Any
infix def union(et2: EdgeType): EdgeType

Union this edge-type with a second edge-type with no duplication.

Union this edge-type with a second edge-type with no duplication.

Value parameters

et2

the second edge-type

Attributes

infix def unionAll(et2: EdgeType): EdgeType

Union this edge-type with a second edge-type.

Union this edge-type with a second edge-type.

Value parameters

et2

the second edge-type

Attributes

inline def π(x: String): EdgeType
inline def σ(pred: Property => Boolean): EdgeType
inline def (et2: EdgeType): EdgeType
inline def (et2: EdgeType): EdgeType

Inherited methods

override def equals(that: Any): Boolean

Determine whether Identifiable object 'this' equals Identifiable object 'that'. Works since 'id' is unique for all Identifiable objects.

Determine whether Identifiable object 'this' equals Identifiable object 'that'. Works since 'id' is unique for all Identifiable objects.

Attributes

Definition Classes
Identifiable -> Any
Inherited from:
Identifiable
override def hashCode: Int

Return the hashCode as the unique id.

Return the hashCode as the unique id.

Attributes

Definition Classes
Identifiable -> Any
Inherited from:
Identifiable
def me: String

Return the full identity.

Return the full identity.

Attributes

Inherited from:
Identifiable
def typeName: String

Get the type of the object.

Get the type of the object.

Attributes

Inherited from:
Identifiable

Concrete fields

val color: Color
val edges: ArrayBuffer[Edge]
val schema: Schema
val to: VertexType

Inherited fields

val id: Int

Attributes

Inherited from:
Identifiable
val name: String

Attributes

Inherited from:
Identifiable