Examples of ProfileSetComplexValueType


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

              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.ProfileSetComplexValueType

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

    if (literal.isComplex()) {
      // use complex value
      ProfileSetComplexValueType setValue = data.addNewSetComplexValue();
      setValue.setIdref(value.getId());

      if (values.isEmpty()) {
        setValue.setNil();
      } else {
        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.