Examples of ProfileSetValueType


Examples of gov.nist.checklists.xccdf.x11.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

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

  }

  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

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);
            } 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

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

        for (String item : values) {
          setValue.addItem(item);
        }
      }
    } else {
      ProfileSetValueType setValue = data.addNewSetValue();
      setValue.setIdref(value.getId());

      if (values.size() > 1) {
        throw new UnsupportedOperationException("Value '"+value.getId()+"' has '"+values.size()+"' values.");
      } else if (values.size() == 1) {
        setValue.setStringValue(values.iterator().next());
      } else { // empty
        setValue.setNil();
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.