Package gov.nist.checklists.xccdf.x12

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


              selector.setSeverity(RuleImpl.mapSeverity(nodeData.getSeverity()));
              selector.setRole(RuleImpl.mapRole(nodeData.getRole()));

              result.add(selector);
            } else if (ProfileSetValueType.type.isAssignableFrom(xmlObject.schemaType())) {
              ProfileSetValueType nodeData = (ProfileSetValueType)xmlObject;

              SetValueProfileSelector selector = new SetValueProfileSelectorImpl(this, nodeData.getIdref(), nodeData.getStringValue());
              result.add(selector);
            }
        } while (cursor.toNextSibling());
        return result;
  }
View Full Code Here


  }

  public void appendSetValue(Value value, LiteralValue literal) {
    Collection<String> values = literal.getValues();

    ProfileSetValueType setValue = data.addNewSetValue();
    setValue.setIdref(value.getId());

    if (values.size() > 1) {
      // complex values are not supported
      throw new UnsupportedOperationException("Value '"+value.getId()+"' has '"+values.size()+"' values.");
    } else if (values.size() == 1) {
      setValue.setStringValue(values.iterator().next());
    } else {
      setValue.setNil();
    }
  }
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

TOP

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

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.