public class GraphOperationException extends GraknException
Illegal Graph Mutation Exception
This exception is thrown to prevent the user from incorrectly mutating the graph. For example when attempting to an instances to an abstract type this exception is thrown.
| Modifier | Constructor and Description |
|---|---|
protected |
GraphOperationException(String error) |
protected |
GraphOperationException(String error,
Exception e) |
| Modifier and Type | Method and Description |
|---|---|
static GraphOperationException |
addingInstancesToAbstractType(Type type)
Throw when trying to add instances to an abstract Type
|
static GraphOperationException |
closingGraphFailed(GraknGraph graph,
Exception e)
Thrown when the graph can not be closed due to an unknown reason.
|
static GraphOperationException |
duplicateHas(Type type,
ResourceType resourceType)
|
static GraphOperationException |
hasNotAllowed(Thing thing,
Resource resource,
String hasType)
Thrown when an
thing is not allowed to have resource of the type hasType. |
static GraphOperationException |
immutableProperty(Object oldValue,
Object newValue,
Schema.VertexProperty vertexProperty)
Thrown when attempting to mutate a property which is immutable
|
static GraphOperationException |
invalidCasting(Object concept,
Class type)
Thrown when casting concepts incorrectly.
|
static GraphOperationException |
invalidDirection(org.apache.tinkerpop.gremlin.structure.Direction direction)
Thrown when attempting to traverse an edge in an invalid direction
|
static GraphOperationException |
invalidGraphConfig(String pathToFile)
Thrown when attempting to read a config file which cannot be accessed
|
static GraphOperationException |
invalidPlays(Role role)
Thrown when a
Type cannot play a specific role type. |
static GraphOperationException |
invalidResourceValue(Object object,
ResourceType.DataType dataType)
Thrown when creating a resource whose value
object does not match it's resource's dataType. |
static GraphOperationException |
loopCreated(OntologyConcept type,
OntologyConcept superElement)
Thrown when setting
superType as the super type of type and a loop is created |
static GraphOperationException |
metaTypeImmutable(Label metaLabel)
Thrown when attempting to mutate a
Schema.MetaSchema |
static GraphOperationException |
noType(Thing thing)
Thrown when an thing does not have a type
|
static GraphOperationException |
nullKeyspace()
Thrown when trying to make the keysoace null
|
static GraphOperationException |
ontologyMutation()
Thrown when attempting to mutate the ontology while the transaction is in batch mode
|
static GraphOperationException |
regexFailure(Resource resource,
String value,
String regex)
Thrown when trying to set a
value on the resource which does not conform to it's regex |
static GraphOperationException |
reservedLabel(Label label)
Thrown when trying to create something using a label reserved by the system
|
static GraphOperationException |
settingNullProperty(Schema.VertexProperty property)
Thrown when attempting to set a property to null
|
static GraphOperationException |
transactionClosed(GraknGraph graph,
String reason)
Thrown when attempting to use the graph when the transaction is closed
|
static GraphOperationException |
transactionInvalid(Object tx)
Thrown when attempting to open an invalid type of transaction
|
static GraphOperationException |
transactionOpen(GraknGraph graph)
Thrown when attempting to open a transaction which is already open
|
static GraphOperationException |
transactionReadOnly(GraknGraph graph)
Thrown when attempting to mutate a read only transaction
|
static GraphOperationException |
typeCannotBeDeleted(Label label)
Thrown when a
Type has incoming edges and therefore cannot be deleted |
static GraphOperationException |
unsupportedDataType(Object value)
Thrown when using an unsupported datatype with resources
|
static GraphOperationException |
versionMistmatch(Resource versionResource)
Thrown when using incompatible versions of Grakn
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringprotected GraphOperationException(String error)
public static GraphOperationException metaTypeImmutable(Label metaLabel)
Schema.MetaSchemapublic static GraphOperationException addingInstancesToAbstractType(Type type)
public static GraphOperationException hasNotAllowed(Thing thing, Resource resource, String hasType)
thing is not allowed to have resource of the type hasType.
hasType can be resources or keys.public static GraphOperationException typeCannotBeDeleted(Label label)
Type has incoming edges and therefore cannot be deletedpublic static GraphOperationException invalidPlays(Role role)
Type cannot play a specific role type.public static GraphOperationException duplicateHas(Type type, ResourceType resourceType)
public static GraphOperationException loopCreated(OntologyConcept type, OntologyConcept superElement)
superType as the super type of type and a loop is createdpublic static GraphOperationException invalidCasting(Object concept, Class type)
Concept.asEntityType() on a
Entitypublic static GraphOperationException invalidResourceValue(Object object, ResourceType.DataType dataType)
object does not match it's resource's dataType.public static GraphOperationException unsupportedDataType(Object value)
public static GraphOperationException immutableProperty(Object oldValue, Object newValue, Schema.VertexProperty vertexProperty)
public static GraphOperationException settingNullProperty(Schema.VertexProperty property)
public static GraphOperationException nullKeyspace()
public static GraphOperationException regexFailure(Resource resource, String value, String regex)
value on the resource which does not conform to it's regexpublic static GraphOperationException transactionOpen(GraknGraph graph)
public static GraphOperationException transactionInvalid(Object tx)
public static GraphOperationException transactionReadOnly(GraknGraph graph)
public static GraphOperationException ontologyMutation()
public static GraphOperationException transactionClosed(GraknGraph graph, String reason)
public static GraphOperationException closingGraphFailed(GraknGraph graph, Exception e)
public static GraphOperationException versionMistmatch(Resource versionResource)
public static GraphOperationException noType(Thing thing)
public static GraphOperationException invalidDirection(org.apache.tinkerpop.gremlin.structure.Direction direction)
public static GraphOperationException invalidGraphConfig(String pathToFile)
public static GraphOperationException reservedLabel(Label label)
Copyright © 2017 Grakn Labs Ltd. All rights reserved.