/** * Map an Thing to the equivalent Graql representation * @param thing thing to be mapped * @return Graql representation of given thing */ public static VarPattern map(Thing thing){ if(thing.isEntity()){ return map(thing.asEntity()); } else if(thing.isAttribute()){ return map(thing.asAttribute()); } else if(thing.isRelationship()){ return map(thing.asRelationship()); } else { throw CommonUtil.unreachableStatement("Unrecognised thing " + thing); } }