String value = iValue.substring(1, iValue.length() - 1);
@SuppressWarnings("rawtypes")
Map map;
if (iLinkedType == OType.LINK || iLinkedType == OType.EMBEDDED)
map = new ORecordLazyMap(iSourceDocument, ODocument.RECORD_TYPE);
else
map = new OTrackedMap<Object>(iSourceDocument);
if (value.length() == 0)
return map;
final List<String> items = OStringSerializerHelper.smartSplit(value, OStringSerializerHelper.RECORD_SEPARATOR);
// EMBEDDED LITERALS
if (map instanceof ORecordElement)
((ORecordElement) map).setInternalStatus(STATUS.UNMARSHALLING);
for (String item : items) {
if (item != null && item.length() > 0) {
final List<String> entry = OStringSerializerHelper.smartSplit(item, OStringSerializerHelper.ENTRY_SEPARATOR);
if (entry.size() > 0) {
String mapValue = entry.get(1);
if (iLinkedType == null)
if (mapValue.length() > 0) {
iLinkedType = getType(mapValue);
if (iLinkedType == OType.LINK && !(map instanceof ORecordLazyMap)) {
// CONVERT IT TO A LAZY MAP
map = new ORecordLazyMap(iSourceDocument, ODocument.RECORD_TYPE);
((ORecordElement) map).setInternalStatus(STATUS.UNMARSHALLING);
}
} else
iLinkedType = OType.EMBEDDED;