* @return a not {@code null} Pair<Type, Property>. The {@code Type} will be null
* iff {@code value} is null. {@code Property} will not be null.
*/
private static Pair<Type<?>, Property> createProperty(String name, Object value,
boolean multiple) {
Property property = new Property();
property.setName(name);
property.setMultiple(multiple);
if (value == null) {
return Pair.of(null, property);
}
Pair<Type<?>, PropertyValue> newValue = createPropertyValue(value);
Type<?> type = newValue.first;
Meaning meaning = type.getMeaning();
if (meaning != Meaning.NO_MEANING) {
property.setMeaning(meaning);
}
property.setValue(newValue.second);
return new Pair<Type<?>, Property>(type, property);
}