/** * Returns a CoreAnnotation class key for the given string * key if one exists; null otherwise. * * @param stringKey String form of the key * @return A CoreLabel/CoreAnnotation key, or {@code null} if nothing matches */ public static Class<? extends CoreAnnotation<?>> toCoreKey(String stringKey) { for (KeyLookup lookup : KeyLookup.values()) { if (lookup.oldKey.equals(stringKey)) { return lookup.coreKey; } } return null; }
/** * Returns a CoreAnnotation class key for the given string * key if one exists; null otherwise. * * @param stringKey String form of the key * @return A CoreLabel/CoreAnnotation key, or {@code null} if nothing matches */ public static Class<? extends CoreAnnotation<?>> toCoreKey(String stringKey) { for (KeyLookup lookup : KeyLookup.values()) { if (lookup.oldKey.equals(stringKey)) { return lookup.coreKey; } } return null; }
/** * Returns a CoreAnnotation class key for the given string * key if one exists; null otherwise. * * @param stringKey String form of the key * @return A CoreLabel/CoreAnnotation key, or {@code null} if nothing matches */ public static Class<? extends CoreAnnotation<?>> toCoreKey(String stringKey) { for (KeyLookup lookup : KeyLookup.values()) { if (lookup.oldKey.equals(stringKey)) { return lookup.coreKey; } } return null; }
/** * Returns a CoreAnnotation class key for the given old-style FeatureLabel * key if one exists; null otherwise. */ public static KeyLookup getCoreKey(String oldKey) { for (KeyLookup lookup : KeyLookup.values()) { if (lookup.oldKey.equals(oldKey)) { return lookup; } } return null; }
/** * Returns a CoreAnnotation class key for the given old-style FeatureLabel * key if one exists; null otherwise. */ public static KeyLookup getCoreKey(String oldKey) { for (KeyLookup lookup : KeyLookup.values()) { if (lookup.oldKey.equals(oldKey)) { return lookup; } } return null; }