use of com.vaticle.typedb.core.common.exception.TypeDBCheckedException in project grakn by graknlabs.
the class EncodingTest method expectedAttributeIID.
private ByteArray expectedAttributeIID(GraphManager graphMgr, Label attributeTypeLabel, String attributeValue) {
TypeVertex type = graphMgr.schema().getType(attributeTypeLabel);
assertTrue(type.isAttributeType());
try {
return ByteArray.join(ATTRIBUTE.prefix().bytes(), type.iid().bytes(), Encoding.ValueType.STRING.bytes(), encodeStringAsSorted(attributeValue, STRING_ENCODING));
} catch (TypeDBCheckedException e) {
throw TypeDBException.of(e);
}
}
Aggregations