/** * Finds the name of the entity collection using the meta information. * * @param entityAnnot * @return the entity name/path */ public static String findEntityCollectionNameName(ResourceMetadata meta) { String name; switch (meta.getType()) { case RELATIONSHIP: name = meta.getParentResource(); break; default: // an entity so just get its id. name = meta.getUniqueId(); } if (name.startsWith("/")) { name = name.substring(1); } return name; }