public abstract class AbstractGraknGraph<G extends org.apache.tinkerpop.gremlin.structure.Graph> extends Object implements GraknGraph
| 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 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 GraknGraphpublic QueryBuilder graql()
graql in interface GraknGraphpublic ai.grakn.graph.internal.ElementFactory getElementFactory()
public ai.grakn.graph.internal.ConceptImpl 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 itemIdentifier)
putEntityType in interface GraknGraphpublic RelationType putRelationType(String itemIdentifier)
putRelationType in interface GraknGraphpublic RoleType putRoleType(String itemIdentifier)
putRoleType in interface GraknGraphpublic <V> ResourceType<V> putResourceType(String id, ResourceType.DataType<V> dataType)
putResourceType in interface GraknGraphpublic <V> ResourceType<V> putResourceTypeUnique(String id, ResourceType.DataType<V> dataType)
putResourceTypeUnique in interface GraknGraphpublic RuleType putRuleType(String itemIdentifier)
putRuleType in interface GraknGraphpublic ai.grakn.graph.internal.ConceptImpl getConceptByBaseIdentifier(Object baseIdentifier)
public Concept getConcept(String id)
getConcept in interface GraknGraphpublic Type getType(String id)
getType in interface GraknGraphpublic Instance getInstance(String id)
getInstance in interface GraknGraphpublic Entity getEntity(String id)
getEntity in interface GraknGraphpublic <V> Resource<V> getResource(String id)
getResource in interface GraknGraphpublic <V> Resource<V> getResource(V value, ResourceType<V> type)
getResource in interface GraknGraphpublic <V> Collection<Resource<V>> getResourcesByValue(V value)
getResourcesByValue in interface GraknGraphpublic Rule getRule(String id)
getRule in interface GraknGraphpublic EntityType getEntityType(String id)
getEntityType in interface GraknGraphpublic RelationType getRelationType(String id)
getRelationType in interface GraknGraphpublic <V> ResourceType<V> getResourceType(String id)
getResourceType in interface GraknGraphpublic RoleType getRoleType(String id)
getRoleType in interface GraknGraphpublic RuleType getRuleType(String id)
getRuleType in interface GraknGraphpublic Type getMetaType()
getMetaType in interface GraknGraphpublic Type getMetaRelationType()
getMetaRelationType in interface GraknGraphpublic Type getMetaRoleType()
getMetaRoleType in interface GraknGraphpublic Type getMetaResourceType()
getMetaResourceType in interface GraknGraphpublic Type getMetaEntityType()
getMetaEntityType in interface GraknGraphpublic Type getMetaRuleType()
getMetaRuleType in interface GraknGraphpublic RuleType getMetaRuleInference()
getMetaRuleInference in interface GraknGraphpublic RuleType getMetaRuleConstraint()
getMetaRuleConstraint in interface GraknGraphpublic Relation getRelation(RelationType relationType, Map<RoleType,Instance> roleMap)
getRelation in interface GraknGraphpublic Relation getRelation(String id)
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 commit()
throws GraknValidationException
commit in interface GraknGraphGraknValidationException - when the graph does not conform to the object conceptprotected void commitTx()
public boolean fixDuplicateCasting(Object castingId)
castingId - The id of the casting to check for duplicatesCopyright © 2016 Grakn Labs Ltd. All rights reserved.