| Package | Description |
|---|---|
| ai.grakn |
A core package for connecting to a Grakn knowledge graph.
|
| ai.grakn.concept |
Provides the meta-ontology interfaces and definitions.
|
| ai.grakn.graph.admin | |
| ai.grakn.graph.internal |
Internal implementation of Grakn graph.
|
| ai.grakn.graql.internal.reasoner | |
| ai.grakn.migration.owl |
Implements migration of OWL into Grakn.
|
| Modifier and Type | Method and Description |
|---|---|
RelationType |
GraknGraph.getRelationType(String label)
Get the Relation Type with the label provided, if it exists.
|
RelationType |
GraknGraph.putRelationType(String label)
Create a
RelationType with super-type relation, or return a pre-existing RelationType,
with the specified label. |
RelationType |
GraknGraph.putRelationType(TypeLabel label)
Create a
RelationType with super-type relation, or return a pre-existing RelationType,
with the specified label. |
| Modifier and Type | Method and Description |
|---|---|
RelationType |
Concept.asRelationType()
Return as a Relation Type if the concept is a Relation Type.
|
RelationType |
RelationType.copy() |
RelationType |
RelationType.deletePlays(RoleType roleType)
Removes the RoleType to prevent instances of this RelationType from playing it.
|
RelationType |
RelationType.deleteRelates(RoleType roleType)
Delete a RoleType from this RelationType
|
RelationType |
RelationType.deleteScope(Instance scope)
Delete the scope specified.
|
RelationType |
RelationType.key(ResourceType resourceType)
Creates a RelationType which allows this type and a resource type to be linked in a strictly one-to-one mapping.
|
RelationType |
RelationType.plays(RoleType roleType)
Sets the RoleType which instances of this RelationType may play.
|
RelationType |
RelationType.relates(RoleType roleType)
Sets a new RoleType for this RelationType.
|
RelationType |
RelationType.resource(ResourceType resourceType)
Creates a RelationType which allows this type and a resource type to be linked.
|
RelationType |
RelationType.scope(Instance scope)
Classifies the type to a specific scope.
|
RelationType |
RelationType.setAbstract(Boolean isAbstract)
Sets the RelationType to be abstract - which prevents it from having any instances.
|
RelationType |
RelationType.subType(RelationType type)
Adds another subtype to this type
|
RelationType |
RelationType.superType()
Returns the direct supertype of this RelationType.
|
RelationType |
RelationType.superType(RelationType type)
Sets the supertype of the RelationType to be the RelationType specified.
|
RelationType |
Relation.type()
Retrieve the associated Relation Type for this Relation.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<RelationType> |
RoleType.relationTypes()
Returns the RelationTypes that this RoleType takes part in.
|
Collection<RelationType> |
RelationType.subTypes()
Returns a collection of subtypes of this RelationType.
|
| Modifier and Type | Method and Description |
|---|---|
RelationType |
RelationType.subType(RelationType type)
Adds another subtype to this type
|
RelationType |
RelationType.superType(RelationType type)
Sets the supertype of the RelationType to be the RelationType specified.
|
| Modifier and Type | Method and Description |
|---|---|
RelationType |
GraknAdmin.getMetaRelationType()
Get the root of all Relation Types.
|
| Modifier and Type | Method and Description |
|---|---|
RelationType |
AbstractGraknGraph.getMetaRelationType() |
RelationType |
AbstractGraknGraph.getRelationType(String label) |
RelationType |
AbstractGraknGraph.putRelationType(String label) |
RelationType |
AbstractGraknGraph.putRelationType(TypeLabel label) |
| Modifier and Type | Field and Description |
|---|---|
static java.util.function.Function<RoleType,Set<RelationType>> |
Utility.roleToRelationTypes
convert given role type to a set of relation types in which it can appear
|
static java.util.function.Function<Type,Set<RelationType>> |
Utility.typeToRelationTypes
convert given entity type to a set of relation types in which it can play roles
|
| Modifier and Type | Method and Description |
|---|---|
static <T extends Type> |
Utility.getCompatibleRelationTypes(Set<T> types,
java.util.function.Function<T,Set<RelationType>> typeMapper)
compute the set of compatible relation types for given types (intersection of allowed sets of relation types for each entry type)
|
| Modifier and Type | Method and Description |
|---|---|
static Rule |
Utility.createPropertyChainRule(RelationType relation,
TypeLabel fromRoleLabel,
TypeLabel toRoleLabel,
LinkedHashMap<RelationType,javafx.util.Pair<TypeLabel,TypeLabel>> chain,
GraknGraph graph)
creates rule R(fromRole: x, toRole: xm) :- R1(fromRole: x, ...), , R2, ...
|
static Rule |
Utility.createReflexiveRule(RelationType relType,
TypeLabel fromRoleLabel,
TypeLabel toRoleLabel,
GraknGraph graph)
create reflexive rule R(from: X, to: X) :- R(from: X,to: Y)
|
static Rule |
Utility.createSubPropertyRule(RelationType parent,
RelationType child,
Map<TypeLabel,TypeLabel> roleMappings,
GraknGraph graph)
creates rule parent :- child
|
static Rule |
Utility.createTransitiveRule(RelationType relType,
TypeLabel fromRoleLabel,
TypeLabel toRoleLabel,
GraknGraph graph)
create transitive rule R(from: X, to: Y) :- R(from: X,to: Z), R(from: Z, to: Y)
|
| Modifier and Type | Method and Description |
|---|---|
static Rule |
Utility.createPropertyChainRule(RelationType relation,
TypeLabel fromRoleLabel,
TypeLabel toRoleLabel,
LinkedHashMap<RelationType,javafx.util.Pair<TypeLabel,TypeLabel>> chain,
GraknGraph graph)
creates rule R(fromRole: x, toRole: xm) :- R1(fromRole: x, ...), , R2, ...
|
static <T extends Type> |
Utility.getCompatibleRelationTypes(Set<T> types,
java.util.function.Function<T,Set<RelationType>> typeMapper)
compute the set of compatible relation types for given types (intersection of allowed sets of relation types for each entry type)
|
| Modifier and Type | Method and Description |
|---|---|
RelationType |
OWLMigrator.relation(org.semanticweb.owlapi.model.OWLAnnotationProperty property) |
RelationType |
OWLMigrator.relation(org.semanticweb.owlapi.model.OWLDataProperty property) |
RelationType |
OWLMigrator.relation(org.semanticweb.owlapi.model.OWLObjectProperty property) |
| Modifier and Type | Method and Description |
|---|---|
RoleType |
OWLMigrator.objectRole(RelationType relType) |
RoleType |
OWLMigrator.subjectRole(RelationType relType) |
Copyright © 2017 Grakn Labs Ltd. All rights reserved.