public interface Concept extends Comparable<Concept>
The base concept implementation.
A concept which can represent anything in the graph which wraps a tinkerpop Vertex.
This class forms the basis of assuring the graph follows the Grakn object model.
It provides methods to retrieve information about the Concept, and determine if it is a Type
(EntityType, Role, RelationType, RuleType or ResourceType)
or an Thing (Entity, Relation , Resource, Rule).
| Modifier and Type | Method and Description |
|---|---|
Entity |
asEntity()
|
EntityType |
asEntityType()
|
Thing |
asInstance()
|
OntologyConcept |
asOntologyConcept()
|
Relation |
asRelation()
|
RelationType |
asRelationType()
|
<D> Resource<D> |
asResource()
|
<D> ResourceType<D> |
asResourceType()
|
Role |
asRoleType()
|
Rule |
asRule()
|
RuleType |
asRuleType()
|
Type |
asType()
|
void |
delete()
Delete the Concept.
|
ConceptId |
getId()
Get the unique ID associated with the Concept.
|
boolean |
isEntity()
|
boolean |
isEntityType()
Determine if the
Concept is an EntityType. |
boolean |
isInstance()
|
boolean |
isOntologyConcept()
Determine if the
Concept is a OntologyConcept |
boolean |
isRelation()
|
boolean |
isRelationType()
Determine if the
Concept is a RelationType. |
boolean |
isResource()
|
boolean |
isResourceType()
Determine if the
Concept is a ResourceType. |
boolean |
isRoleType()
|
boolean |
isRule()
|
boolean |
isRuleType()
|
boolean |
isType()
|
compareTo@CheckReturnValue ConceptId getId()
@CheckReturnValue OntologyConcept asOntologyConcept()
OntologyConcept if the Concept is a OntologyConcept@CheckReturnValue Type asType()
@CheckReturnValue Thing asInstance()
@CheckReturnValue EntityType asEntityType()
EntityType if the Concept is an EntityType@CheckReturnValue Role asRoleType()
@CheckReturnValue RelationType asRelationType()
RelationType if the Concept is a RelationType@CheckReturnValue <D> ResourceType<D> asResourceType()
RelationType if the Concept is a RelationType@CheckReturnValue RuleType asRuleType()
@CheckReturnValue Entity asEntity()
@CheckReturnValue Relation asRelation()
@CheckReturnValue <D> Resource<D> asResource()
@CheckReturnValue Rule asRule()
@CheckReturnValue boolean isOntologyConcept()
Concept is a OntologyConceptConcept concept is a OntologyConcept@CheckReturnValue boolean isType()
@CheckReturnValue boolean isInstance()
@CheckReturnValue boolean isEntityType()
Concept is an EntityType.Concept is an EntityType.@CheckReturnValue boolean isRoleType()
@CheckReturnValue boolean isRelationType()
Concept is a RelationType.Concept is a RelationType@CheckReturnValue boolean isResourceType()
Concept is a ResourceType.Concept concept is a ResourceType@CheckReturnValue boolean isRuleType()
@CheckReturnValue boolean isEntity()
@CheckReturnValue boolean isRelation()
@CheckReturnValue boolean isResource()
@CheckReturnValue boolean isRule()
void delete()
throws GraphOperationException
GraphOperationException - Throws an exception if this is a type with incoming concepts.Copyright © 2017 Grakn Labs Ltd. All rights reserved.