| 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.atom.binary | |
| ai.grakn.graql.internal.reasoner.utils | |
| ai.grakn.graql.internal.reasoner.utils.conversion | |
| 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(Label label)
Create a
RelationType with super-type relation, or return a pre-existing RelationType,
with the specified label. |
RelationType |
GraknGraph.putRelationType(String 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()
|
RelationType |
RelationType.deletePlays(Role role)
Removes the Role to prevent instances of this RelationType from playing it.
|
RelationType |
RelationType.deleteRelates(Role role)
Delete a Role from this RelationType
|
RelationType |
RelationType.deleteScope(Thing 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(Role role)
Sets the Role which instances of this RelationType may play.
|
RelationType |
RelationType.relates(Role role)
Sets a new Role 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(Thing 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.sub(RelationType type)
Adds another subtype to this type
|
RelationType |
RelationType.sup()
Returns the direct supertype of this RelationType.
|
RelationType |
RelationType.sup(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> |
Role.relationTypes()
Returns the RelationTypes that this Role takes part in.
|
Collection<RelationType> |
RelationType.subs()
Returns a collection of subtypes of this RelationType.
|
| Modifier and Type | Method and Description |
|---|---|
RelationType |
RelationType.sub(RelationType type)
Adds another subtype to this type
|
RelationType |
RelationType.sup(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(Label label) |
RelationType |
AbstractGraknGraph.putRelationType(String label) |
| Modifier and Type | Method and Description |
|---|---|
List<RelationType> |
RelationAtom.inferPossibleRelationTypes(Answer sub)
infer relation types that this relation atom can potentially have
NB: entity types and role types are treated separately as they behave differently:
entity types only play the explicitly defined roles (not the relevant part of the hierarchy of the specified role)
|
| Modifier and Type | Method and Description |
|---|---|
static <T extends OntologyConcept> |
ReasonerUtils.getCompatibleRelationTypesWithRoles(Set<T> types,
OntologyConceptConverter<T> ontologyConceptConverter)
compute the map of compatible relation types for given types (intersection of allowed sets of relation types for each entry type)
and compatible role types
|
| Modifier and Type | Method and Description |
|---|---|
static Rule |
ReasonerUtils.createPropertyChainRule(RelationType relation,
Label fromRoleLabel,
Label toRoleLabel,
LinkedHashMap<RelationType,javafx.util.Pair<Label,Label>> chain,
GraknGraph graph)
creates rule R(fromRole: x, toRole: xm) :- R1(fromRole: x, ...), , R2, ...
|
static Rule |
ReasonerUtils.createReflexiveRule(RelationType relType,
Label fromRoleLabel,
Label toRoleLabel,
GraknGraph graph)
create reflexive rule R(from: X, to: X) :- R(from: X,to: Y)
|
static Rule |
ReasonerUtils.createSubPropertyRule(RelationType parent,
RelationType child,
Map<Label,Label> roleMappings,
GraknGraph graph)
creates rule parent :- child
|
static Rule |
ReasonerUtils.createTransitiveRule(RelationType relType,
Label fromRoleLabel,
Label 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 |
ReasonerUtils.createPropertyChainRule(RelationType relation,
Label fromRoleLabel,
Label toRoleLabel,
LinkedHashMap<RelationType,javafx.util.Pair<Label,Label>> chain,
GraknGraph graph)
creates rule R(fromRole: x, toRole: xm) :- R1(fromRole: x, ...), , R2, ...
|
| Modifier and Type | Method and Description |
|---|---|
com.google.common.collect.Multimap<RelationType,Role> |
OntologyConceptConverterImpl.toRelationMultimap(OntologyConcept ontologyConcept) |
com.google.common.collect.Multimap<RelationType,Role> |
RoleTypeConverter.toRelationMultimap(Role role) |
com.google.common.collect.Multimap<RelationType,Role> |
OntologyConceptConverter.toRelationMultimap(T ontologyConcept)
convert a given type to a map of relation types in which it can play roles
and the corresponding role types including entity type hierarchy
|
| 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 |
|---|---|
Role |
OWLMigrator.objectRole(RelationType relType) |
Role |
OWLMigrator.subjectRole(RelationType relType) |
Copyright © 2017 Grakn Labs Ltd. All rights reserved.