in hugegraph-test/src/main/java/org/apache/hugegraph/tinkerpop/TestGraph.java [322:372]
public void initPropertyKey(String key, String type) {
SchemaManager schema = this.graph.schema();
switch (type) {
case "Boolean":
schema.propertyKey(key).asBoolean().ifNotExist().create();
break;
case "Integer":
schema.propertyKey(key).asInt().ifNotExist().create();
break;
case "Long":
schema.propertyKey(key).asLong().ifNotExist().create();
break;
case "Float":
schema.propertyKey(key).asFloat().ifNotExist().create();
break;
case "Double":
schema.propertyKey(key).asDouble().ifNotExist().create();
break;
case "String":
schema.propertyKey(key).ifNotExist().create();
break;
case "BooleanArray":
schema.propertyKey(key).asBoolean().valueList().ifNotExist().create();
break;
case "IntegerArray":
schema.propertyKey(key).asInt().valueList().ifNotExist().create();
break;
case "LongArray":
schema.propertyKey(key).asLong().valueList().ifNotExist().create();
break;
case "FloatArray":
schema.propertyKey(key).asFloat().valueList().ifNotExist().create();
break;
case "DoubleArray":
schema.propertyKey(key).asDouble().valueList().ifNotExist().create();
break;
case "StringArray":
schema.propertyKey(key).valueList().ifNotExist().create();
break;
case "UniformList":
schema.propertyKey(key).valueList().ifNotExist().create();
break;
case "MixedList":
case "Map":
case "Serializable":
break;
default:
throw new RuntimeException(String.format("Wrong type %s for %s", type, key));
}
}