G - A vendor specific implementation of a Tinkerpop Graph.public abstract class AbstractGraknGraph<G extends org.apache.tinkerpop.gremlin.structure.Graph> extends Object implements GraknGraph, GraknAdmin
The Grakn Graph Base Implementation
This defines how a grakn graph sits on top of a Tinkerpop Graph.
It mostly act as a construction object which ensure the resulting graph conforms to the Grakn Object model.
| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
AbstractGraknGraph(G graph,
String keyspace,
String engine,
boolean batchLoadingEnabled) |
public String getKeyspace()
getKeyspace in interface GraknGraphpublic boolean isClosed()
isClosed in interface GraknGraphpublic boolean implicitConceptsVisible()
implicitConceptsVisible in interface GraknGraphpublic void showImplicitConcepts(boolean flag)
showImplicitConcepts in interface GraknGraphpublic GraknAdmin admin()
admin in interface GraknGraphpublic <T extends Concept> T buildConcept(org.apache.tinkerpop.gremlin.structure.Vertex vertex)
buildConcept in interface GraknAdminpublic boolean hasCommitted()
public boolean isBatchLoadingEnabled()
public boolean initialiseMetaConcepts()
public G getTinkerPopGraph()
public org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<org.apache.tinkerpop.gremlin.structure.Vertex,org.apache.tinkerpop.gremlin.structure.Vertex> getTinkerTraversal()
getTinkerTraversal in interface GraknAdminpublic QueryBuilder graql()
graql in interface GraknGraphpublic ai.grakn.graph.internal.ElementFactory getElementFactory()
public <T extends Concept> T getConcept(Schema.ConceptProperty key, String value)
public Set<ai.grakn.graph.internal.ConceptImpl> getConcepts(Schema.ConceptProperty key, Object value)
public ConceptLog getConceptLog()
public EntityType putEntityType(String name)
putEntityType in interface GraknGraphpublic RelationType putRelationType(String name)
putRelationType in interface GraknGraphpublic RoleType putRoleType(String name)
putRoleType in interface GraknGraphpublic <V> ResourceType<V> putResourceType(String name, ResourceType.DataType<V> dataType)
putResourceType in interface GraknGraphpublic <V> ResourceType<V> putResourceTypeUnique(String name, ResourceType.DataType<V> dataType)
putResourceTypeUnique in interface GraknGraphpublic RuleType putRuleType(String name)
putRuleType in interface GraknGraphpublic <T extends Concept> T getConceptByBaseIdentifier(Object baseIdentifier)
public <T extends Concept> T getConcept(String id)
getConcept in interface GraknGraphpublic <V> Collection<Resource<V>> getResourcesByValue(V value)
getResourcesByValue in interface GraknGraphpublic Type getType(String name)
getType in interface GraknGraphpublic EntityType getEntityType(String name)
getEntityType in interface GraknGraphpublic RelationType getRelationType(String name)
getRelationType in interface GraknGraphpublic <V> ResourceType<V> getResourceType(String name)
getResourceType in interface GraknGraphpublic RoleType getRoleType(String name)
getRoleType in interface GraknGraphpublic RuleType getRuleType(String name)
getRuleType in interface GraknGraphpublic Type getMetaConcept()
getMetaConcept in interface GraknAdminpublic RelationType getMetaRelationType()
getMetaRelationType in interface GraknAdminpublic RoleType getMetaRoleType()
getMetaRoleType in interface GraknAdminpublic ResourceType getMetaResourceType()
getMetaResourceType in interface GraknAdminpublic EntityType getMetaEntityType()
getMetaEntityType in interface GraknAdminpublic RuleType getMetaRuleType()
getMetaRuleType in interface GraknAdminpublic RuleType getMetaRuleInference()
getMetaRuleInference in interface GraknAdminpublic RuleType getMetaRuleConstraint()
getMetaRuleConstraint in interface GraknAdminpublic Relation getRelation(RelationType relationType, Map<RoleType,Instance> roleMap)
getRelation in interface GraknGraphpublic void rollback()
rollback in interface GraknGraphpublic void clear()
clear in interface GraknGraphprotected void clearGraph()
public void close()
close in interface GraknGraphclose in interface AutoCloseablepublic void closeGraph(String closedReason)
public void closePermanent()
public void commit()
throws GraknValidationException
commit in interface GraknGraphGraknValidationException - when the graph does not conform to the object conceptpublic void commit(boolean submitLogs)
throws GraknValidationException
GraknValidationExceptionprotected void commitTx()
public boolean fixDuplicateCasting(Object castingId)
castingId - The id of the casting to check for duplicatesCopyright © 2016 Grakn Labs Ltd. All rights reserved.