Exemple #1
0
 @Override
 public TitanLabel getEdgeLabel(String name) {
   TitanType et = getType(name);
   if (et == null) {
     return config.getAutoEdgeTypeMaker().makeLabel(name, makeType());
   } else if (et.isEdgeLabel()) {
     return (TitanLabel) et;
   } else throw new IllegalArgumentException("The type of given name is not a label: " + name);
 }
Exemple #2
0
 @Override
 public TitanKey getPropertyKey(String name) {
   TitanType et = getType(name);
   if (et == null) {
     return config.getAutoEdgeTypeMaker().makeKey(name, makeType());
   } else if (et.isPropertyKey()) {
     return (TitanKey) et;
   } else throw new IllegalArgumentException("The type of given name is not a key: " + name);
 }