/** * Copy constructor. */ public PropertyImpl(Property<T> property) { if (property == null) { throw new IllegalArgumentException("Source must be set!"); } propertyDefinition = property.getDefinition(); initialize(property.getDefinition()); setValues(new ArrayList<T>(property.getValues())); }
/** * Copy constructor. */ public PropertyImpl(Property<T> property) { if (property == null) { throw new IllegalArgumentException("Source must be set!"); } propertyDefinition = property.getDefinition(); initialize(property.getDefinition()); setValues(new ArrayList<T>(property.getValues())); }
value = ((Property<?>) value).getValues();
throw new IllegalArgumentException("Property id mismatch: '" + id + "' != '" + p.getId() + "'!"); value = (p.getDefinition().getCardinality() == Cardinality.SINGLE ? p.getFirstValue() : p.getValues());
throw new IllegalArgumentException("Property id mismatch: '" + id + "' != '" + p.getId() + "'!"); value = (p.getDefinition().getCardinality() == Cardinality.SINGLE ? p.getFirstValue() : p.getValues());
List<Object> values = (List<Object>)property.getValues();
|| (propertyCheck == PropertyCheckEnum.STRING_MUST_NOT_BE_EMPTY)) { f = createResult(FAILURE, "Property has no value!"); addResult(results, assertListNotEmpty(property.getValues(), null, f)); } else if (propertyCheck == PropertyCheckEnum.STRING_SHOULD_NOT_BE_EMPTY) { f = createResult(WARNING, "Property has no value!"); addResult(results, assertListNotEmpty(property.getValues(), null, f)); } else if (propertyCheck == PropertyCheckEnum.MUST_NOT_BE_SET) { f = createResult(FAILURE, "Property has a value!"); addResult(results, assertIsTrue(property.getValues().isEmpty(), null, f)); || (property.getDefinition().getPropertyType() == PropertyType.URI) || (property.getDefinition().getPropertyType() == PropertyType.HTML)); for (Object value : property.getValues()) { if (value == null) { addResult(results, createResult(FAILURE, "Property values contain a null value!")); addResult(results, assertIsTrue(property.getValues().size() <= 1, null, f)); if (property.getDefinition().isRequired().booleanValue()) { f = createResult(FAILURE, "Property is required but has no value!"); addResult(results, assertListNotEmpty(property.getValues(), null, f));