| 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.exception |
Grakn exception 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 |
|---|---|
Role |
GraknGraph.getRole(String label)
Get the Role Type with the label provided, if it exists.
|
Role |
GraknGraph.putRole(Label label)
|
Role |
GraknGraph.putRole(String label)
|
| Modifier and Type | Method and Description |
|---|---|
Role |
Concept.asRoleType()
|
Role |
Role.sub(Role type)
Adds another sub to this type
|
Role |
Role.sup()
Returns the super of this Role.
|
Role |
Role.sup(Role type)
Sets the super of this Role.
|
| Modifier and Type | Method and Description |
|---|---|
Map<Role,Set<Thing>> |
Relation.allRolePlayers()
Retrieve a list of all Instances involved in the Relation, and the Role Types they play.
|
Collection<Role> |
Type.plays() |
Collection<Role> |
Thing.plays()
Determine the Role Types that this Thing may play.
|
Collection<Role> |
RelationType.relates()
Retrieves a list of the RoleTypes that make up this RelationType.
|
Collection<Role> |
Role.subs()
Returns the sub of this Role.
|
| Modifier and Type | Method and Description |
|---|---|
Relation |
Relation.addRolePlayer(Role role,
Thing thing)
Expands this Relation to include a new role player which is playing a specific role.
|
Type |
Type.deletePlays(Role role) |
RuleType |
RuleType.deletePlays(Role role) |
ResourceType<D> |
ResourceType.deletePlays(Role role)
Removes the Role to prevent instances of this ResourceType from playing it.
|
RelationType |
RelationType.deletePlays(Role role)
Removes the Role to prevent instances of this RelationType from playing it.
|
EntityType |
EntityType.deletePlays(Role role)
Removes the Role to prevent instances of this EntityType from playing it.
|
RelationType |
RelationType.deleteRelates(Role role)
Delete a Role from this RelationType
|
Type |
Type.plays(Role role) |
RuleType |
RuleType.plays(Role role) |
ResourceType<D> |
ResourceType.plays(Role role)
Sets the Role which instances of this ResourceType may play.
|
RelationType |
RelationType.plays(Role role)
Sets the Role which instances of this RelationType may play.
|
EntityType |
EntityType.plays(Role role)
Sets the Role which instances of this EntityType may play.
|
RelationType |
RelationType.relates(Role role)
Sets a new Role for this RelationType.
|
Collection<Relation> |
Thing.relations(Role... roles)
Retrieves a Relations which the Thing takes part in, which may optionally be narrowed to a particular set
according to the Role you are interested in.
|
Collection<Thing> |
Relation.rolePlayers(Role... roles)
|
Role |
Role.sub(Role type)
Adds another sub to this type
|
Role |
Role.sup(Role type)
Sets the super of this Role.
|
| Modifier and Type | Method and Description |
|---|---|
static GraphOperationException |
GraphOperationException.invalidPlays(Role role)
Thrown when a
Type cannot play a specific role type. |
| Modifier and Type | Method and Description |
|---|---|
Role |
GraknAdmin.getMetaRoleType()
Get the root of all the Role Types.
|
| Modifier and Type | Method and Description |
|---|---|
Role |
AbstractGraknGraph.getMetaRoleType() |
Role |
AbstractGraknGraph.getRole(String label) |
Role |
AbstractGraknGraph.putRole(Label label) |
Role |
AbstractGraknGraph.putRole(String label) |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.collect.Multimap<Role,Var> |
RelationAtom.getRoleVarMap() |
| 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
|
static Set<Role> |
ReasonerUtils.getCompatibleRoleTypes(Type type,
Set<Role> relRoles)
Gets roletypes a given type can play in the provided relType relation type by performing
type intersection between type's playedRoles and relation's relates.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
ReasonerUtils.computeRoleCombinations(Set<Var> vars,
Set<Role> roles,
Map<Var,VarPattern> roleMap,
Set<Map<Var,VarPattern>> roleMaps)
compute all rolePlayer-roleType combinations complementing provided roleMap
|
static Set<Role> |
ReasonerUtils.getCompatibleRoleTypes(Type type,
Set<Role> relRoles)
Gets roletypes a given type can play in the provided relType relation type by performing
type intersection between type's playedRoles and relation's relates.
|
| 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 |
|---|---|
com.google.common.collect.Multimap<RelationType,Role> |
RoleTypeConverter.toRelationMultimap(Role role) |
| Modifier and Type | Method and Description |
|---|---|
Role |
OWLMigrator.entityRole(EntityType entityType,
ResourceType<?> resourceType) |
Role |
OWLMigrator.objectRole(RelationType relType) |
Role |
OWLMigrator.resourceRole(ResourceType<?> resourceType) |
Role |
OWLMigrator.subjectRole(RelationType relType) |
Copyright © 2017 Grakn Labs Ltd. All rights reserved.