Package gov.nist.checklists.xccdf.x12

Examples of gov.nist.checklists.xccdf.x12.FactType


  public void appendFacts(List<Fact> facts) {
    if (!facts.isEmpty()) {
      TargetFactsType factsType = data.addNewTargetFacts();
      for (Fact fact : facts) {
        FactType factType = factsType.addNewFact();
        factType.setName(fact.getName());
        factType.setType(mapValueType(fact.getType()));
        factType.setStringValue(fact.getValue());
      }
    }
  }
View Full Code Here


    retval.append(DateFormatUtils.format(new Date(), "dd-MM-yyyy'T'HH.mm.ss.SZ"));
    return retval.toString();
  }

  public ResultBuilderImpl(BenchmarkDocument.Benchmark benchmark) {
    BenchmarkDocument doc = BenchmarkDocument.Factory.newInstance();
    doc.setBenchmark(benchmark);

    instance = doc;
    data = doc.getBenchmark().addNewTestResult();
  }
View Full Code Here

    TestResultDocument doc = TestResultDocument.Factory.newInstance();
    instance = doc;
    data = doc.addNewTestResult();
    data.setId(generateTestResultId(benchmarkId));
    data.setVersion(benchmarkVersion);
    BenchmarkReferenceType node = data.addNewBenchmark();
    node.setId(benchmarkId);
    node.setHref(uri.toASCIIString());
  }
View Full Code Here

  public void handleCheckResult(CheckType data, CheckResultInstance instance) throws IOException {
    data.setSystem(instance.getCheck().getSystem());

    AssessmentResultItem item = instance.getAssessmentResultItem();
   
    CheckContentRefType checkContentRef = data.addNewCheckContentRef();
    checkContentRef.setName(item.getId());

    ResultContext resultContext = item.getAssessmentResult().getResultContext();
    checkContentRef.setHref(resultContext.resolveRelative(getXccdfResultContext()));
  }
View Full Code Here

  @Override
  protected CheckType newCheckNode() {
    ComplexCheckType currentContext = stack.peek();

    CheckType retval;
    if (currentContext == null) {
      retval = getOutputBuilder().newCheckResult(getRuleResult());
    } else {
      retval = getOutputBuilder().newCheckResultChild(currentContext);
    }
View Full Code Here

        }

        do {
            XmlObject xmlObject = cursor.getObject();
            if (xmlObject instanceof CheckType) {
              CheckType checkType = (CheckType)xmlObject;

            if (checkType.isSetCheckContent()) {
              throw new ComplexCheckException(CheckedItem.Result.NOTCHECKED,
                  "In-line check content not supported");
            }

            XCCDFCheck check = RuleImpl.newCheck(document, checkType);
View Full Code Here

      XmlbeansResultHandlerImpl outputBuilder) {
    super(ruleResult, outputBuilder);
  }

  protected ComplexCheckType newComplexCheckNode() {
    ComplexCheckType retval = stack.peek();
    if (retval == null) {
      retval = getOutputBuilder().newComplexCheckResult(getRuleResult());
    } else {
      retval = getOutputBuilder().newComplexCheckResultChild(retval);
    }
View Full Code Here

    return retval;
  }

  @Override
  protected CheckType newCheckNode() {
    ComplexCheckType currentContext = stack.peek();

    CheckType retval;
    if (currentContext == null) {
      retval = getOutputBuilder().newCheckResult(getRuleResult());
    } else {
View Full Code Here

    }
    return retval;
  }

  public void visit(ComplexCheckResult complexCheckResult) {
    ComplexCheckType data = newComplexCheckNode();
    stack.push(data);
    handleComplexCheckResult(data, complexCheckResult);
    stack.pop();
  }
View Full Code Here

  public void appendFacts(List<Fact> facts) {
    if (!facts.isEmpty()) {
      TargetFactsType factsType = data.addNewTargetFacts();
      for (Fact fact : facts) {
        FactType factType = factsType.addNewFact();
        factType.setName(fact.getName());
        factType.setType(mapValueType(fact.getType()));
        factType.setStringValue(fact.getValue());
      }
    }
  }
View Full Code Here

TOP

Related Classes of gov.nist.checklists.xccdf.x12.FactType

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.