示例#1
0
 /**
  *  Populates the details of the IdentificationFile when it is read in from XML file
  *  @param theName Name of the attribute read in
  *  @param theValue Value of the attribute read in
  */
 public override void SetAttributeValue(string theName, string theValue)
 {
     if (theName.Equals("HitStatus"))
     {
         this.SetStatus(theValue);
     }
     else if (theName.Equals("FormatName"))
     {
         this.SetName(theValue);
     }
     else if (theName.Equals("FormatVersion"))
     {
         this.SetVersion(theValue);
     }
     else if (theName.Equals("FormatPUID"))
     {
         this.SetPUID(theValue);
     }
     else if (theName.Equals("HitWarning"))
     {
         this.SetIdentificationWarning(theValue);
     }
     else
     {
         MessageDisplay.UnknownAttributeWarning(theName, this.GetElementName());
     }
 }
示例#2
0
 /**
  *  Populate the details of the IdentificationFile object when read in from XML file.
  *  @param theName Name of the attribute read in
  *  @param theValue Value of the attribute read in
  */
 public void setAttributeValue(string theName, string theValue)
 {
     if (theName.Equals("Name"))
     {
         this.setFilePath(theValue);
     }
     else if (theName.Equals("IdentQuality"))
     {
         //The IdentQuality attribute value should match one of those specified in code -
         //otherwise show a warning
         if (theValue.Equals(AnalysisController.FILE_CLASSIFICATION_POSITIVE_TEXT))
         {
             myIDStatus = AnalysisController.FILE_CLASSIFICATION_POSITIVE;
         }
         else if (theValue.Equals(AnalysisController.FILE_CLASSIFICATION_TENTATIVE_TEXT))
         {
             myIDStatus = AnalysisController.FILE_CLASSIFICATION_TENTATIVE;
         }
         else if (theValue.Equals(AnalysisController.FILE_CLASSIFICATION_NOHIT_TEXT))
         {
             myIDStatus = AnalysisController.FILE_CLASSIFICATION_NOHIT;
         }
         else if (theValue.Equals(AnalysisController.FILE_CLASSIFICATION_ERROR_TEXT))
         {
             myIDStatus = AnalysisController.FILE_CLASSIFICATION_ERROR;
         }
         else if (theValue.Equals(AnalysisController.FILE_CLASSIFICATION_NOTCLASSIFIED_TEXT))
         {
             myIDStatus = AnalysisController.FILE_CLASSIFICATION_NOTCLASSIFIED;
         }
         else
         {
             MessageDisplay.GeneralWarning("Unknown file status listed: <" + theValue + "> is not the same as <" + AnalysisController.FILE_CLASSIFICATION_POSITIVE_TEXT + ">");
         }
     }
     else if (theName.Equals("Warning"))
     {
         this.setWarning(theValue);
     }
     else
     {
         MessageDisplay.UnknownAttributeWarning(theName, this.GetElementName());
     }
 }
 /**
  *  Populates the details of the FileCollection when read in from XML file
  *  @param theName Name of the attribute read in
  *  @param theValue Value of the attribute read in
  */
 public void setAttributeValue(String theName, String theValue)
 {
     if (theName.Equals(AnalysisController.LABEL_APPLICATION_VERSION))
     {
         setDROIDVersion(theValue);
     }
     else if (theName.Equals("SigFileVersion"))
     {
         setSignatureFileVersion(theValue);
     }
     else if (theName.Equals(AnalysisController.LABEL_DATE_CREATED))
     {
         setDateCreated(theValue);
     }
     else
     {
         MessageDisplay.UnknownAttributeWarning(theName, this.GetElementName());
     }
 }