| 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.internal |
Internal implementation of Grakn graph.
|
| Modifier and Type | Method and Description |
|---|---|
<V> Collection<Resource<V>> |
GraknGraph.getResourcesByValue(V value)
Get all Resources holding the value provided, if they exist.
|
| Modifier and Type | Method and Description |
|---|---|
<D> Resource<D> |
Concept.asResource()
|
<V> Resource<V> |
ResourceType.getResource(V value)
Get the Resource with the value provided, and its type, or return NULL
|
Resource<D> |
ResourceType.putResource(D value)
Set the value for the Resource, unique to its type.
|
Resource |
Resource.resource(Resource resource)
Creates a relation from this instance to the provided resource.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<Resource<D>> |
ResourceType.instances()
Returns a collection of all Resource Instances of this ResourceType.
|
Collection<Resource<?>> |
Thing.resources(ResourceType... resourceTypes)
Retrieves a collection of Resources attached to this Instances
|
| Modifier and Type | Method and Description |
|---|---|
Thing |
Thing.resource(Resource resource)
Creates a relation from this instance to the provided resource.
|
Rule |
Rule.resource(Resource resource)
Creates a relation from this instance to the provided resource.
|
Resource |
Resource.resource(Resource resource)
Creates a relation from this instance to the provided resource.
|
Relation |
Relation.resource(Resource resource)
Creates a relation from this instance to the provided resource.
|
Entity |
Entity.resource(Resource resource)
Creates a relation from this instance to the provided resource.
|
| Modifier and Type | Method and Description |
|---|---|
static GraphOperationException |
GraphOperationException.hasNotAllowed(Thing thing,
Resource resource,
String hasType)
Thrown when an
thing is not allowed to have resource of the type hasType. |
static GraphOperationException |
GraphOperationException.regexFailure(Resource resource,
String value,
String regex)
Thrown when trying to set a
value on the resource which does not conform to it's regex |
static GraphOperationException |
GraphOperationException.versionMistmatch(Resource versionResource)
Thrown when using incompatible versions of Grakn
|
| Modifier and Type | Method and Description |
|---|---|
<V> Collection<Resource<V>> |
AbstractGraknGraph.getResourcesByValue(V value) |
Copyright © 2017 Grakn Labs Ltd. All rights reserved.