public class NameProperty extends Object implements UniqueVarProperty
type-name property on a Type.
This property can be queried and inserted. If used in an insert query and there is an existing type with the give
name, then that type will be retrieved.| Constructor and Description |
|---|
NameProperty(TypeName name) |
| Modifier and Type | Method and Description |
|---|---|
default void |
buildString(StringBuilder builder)
Build a Graql string representation of this property
|
void |
checkValid(GraknGraph graph,
VarAdmin var)
Check if the given property can be used in a match query
|
void |
delete(GraknGraph graph,
Concept concept)
Delete the given property from the graph, if possible.
|
boolean |
equals(Object o) |
Fragment |
getFragment(VarName start) |
java.util.stream.Stream<VarAdmin> |
getImplicitInnerVars()
Get a stream of any inner
VarAdmin within this `VarProperty`, including any that may have been
implicitly created (such as with "has-resource"). |
String |
getName() |
TypeName |
getNameValue() |
String |
getProperty() |
java.util.stream.Stream<VarAdmin> |
getTypes()
Get a stream of
VarAdmin that must be types. |
int |
hashCode() |
void |
insert(InsertQueryExecutor insertQueryExecutor,
Concept concept)
Insert the given property into the graph, if possible.
|
Atomic |
mapToAtom(VarAdmin var,
Set<VarAdmin> vars,
ReasonerQuery parent)
maps this var property to a reasoner atom
|
default Collection<EquivalentFragmentSet> |
match(VarName start)
Return a collection of
EquivalentFragmentSet to match the given property in the graph |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitisUniquecheckInsertable, checkValid, delete, getInnerVars, insert, modifyShortcutTraversalpublic NameProperty(TypeName name)
public TypeName getNameValue()
public String getName()
public String getProperty()
public Atomic mapToAtom(VarAdmin var, Set<VarAdmin> vars, ReasonerQuery parent)
VarPropertymapToAtom in interface VarPropertyvar - VarAdmin this property belongs tovars - VarAdmins constituting the pattern this property belongs toparent - reasoner query this atom should belong topublic void buildString(StringBuilder builder)
VarPropertybuildString in interface VarPropertybuilder - a string builder to append topublic Collection<EquivalentFragmentSet> match(VarName start)
VarPropertyInternalEquivalentFragmentSet to match the given property in the graphmatch in interface VarPropertyInternalpublic final void checkValid(GraknGraph graph, VarAdmin var) throws IllegalStateException
VarPropertyInternalcheckValid in interface VarPropertyInternalIllegalStateExceptionpublic void insert(InsertQueryExecutor insertQueryExecutor, Concept concept) throws IllegalStateException
VarPropertyInternalinsert in interface VarPropertyInternalinsertQueryExecutor - the instance handling the insert queryconcept - the concept to insert a property onIllegalStateExceptionpublic void delete(GraknGraph graph, Concept concept)
VarPropertyInternaldelete in interface VarPropertyInternalgraph - the graph to operate onconcept - the concept to delete properties ofpublic java.util.stream.Stream<VarAdmin> getTypes()
VarPropertyVarAdmin that must be types.getTypes in interface VarPropertypublic java.util.stream.Stream<VarAdmin> getImplicitInnerVars()
VarPropertyVarAdmin within this `VarProperty`, including any that may have been
implicitly created (such as with "has-resource").getImplicitInnerVars in interface VarPropertyCopyright © 2017 Grakn Labs Ltd. All rights reserved.