{
String featureId=(String)featureIterator.next();
if(featureModel.containsFeature(featureId))
{
featurenum++;
Feature feature=featureModel.getFeature(featureId);
String stemp = "";
int count=0;
if(fileOutMode==COMPRESSED)
rtfDocument.printTinyTitle(featurenum+". "+feature.getName());
else
rtfDocument.printTinyTitle(""+viewnum+"."+featurenum+". "+feature.getName());
rtfDocument.printBlank();
//featurename
rtfDocument.printFeatureItemName("Name: ");
if (feature.getName() == null)
{
rtfDocument.printFeatureItem("");
}
else
rtfDocument.printFeatureItem(feature.getName());
// description
if (feature.getDescription() == null||feature.getDescription().trim().length()<1 )
{
if(featureOutMode==1)rtfDocument.printFeatureItemName("Description:"); //�������
rtfDocument.printFeatureItem("");
}
else{
rtfDocument.printFeatureItemName("Description: ");
rtfDocument.printFeatureItem(feature.getDescription());
}
// Source
if (feature.getSource() == null||feature.getSource().trim().length()<1)
{
if(featureOutMode==1)rtfDocument.printFeatureItemName("Source:"); //�������
rtfDocument.printFeatureItem("");
}
else{
rtfDocument.printFeatureItemName("Source: ");
rtfDocument.printFeatureItem(feature.getSource());
}
// Issue&Decision
if (feature.getIssueAndDecision() == null||feature.getIssueAndDecision().trim().length()<1)
{
if(featureOutMode==1)rtfDocument.printFeatureItemName("Issue&Decision:"); //�������
rtfDocument.printFeatureItem("");
}
else{
rtfDocument.printFeatureItemName("IssueDecision: ");
rtfDocument.printFeatureItem(feature.getIssueAndDecision());
}
// Note
if (feature.getNote() == null||feature.getNote().trim().length()<1)
{
if(featureOutMode==1)rtfDocument.printFeatureItemName("Note:"); //�������
rtfDocument.printFeatureItem("");
}
else{
rtfDocument.printFeatureItemName("Note: ");
rtfDocument.printFeatureItem(feature.getNote());
}
rtfDocument.printFeatureItemName("Category: ");
rtfDocument.printFeatureItem(feature.getCategory().getName());
rtfDocument.printFeatureItemName("Variability: ");
rtfDocument.printFeatureItem(feature.getVariability().getName());
rtfDocument.printFeatureItemName("BindingTime: ");
rtfDocument.printFeatureItem(feature.getBindingTime().getName());
rtfDocument.printBlank();
// parent
stemp = "";
count=0;
Map parentMap = featureModel.getFeatureRelation(FeatureRelation.DECOMPOSE, feature, false);
if (parentMap != null)
{
Iterator iteraParent = parentMap.keySet().iterator();
while (iteraParent != null&&iteraParent.hasNext())
{
String id = (String) iteraParent.next();
FeatureRelation fr = (FeatureRelation) parentMap.get(id);
if (fr != null)
{
count++;
if(count>1)stemp+="; ";
Feature iteraFeature = fr.getStartFeature();
stemp +=iteraFeature.getName();
}
}
}
if(count>0||featureOutMode==1)//��parent ���������
{
rtfDocument.printFeatureItemName("Parent:");
rtfDocument.printFeatureItem(stemp);
}
// Include
stemp = "";
count=0;
Map includeMap = featureModel.getFeatureRelation(FeatureRelation.DECOMPOSE, feature, true);
if (includeMap != null)
{
Iterator iteraInclude = includeMap.keySet().iterator();
while (iteraInclude != null&&iteraInclude.hasNext())
{
String id = (String) iteraInclude.next();
FeatureRelation fr = (FeatureRelation) includeMap.get(id);
if (fr != null)
{
count++;
if(count>1)stemp+="; ";
Feature iteraFeature = fr.getEndFeature();
stemp +=iteraFeature.getName();
}
}
}
if(count>0||featureOutMode==1)//��include ���������
{
rtfDocument.printFeatureItemName("Include:");
rtfDocument.printFeatureItem(stemp);
}
//DimensionValue
stemp = "";
count=0;
Map dimensionMap = featureModel.getFeatureRelation(FeatureRelation.ATTRIBUTE, feature, true);
if (dimensionMap != null)
{
Iterator iteraDimension = dimensionMap.keySet().iterator();
while (iteraDimension != null&&iteraDimension.hasNext())
{
String id = (String) iteraDimension.next();
FeatureRelation fr = (FeatureRelation) dimensionMap.get(id);
if (fr != null)
{
count++;
if(count>1)stemp+="; ";
Feature iteraFeature = fr.getEndFeature();
stemp +=iteraFeature.getName();
}
}
}
if(count>0||featureOutMode==1)//��dimension ���������
{
rtfDocument.printFeatureItemName("Dimension:");
rtfDocument.printFeatureItem(stemp);
}
//Requiring
stemp = "";
count=0;
Map requiringMap = featureModel.getFeatureRelation(FeatureRelation.REQUIRE, feature, true);
if (requiringMap != null)
{
Iterator iteraRequiring = requiringMap.keySet().iterator();
while (iteraRequiring != null&&iteraRequiring.hasNext())
{
String id = (String) iteraRequiring.next();
FeatureRelation fr = (FeatureRelation) requiringMap.get(id);
if (fr != null)
{
count++;
if(count>1)stemp+="; ";
Feature iteraFeature = fr.getEndFeature();
stemp +=iteraFeature.getName();
}
}
}
if(count>0||featureOutMode==1)//��requiring ���������
{
rtfDocument.printFeatureItemName("Requiring:");
rtfDocument.printFeatureItem(stemp);
}
//Required
stemp = "";
count=0;
Map requiredMap = featureModel.getFeatureRelation(FeatureRelation.REQUIRE, feature, false);
if (requiredMap != null)
{
Iterator iteraRequired = requiredMap.keySet().iterator();
while (iteraRequired != null&&iteraRequired.hasNext())
{
String id = (String) iteraRequired.next();
FeatureRelation fr = (FeatureRelation) requiringMap.get(id);
if (fr != null)
{
count++;
if(count>1)stemp+="; ";
Feature iteraFeature = fr.getStartFeature();
stemp +=iteraFeature.getName();
}
}
}
if(count>0||featureOutMode==1)//��required ���������
{
rtfDocument.printFeatureItemName("Required:");
rtfDocument.printFeatureItem(stemp);
}
//Mutex
stemp = "";
count=0;
Map mutexMap = featureModel.getFeatureRelation(FeatureRelation.EXCLUDE, feature, true);
if (mutexMap != null)
{
Iterator iteraMutex = mutexMap.keySet().iterator();
while (iteraMutex != null&&iteraMutex.hasNext())
{
String id = (String) iteraMutex.next();
FeatureRelation fr = (FeatureRelation) mutexMap.get(id);
if (fr != null)
{
count++;
if(count>1)stemp+="; ";
Feature iteraFeature = fr.getEndFeature();
stemp +=iteraFeature.getName();
}
}
}
Map mutexMap2 = featureModel.getFeatureRelation(FeatureRelation.EXCLUDE, feature, false);
if (mutexMap2 != null)
{
Iterator iteraMutex2 = mutexMap2.keySet().iterator();
while (iteraMutex2 != null&&iteraMutex2.hasNext())
{
String id = (String) iteraMutex2.next();
FeatureRelation fr = (FeatureRelation) mutexMap2.get(id);
if (fr != null)
{
count++;
if(count>1)stemp+="; ";
Feature iteraFeature = fr.getStartFeature();
stemp +=iteraFeature.getName();
}
}
}
if(count>0||featureOutMode==1)//��Mutex���������
{