Package gov.nist.checklists.xccdf.x12

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


                XmlObject xmlObject = cursor.getObject();
                if (SelectableItemType.type.isAssignableFrom(xmlObject.schemaType())) {
                    SelectableItemType item = (SelectableItemType) xmlObject;

                    if (item instanceof GroupType) {
                        GroupType node = (GroupType) item;
                  GroupImpl group = new GroupImpl(node, this);
                  addGroupInternal(group);
                    } else if (item instanceof RuleType) {
                      RuleType node = (RuleType) item;
                  RuleImpl rule = new RuleImpl(node, this);
View Full Code Here


                XmlObject xmlObject = cursor.getObject();
                if (SelectableItemType.type.isAssignableFrom(xmlObject.schemaType())) {
                    SelectableItemType item = (SelectableItemType) xmlObject;

                    if (item instanceof GroupType) {
                        GroupType node = (GroupType) item;
                  GroupImpl group = new GroupImpl(node, this);
                  addGroupInternal(group);
                    } else if (item instanceof RuleType) {
                      RuleType node = (RuleType) item;
                  RuleImpl rule = new RuleImpl(node, this);
View Full Code Here

    }

    retval.setWeight(rule.getWeight());

    for (Ident ident : rule.getIdents()) {
      IdentType node = retval.addNewIdent();
      node.setSystem(ident.getSystem().toString());
      node.setStringValue(ident.getValue());
    }

        // TODO: P5: support fix
    return retval;
  }
View Full Code Here

  public void setTestSystem(String string) {
    data.setTestSystem(string);
  }

  public void appendIdentity(String name, Boolean privileged, Boolean authenticated) {
    IdentityType identity = data.addNewIdentity();
    identity.setStringValue(name);
    if (privileged != null) {
      identity.setPrivileged(privileged);
    }
    if (authenticated != null) {
      identity.setAuthenticated(authenticated);
    }
  }
View Full Code Here

    tailoringFile.setVersion(node.getVersion().getStringValue());
    tailoringFile.setTime(node.getVersion().getTime());
  }

  public void setProfileId(String profileId) {
    IdrefType ref = IdrefType.Factory.newInstance();
    ref.setIdref(profileId);
    data.setProfile(ref);
   
  }
View Full Code Here

  @Override
  protected void applyRuleResultRecord(RuleResultType data, RuleResultRecord record) {
    data.setResult(mapRuleResult(record.getResult()));

        for (Message message : record.getMessages()) {
            MessageType node = data.addNewMessage();

            String context = message.getContext();
            if (context == null) {
              node.setStringValue(message.getText());
            } else {
              node.setStringValue(new StringBuilder()
                .append(context)
                .append(": ")
                .append(message.getText()).toString());
            }
            node.setSeverity(mapMessageSeverity(message.getSeverity()));
        }
  }
View Full Code Here

              selector.setSelector(nodeData.getSelector());
              selector.setOperator(ValueImpl.mapOperator(nodeData.getOperator()));

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

              RefineRuleProfileSelector selector = new RefineRuleProfileSelectorImpl(this, nodeData.getIdref());
              selector.setWeight(nodeData.getWeight());
              selector.setSelector(nodeData.getSelector());
              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);
            } else if (ProfileSetComplexValueType.type.isAssignableFrom(xmlObject.schemaType())) {
              ProfileSetComplexValueType nodeData = (ProfileSetComplexValueType)xmlObject;

              SetComplexValueProfileSelector selector = new SetComplexValueProfileSelectorImpl(this, nodeData.getIdref(), nodeData.getItemList());
              result.add(selector);
            }
        } while (cursor.toNextSibling());
        return result;
  }
View Full Code Here

              ProfileSelectType nodeData = (ProfileSelectType)xmlObject;

              SelectProfileSelector selector = new SelectProfileSelectorImpl(this, nodeData.getIdref(), nodeData.getSelected());
              result.add(selector);
            } else if (ProfileRefineValueType.type.isAssignableFrom(xmlObject.schemaType())) {
              ProfileRefineValueType nodeData = (ProfileRefineValueType)xmlObject;

              RefineValueProfileSelector selector = new RefineValueProfileSelectorImpl(this, nodeData.getIdref());
              selector.setSelector(nodeData.getSelector());
              selector.setOperator(ValueImpl.mapOperator(nodeData.getOperator()));

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

              RefineRuleProfileSelector selector = new RefineRuleProfileSelectorImpl(this, nodeData.getIdref());
              selector.setWeight(nodeData.getWeight());
              selector.setSelector(nodeData.getSelector());
              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);
            } else if (ProfileSetComplexValueType.type.isAssignableFrom(xmlObject.schemaType())) {
              ProfileSetComplexValueType nodeData = (ProfileSetComplexValueType)xmlObject;

              SetComplexValueProfileSelector selector = new SetComplexValueProfileSelectorImpl(this, nodeData.getIdref(), nodeData.getItemList());
              result.add(selector);
            }
        } while (cursor.toNextSibling());
        return result;
  }
View Full Code Here

        }

        do {
            XmlObject xmlObject = cursor.getObject();
            if (ProfileSelectType.type.isAssignableFrom(xmlObject.schemaType())) {
              ProfileSelectType nodeData = (ProfileSelectType)xmlObject;

              SelectProfileSelector selector = new SelectProfileSelectorImpl(this, nodeData.getIdref(), nodeData.getSelected());
              result.add(selector);
            } else if (ProfileRefineValueType.type.isAssignableFrom(xmlObject.schemaType())) {
              ProfileRefineValueType nodeData = (ProfileRefineValueType)xmlObject;

              RefineValueProfileSelector selector = new RefineValueProfileSelectorImpl(this, nodeData.getIdref());
              selector.setSelector(nodeData.getSelector());
              selector.setOperator(ValueImpl.mapOperator(nodeData.getOperator()));

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

              RefineRuleProfileSelector selector = new RefineRuleProfileSelectorImpl(this, nodeData.getIdref());
              selector.setWeight(nodeData.getWeight());
              selector.setSelector(nodeData.getSelector());
              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);
            } else if (ProfileSetComplexValueType.type.isAssignableFrom(xmlObject.schemaType())) {
              ProfileSetComplexValueType nodeData = (ProfileSetComplexValueType)xmlObject;

              SetComplexValueProfileSelector selector = new SetComplexValueProfileSelectorImpl(this, nodeData.getIdref(), nodeData.getItemList());
              result.add(selector);
            }
        } while (cursor.toNextSibling());
        return result;
  }
View Full Code Here

              ProfileSetValueType nodeData = (ProfileSetValueType)xmlObject;

              SetValueProfileSelector selector = new SetValueProfileSelectorImpl(this, nodeData.getIdref(), nodeData.getStringValue());
              result.add(selector);
            } else if (ProfileSetComplexValueType.type.isAssignableFrom(xmlObject.schemaType())) {
              ProfileSetComplexValueType nodeData = (ProfileSetComplexValueType)xmlObject;

              SetComplexValueProfileSelector selector = new SetComplexValueProfileSelectorImpl(this, nodeData.getIdref(), nodeData.getItemList());
              result.add(selector);
            }
        } while (cursor.toNextSibling());
        return result;
  }
View Full Code Here

TOP

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

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.