Package org.mitre.oval.xmlSchema.ovalResults5

Examples of org.mitre.oval.xmlSchema.ovalResults5.OvalResultsDocument


        cursor.dispose();

    directives.setGenerator(OVALCheckSystem.getGenerator(config));

    DefaultDirectivesType defaultDirectivesData = directives.addNewDirectives();
    defaultDirectivesData.setIncludeSourceDefinitions(includeSourceDefinitions);

    for (Map.Entry<ResultEnumeration.Enum, DirectiveType> entry : defaultDirectives.entrySet()) {
      switch (entry.getKey().intValue()) {
      case ResultEnumeration.INT_TRUE:
        defaultDirectivesData.setDefinitionTrue(entry.getValue());
        break;
      case ResultEnumeration.INT_FALSE:
        defaultDirectivesData.setDefinitionFalse(entry.getValue());
        break;
      case ResultEnumeration.INT_ERROR:
        defaultDirectivesData.setDefinitionError(entry.getValue());
        break;
      case ResultEnumeration.INT_NOT_APPLICABLE:
        defaultDirectivesData.setDefinitionNotApplicable(entry.getValue());
        break;
      case ResultEnumeration.INT_NOT_EVALUATED:
        defaultDirectivesData.setDefinitionNotEvaluated(entry.getValue());
        break;
      case ResultEnumeration.INT_UNKNOWN:
        defaultDirectivesData.setDefinitionUnknown(entry.getValue());
        break;
      }
    }
    return retval;
  }
View Full Code Here


    } else {
      this.status = AssessmentResult.Status.SUCCESSFUL;
      this.statusMessage = null;

      SystemType system = systems.iterator().next();
      DefinitionsType definitions = system.getDefinitions();
      definitionResultMap = new HashMap<String, OVALDefinitionResult>(
          definitions.sizeOfDefinitionArray());

      OVALResolver ovalResolver = assessmentFile.getOvalResolver();

      for (DefinitionType definition : definitions.getDefinitionList()) {
        String id = definition.getDefinitionId();
        ClassEnumeration.Enum definitionClass = ovalResolver.getDefinition(id).getClass1();

        OVALDefinitionResult defResult = new OVALDefinitionResult(definition, definitionClass, this);
        definitionResultMap.put(defResult.getId(), defResult);
View Full Code Here

    }
    return retval;
  }

  public void addDefaultInclude(ResultEnumeration.Enum result, ContentEnumeration.Enum content) {
    DirectiveType directive = DirectiveType.Factory.newInstance();
    directive.setReported(true);
    directive.setContent(content);
    defaultDirectives.put(result, directive);
  }
View Full Code Here

    directive.setContent(content);
    defaultDirectives.put(result, directive);
  }

  public void addDefaultExclude(ResultEnumeration.Enum result) {
    DirectiveType directive = DirectiveType.Factory.newInstance();
    directive.setReported(false);
    defaultDirectives.put(result, directive);
  }
View Full Code Here

  public OVALResult(OVALAssessmentFile assessmentFile, ResultContext resultContext) throws XmlException, IOException {
    this.assessmentFile = assessmentFile;
    this.resultContext = resultContext;

    OvalResultsDocument document = resultContext.getResultContent().getXmlObject();
    OvalResultsDocument.OvalResults results = document.getOvalResults();
    ResultsType resultsType = results.getResults();
    List<SystemType> systems = resultsType.getSystemList();
    if (systems.size() != 1) {
      // TODO: P4: automatically resolve error?
      this.status = AssessmentResult.Status.ERROR;
View Full Code Here

    this.assessmentFile = assessmentFile;
    this.resultContext = resultContext;

    OvalResultsDocument document = resultContext.getResultContent().getXmlObject();
    OvalResultsDocument.OvalResults results = document.getOvalResults();
    ResultsType resultsType = results.getResults();
    List<SystemType> systems = resultsType.getSystemList();
    if (systems.size() != 1) {
      // TODO: P4: automatically resolve error?
      this.status = AssessmentResult.Status.ERROR;
      this.statusMessage = "OVAL result set contained results from multiple systems";
      definitionResultMap = Collections.emptyMap();
View Full Code Here

      definitionResultMap = Collections.emptyMap();
    } else {
      this.status = AssessmentResult.Status.SUCCESSFUL;
      this.statusMessage = null;

      SystemType system = systems.iterator().next();
      DefinitionsType definitions = system.getDefinitions();
      definitionResultMap = new HashMap<String, OVALDefinitionResult>(
          definitions.sizeOfDefinitionArray());

      OVALResolver ovalResolver = assessmentFile.getOvalResolver();
View Full Code Here

TOP

Related Classes of org.mitre.oval.xmlSchema.ovalResults5.OvalResultsDocument

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.