{
String line = "";
String old_ifc_name = "";
ArrayList ifc_names = new ArrayList();
ArrayList meth_names = new ArrayList();
DescEntry ifcDesc = null;
while (line != null)
{
try
{
line = cvsFile.readLine();
if (line == null)
{
continue;
}
if (line.startsWith("#"))
{
continue;
}
if (line.length() <= 0)
{
continue;
}
// TODO Probleme here
// int nFirstSemicolon = line.indexOf(";");
// int nLastSemicolon = line.lastIndexOf(";");
String unknown;
String ifc_name = ""; // = line.substring(line.indexOf(";") + 2, line.lastIndexOf(";") - 1);
String meth_name = ""; // = line.substring(line.lastIndexOf(";") + 2, line.length() - 1);
StringTokenizer aToken = new StringTokenizer(line, ";");
if (aToken.countTokens() < 3)
{
System.out.println("Wrong format: Line '" + line + "' is not supported.");
continue;
}
if (aToken.hasMoreTokens())
{
unknown = StringHelper.removeQuoteIfExists(aToken.nextToken());
}
if (aToken.hasMoreTokens())
{
ifc_name = StringHelper.removeQuoteIfExists(aToken.nextToken());
}
if (aToken.hasMoreTokens())
{
meth_name = StringHelper.removeQuoteIfExists(aToken.nextToken());
}
// String ifc_name = line.substring(line.indexOf(";") + 2, line.lastIndexOf(";") - 1);
// String meth_name = line.substring(line.lastIndexOf(";") + 2, line.length() - 1);
DescEntry methDesc = createDescEntry(meth_name, ifc_name, parent);
if (!ifc_name.equals(old_ifc_name))
{
if (ifcDesc != null)
{
ifcDesc.SubEntries = getDescArray(meth_names.toArray());
ifcDesc.SubEntryCount = meth_names.size();
//mark service/interface as optional if all methods/properties are optional
boolean allOptional = true;
for (int k = 0; k < ifcDesc.SubEntryCount; k++)
{
if (!ifcDesc.SubEntries[k].isOptional)
{
allOptional = false;
}
}
if (!ifcDesc.isOptional && allOptional)
{
ifcDesc.isOptional = allOptional;
}
meth_names.clear();
ifc_names.add(ifcDesc);
}
ifcDesc = new DescEntry();
ifcDesc.isToTest = true;
old_ifc_name = ifc_name;
if (ifc_name.indexOf("#optional") > 0)
{