@Override public TitanType getType(String name) { verifyOpen(); TitanType type = typeCache.get(name); if (type == null) type = (TitanType) Iterables.getOnlyElement(getVertices(SystemKey.TypeName, name), null); return type; }
@Override public TitanVertex getVertex(TitanKey key, Object attribute) { Preconditions.checkArgument( key.isUnique(Direction.IN), "Key is not uniquely associated to value [%s]", key.getName()); return Iterables.getOnlyElement(getVertices(key, attribute), null); }