use of permafrost.tundra.data.CaseInsensitiveIData in project Tundra by Permafrost.
the class document method uncase.
public static final void uncase(IData pipeline) throws ServiceException {
// --- <<IS-START(uncase)>> ---
// @subtype unknown
// @sigtype java 3.5
// [i] record:0:optional $document
// [i] record:0:optional $locale
// [i] - field:0:required language
// [i] - field:0:optional country
// [i] - field:0:optional variant
// [o] record:0:optional $document
IDataCursor cursor = pipeline.getCursor();
try {
IData document = IDataHelper.get(cursor, "$document", IData.class);
Locale locale = IDataHelper.getOrDefault(cursor, "$locale", Locale.class, Locale.getDefault());
if (document != null)
IDataHelper.put(cursor, "$document", new CaseInsensitiveIData(IDataHelper.duplicate(document, true), locale));
} finally {
cursor.destroy();
}
// --- <<IS-END>> ---
}
Aggregations