public static void setPropertySetPropertyValueOfName( String propertyName, IfcPropertySet propertySet, IfcValue value) { if (PropertyUtility.shouldSetProperty(propertyName, value)) { for (IfcProperty property : propertySet.getHasProperties()) { if (property.getName().equalsIgnoreCase(propertyName)) { if (property instanceof IfcSimpleProperty) { if (property instanceof IfcPropertySingleValue) { IfcPropertySingleValue singValue = (IfcPropertySingleValue) property; singValue.setNominalValue(value); } if (property instanceof IfcPropertyEnumeratedValue) { setEnumProperty(value, property); } if (property instanceof IfcPhysicalSimpleQuantity) { IfcPhysicalSimpleQuantity physProp = (IfcPhysicalSimpleQuantity) property; if (value instanceof IfcReal) { IfcReal ifcReal = (IfcReal) value; PropertyUtility.setIfcPhysicalSimpleQuantityValue(physProp, ifcReal); } } } } } } }
public static void setPropertySetPropertyValueOfNameAndUnit( String propertyName, IfcPropertySet propertySet, IfcValue value, IfcUnit units) { if (PropertyUtility.shouldSetProperty(propertyName, value)) { for (IfcProperty property : propertySet.getHasProperties()) { if (property.getName().equalsIgnoreCase(propertyName)) { if (property instanceof IfcSimpleProperty) { if (property instanceof IfcPropertySingleValue) { setSingleValueProperty(value, units, property); } if (property instanceof IfcPropertyEnumeratedValue) { setEnumProperty(value, property); } if (property instanceof IfcPhysicalSimpleQuantity) { setPhysicalProperty(value, units, property); } } } } } }