public interface MindmapsGraph extends AutoCloseable
EntityType putEntityType(String id)
id - A unique Id for the Entity Type<V> ResourceType<V> putResourceType(String id, ResourceType.DataType<V> type)
V - The data type of the resource type. Supported types include: String, Long, Double, Boolean.
This should match the parameter typeid - A unique Id for the Resource Typetype - The data type of the resource type.
Supported types include: DataType.STRING, DataType.LONG, DataType.DOUBLE, and DataType.BOOLEANRuleType putRuleType(String id)
id - A unique Id for the Rule TypeRelationType putRelationType(String id)
id - A unique Id for the Relation TypeRoleType putRoleType(String id)
id - A unique Id for the Role Type@Deprecated Entity putEntity(String id, EntityType type)
id - A unique id for the Entitytype - The type of this EntityEntity addEntity(EntityType type)
type - The type of this Entity<V> Resource<V> putResource(V value, ResourceType<V> type)
V - The data type of both the ResourceType and the Resource.
Supported types include: String, Long, Double, Boolean.value - A value for the Resource which is unique to it's typetype - The resource type of this resource.@Deprecated Rule putRule(String id, String lhs, String rhs, RuleType type)
id - A unique Id for the Rulelhs - A string representing the left hand side Graql query.rhs - A string representing the right hand side Graql query.type - The rule type of this RuleRule addRule(String lhs, String rhs, RuleType type)
lhs - A string representing the left hand side Graql query.rhs - A string representing the right hand side Graql query.type - The rule type of this Rule@Deprecated Relation putRelation(String id, RelationType type)
id - A unique Id for the Relationtype - The relation type of this RelationRelation addRelation(RelationType type)
type - The relation type of this RelationConcept getConcept(String id)
id - A unique Id which identifies the Concept in the graph.Type getType(String id)
id - A unique Id which identifies the Type in the graph.Instance getInstance(String id)
id - A unique Id which identifies the Instance in the graph.Entity getEntity(String id)
id - A unique Id which identifies the Entity in the graph.<V> Resource<V> getResource(String id)
V - The data type of the value. Supported types include: String, Long, Double, and Boolean.id - A unique Id which identifies the Resource in the graph.<V> Collection<Resource<V>> getResourcesByValue(V value)
V - The data type of the value. Supported types include: String, Long, Double, and Boolean.value - A value which a Resource in the graph may be holding.Rule getRule(String id)
id - A unique Id which identifies the Rule in the graph.EntityType getEntityType(String id)
id - A unique Id which identifies the Entity Type in the graph.RelationType getRelationType(String id)
id - A unique Id which identifies the Relation Type in the graph.<V> ResourceType<V> getResourceType(String id)
V - The data type of the value. Supported types include: String, Long, Double, and Boolean.id - A unique Id which identifies the Resource Type in the graph.RoleType getRoleType(String id)
id - A unique Id which identifies the Role Type in the graph.RuleType getRuleType(String id)
id - A unique Id which identifies the Rule Type in the graph.Type getMetaType()
Type getMetaRelationType()
Type getMetaRoleType()
Type getMetaResourceType()
Type getMetaEntityType()
Type getMetaRuleType()
RuleType getMetaRuleInference()
RuleType getMetaRuleConstraint()
Relation getRelation(RelationType relationType, Map<RoleType,Instance> roleMap)
relationType - The Relation Type which we wish to find a Relation instance of.roleMap - A role map specifying the rolePlayers (Instances or Resources) in the relationship and the roles (Role Types) they play.Relation getRelation(String id)
id - The id of the relation object you are looking forvoid clear()
String getKeyspace()
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<org.apache.tinkerpop.gremlin.structure.Vertex,org.apache.tinkerpop.gremlin.structure.Vertex> getTinkerTraversal()
void commit()
throws MindmapsValidationException
MindmapsValidationException - is thrown when a structural validation fails.void rollback()
void close()
close in interface AutoCloseableCopyright © 2016. All rights reserved.