public class EquivalentFragmentSets extends Object
EquivalentFragmentSet.| Constructor and Description |
|---|
EquivalentFragmentSets() |
| Modifier and Type | Method and Description |
|---|---|
static EquivalentFragmentSet |
casting(VarName relation,
VarName casting)
An
EquivalentFragmentSet that indicates a variable is a relation with a casting. |
static EquivalentFragmentSet |
dataType(VarName resourceType,
ResourceType.DataType<?> dataType)
An
EquivalentFragmentSet that indicates a variable representing a resource type with a data-type. |
static EquivalentFragmentSet |
distinctCasting(VarName castingA,
VarName castingB)
An
EquivalentFragmentSet that indicates two castings are unique |
static EquivalentFragmentSet |
hasScope(VarName relation,
VarName scope)
An
EquivalentFragmentSet that indicates a variable is a relation with a scope. |
static EquivalentFragmentSet |
id(VarName start,
ConceptId id)
An
EquivalentFragmentSet that indicates a variable representing a concept with a particular ID. |
static EquivalentFragmentSet |
isa(VarName instance,
VarName type)
An
EquivalentFragmentSet that indicates a variable is an instance of a type. |
static EquivalentFragmentSet |
isAbstract(VarName start)
An
EquivalentFragmentSet that indicates a variable represents an abstract type. |
static EquivalentFragmentSet |
isaCastings(VarName casting,
VarName roleType)
An
EquivalentFragmentSet that indicates a variable is an instance of a role-type. |
static EquivalentFragmentSet |
label(VarName type,
TypeLabel label)
An
EquivalentFragmentSet that indicates a variable representing a type with a particular label. |
static EquivalentFragmentSet |
neq(VarName varA,
VarName varB)
An
EquivalentFragmentSet that indicates a variable is not equal to another variable. |
static EquivalentFragmentSet |
notCasting(VarName start)
An
EquivalentFragmentSet that indicates a variable is not a casting. |
static void |
optimiseFragmentSets(Collection<EquivalentFragmentSet> fragmentSets,
GraknGraph graph)
Modify the given collection of
EquivalentFragmentSet to introduce certain optimisations, such as the
ResourceIndexFragmentSet. |
static EquivalentFragmentSet |
plays(VarName type,
VarName roleType,
boolean required)
An
EquivalentFragmentSet that indicates a variable is a type whose instances play a role. |
static EquivalentFragmentSet |
regex(VarName resourceType,
String regex)
An
EquivalentFragmentSet that indicates a resource type whose instances must conform to a given regex. |
static EquivalentFragmentSet |
relates(VarName relationType,
VarName roleType)
An
EquivalentFragmentSet that indicates a variable is a relation type which involves a role. |
static EquivalentFragmentSet |
rolePlayer(VarName casting,
VarName rolePlayer)
An
EquivalentFragmentSet that indicates a variable is a casting connected to a role-player. |
static EquivalentFragmentSet |
shortcut(Optional<TypeLabel> roleTypeA,
VarName rolePlayerA,
Optional<TypeLabel> roleTypeB,
VarName rolePlayerB,
Optional<TypeLabel> relationType)
An
EquivalentFragmentSet that indicates a shortcut edge between two role-players. |
static EquivalentFragmentSet |
sub(VarName subType,
VarName superType)
An
EquivalentFragmentSet that indicates a variable is a sub-type of another variable. |
static EquivalentFragmentSet |
value(VarName resource,
ValuePredicateAdmin predicate)
An
EquivalentFragmentSet that indicates a variable represents a resource with value matching a predicate. |
public static EquivalentFragmentSet distinctCasting(VarName castingA, VarName castingB)
EquivalentFragmentSet that indicates two castings are uniquepublic static EquivalentFragmentSet plays(VarName type, VarName roleType, boolean required)
EquivalentFragmentSet that indicates a variable is a type whose instances play a role.type - a type variable labelroleType - a role type variable labelrequired - whether the plays must be constrained to be "required"public static EquivalentFragmentSet casting(VarName relation, VarName casting)
EquivalentFragmentSet that indicates a variable is a relation with a casting.public static EquivalentFragmentSet rolePlayer(VarName casting, VarName rolePlayer)
EquivalentFragmentSet that indicates a variable is a casting connected to a role-player.public static EquivalentFragmentSet isaCastings(VarName casting, VarName roleType)
EquivalentFragmentSet that indicates a variable is an instance of a role-type.public static EquivalentFragmentSet shortcut(Optional<TypeLabel> roleTypeA, VarName rolePlayerA, Optional<TypeLabel> roleTypeB, VarName rolePlayerB, Optional<TypeLabel> relationType)
EquivalentFragmentSet that indicates a shortcut edge between two role-players.roleTypeA - an optional role-type for rolePlayerA - a role-player variable labelroleTypeB - an optional role-type for rolePlayerB - a role-player variable labelrelationType - an optional relation-type for the shortcutpublic static EquivalentFragmentSet sub(VarName subType, VarName superType)
EquivalentFragmentSet that indicates a variable is a sub-type of another variable.public static EquivalentFragmentSet hasScope(VarName relation, VarName scope)
EquivalentFragmentSet that indicates a variable is a relation with a scope.public static EquivalentFragmentSet relates(VarName relationType, VarName roleType)
EquivalentFragmentSet that indicates a variable is a relation type which involves a role.public static EquivalentFragmentSet notCasting(VarName start)
EquivalentFragmentSet that indicates a variable is not a casting.public static EquivalentFragmentSet isa(VarName instance, VarName type)
EquivalentFragmentSet that indicates a variable is an instance of a type.public static EquivalentFragmentSet neq(VarName varA, VarName varB)
EquivalentFragmentSet that indicates a variable is not equal to another variable.public static EquivalentFragmentSet value(VarName resource, ValuePredicateAdmin predicate)
EquivalentFragmentSet that indicates a variable represents a resource with value matching a predicate.public static EquivalentFragmentSet id(VarName start, ConceptId id)
EquivalentFragmentSet that indicates a variable representing a concept with a particular ID.public static EquivalentFragmentSet isAbstract(VarName start)
EquivalentFragmentSet that indicates a variable represents an abstract type.public static EquivalentFragmentSet label(VarName type, TypeLabel label)
EquivalentFragmentSet that indicates a variable representing a type with a particular label.public static EquivalentFragmentSet dataType(VarName resourceType, ResourceType.DataType<?> dataType)
EquivalentFragmentSet that indicates a variable representing a resource type with a data-type.public static EquivalentFragmentSet regex(VarName resourceType, String regex)
EquivalentFragmentSet that indicates a resource type whose instances must conform to a given regex.public static void optimiseFragmentSets(Collection<EquivalentFragmentSet> fragmentSets, GraknGraph graph)
EquivalentFragmentSet to introduce certain optimisations, such as the
ResourceIndexFragmentSet.
This involves substituting various EquivalentFragmentSet with other EquivalentFragmentSet.Copyright © 2017 Grakn Labs Ltd. All rights reserved.