Package scap.check.content

Examples of scap.check.content.SourceContent


        }

        if (xccdfOptions.isProcessCpeApplicability()) {
          List<SourceContext> dictionaries = xccdfOptions.getCpeDictionaries();
          for (SourceContext sourceContext : dictionaries) {
            SourceContent dictionaryFile = sourceContext.getSourceContent();
            File f = dictionaryFile.getLocalFile();
            if (!f.exists()) {
              System.err.println("The CPE dictionary file does not exist: "+dictionaryFile.getId());
              System.exit(5);
            }

            if (!f.isFile()) {
              System.err.println("The path specified for the CPE dictionary file is not a file: "+f.getAbsolutePath());
View Full Code Here


  public TailoringDocumentImpl(SourceContext tailoringSourceContext, SourceContext documentSourceContext) throws XmlException, IOException {
    super(documentSourceContext);
    this.sourceContext = tailoringSourceContext;

    SourceContent sourceContent = sourceContext.getSourceContent();
    XmlBeansInstance xmlBeansInstance = sourceContent.getXmlBeansInstance();
    if (xmlBeansInstance.isDocumentType()) {
      this.data = ((TailoringDocument)xmlBeansInstance.getXmlObject().copy()).getTailoring();
    } else {
      this.data = (TailoringType)xmlBeansInstance.getXmlObject().copy();
    }
View Full Code Here

    Map<ItemType, GroupType> parentMap = new HashMap<ItemType, GroupType>();

  public XCCDFDocumentImpl(SourceContext sourceContext) throws XmlException, IOException {
    super(sourceContext);
    SourceContent sourceContent = sourceContext.getSourceContent();
    XmlBeansInstance xmlBeansInstance = sourceContent.getXmlBeansInstance();
    if (xmlBeansInstance.isDocumentType()) {
      this.data = ((BenchmarkDocument)xmlBeansInstance.getXmlObject().copy()).getBenchmark();
    } else {
      this.data = (Benchmark)xmlBeansInstance.getXmlObject().copy();
    }

    log.info("Parsing checklist: "+sourceContent.getId());
    // Parse CPE Applicability Statements
    if (data.isSetPlatformSpecification()) {
      XmlBeansPlatformSpecification spec = new XmlBeansPlatformSpecification(sourceContext, data.getPlatformSpecification());
      setPlatformSpecification(spec);
    }
View Full Code Here

    Map<ItemType, GroupType> parentMap = new HashMap<ItemType, GroupType>();

  public XCCDFDocumentImpl(SourceContext sourceContext) throws XmlException, IOException {
    super(sourceContext);

    SourceContent sourceContent = sourceContext.getSourceContent();
    XmlBeansInstance xmlBeansInstance = sourceContent.getXmlBeansInstance();
    if (xmlBeansInstance.isDocumentType()) {
      this.data = ((BenchmarkDocument)xmlBeansInstance.getXmlObject().copy()).getBenchmark();
    } else {
      this.data = (Benchmark)xmlBeansInstance.getXmlObject().copy();
    }

    log.info("parsing checklist "+sourceContent.getId());
    // Parse CPE Applicability Statements
    if (data.isSetPlatformSpecification2()) {
      XmlBeansPlatformSpecification spec = new XmlBeansPlatformSpecification(sourceContext, data.getPlatformSpecification2());
      setPlatformSpecification(spec);
    }
View Full Code Here

TOP

Related Classes of scap.check.content.SourceContent

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.