Iterator<ArrayList<String>> itTmpArray = tmpArray.iterator();
// go through each arraylist and create a new Mappinginformation
while (itTmpArray.hasNext()) {
// getting one ArrayList containing the lines
ArrayList<String> mapLines= itTmpArray.next();
MappingInformation tmpMap = new MappingInformation();
for (String line : mapLines) {
String[] tmpToken = line.split(":");
String lToken = tmpToken[0];
String rToken = "";
if (tmpToken.length > 1)
{
rToken = tmpToken[1];
}else
{
rToken = KEY_DEVICE;
}
if (rToken.trim().equals(KEY_DEVICE)) {
tmpMap.setSourceVolume(lToken);
} else if (lToken.trim().equals(KEY_ENCRYPTION)) {
tmpMap.setEncription(rToken.trim());
} else if (lToken.trim().equals(KEY_HIDDEN_VOLUME)) {
tmpMap.setHiddenVolumeProtected(rToken
.equalsIgnoreCase("No") ? false : true);
} else if (lToken.trim().equals(KEY_OPERATION_MODE)) {
tmpMap.setMode(rToken);
} else if (lToken.trim().equals(KEY_READONLY)) {
tmpMap.setReadOnly(rToken.equalsIgnoreCase("No") ? false
: true);
} else if (lToken.trim().equals(KEY_SIZE)) {
tmpMap.setSize(rToken);
} else if (lToken.trim().equals(KEY_TYPE)) {
// TODO Implement
} else if (lToken.trim().equals(KEY_VOLUME)) {
tmpMap.setMappedTo(rToken);
}
}
mapInfos.add(tmpMap);
}