// In practice this appears to only be used for folders
UUID itemID = UUID.Zero;
UUID parentID = UUID.Zero;
String name = "";
AssetType assetType = AssetType.Unknown;
while (lineNum < lines.length)
{
if (ParseLine(lines[lineNum++], key, value))
{
if (key[0].equals("{"))
{
continue;
}
else if (key[0].equals("}"))
{
break;
}
else if (key[0].equals("obj_id"))
{
itemID= UUID.Parse(value[0]);
}
else if (key[0].equals("parent_id"))
{
parentID= UUID.Parse(value[0]);
}
else if (key[0].equals("type"))
{
assetType = Utils.StringToAssetType(value[0]);
}
else if (key[0].equals("name"))
{
name = value[0].substring(0, value[0].indexOf('|'));
}
}
}
if (assetType == AssetType.Folder)
{
InventoryFolder folder = new InventoryFolder(itemID);
folder.Name = name;
folder.ParentUUID = parentID;
items.add(folder);
}
else
{
InventoryItem item = new InventoryItem(itemID);
item.Name = name;
item.ParentUUID = parentID;
item.AssetType = assetType;
items.add(item);
}
//endregion inv_object
}
else if (key.equals("inv_item"))
{
//region inv_item
// Any inventory item that links to an assetID, has permissions, etc
UUID itemID = UUID.Zero;
UUID assetID = UUID.Zero;
UUID parentID = UUID.Zero;
UUID creatorID = UUID.Zero;
UUID ownerID = UUID.Zero;
UUID lastOwnerID = UUID.Zero;
UUID groupID = UUID.Zero;
boolean groupOwned = false;
String name = "";
String desc = "";
AssetType assetType = AssetType.Unknown;
InventoryType inventoryType = InventoryType.Unknown;
Date creationDate = Utils.Epoch;
//uint
long flags = 0;
Permissions perms = Permissions.NoPermissions;