code: protected void internalAddToPropMap(
          Map<String, CmsProperty> propertyMap,
          I_CmsHistoryResource resource,
          String propertyKey,
          String propertyValue,
          int mappingType) throws CmsDbConsistencyException {
  
          CmsProperty property = propertyMap.get(propertyKey);
          if (property != null) {
              // there exists already a property for this key in the result
              switch (mappingType) {
                  case CmsProperty.STRUCTURE_RECORD_MAPPING:
                      // this property value is mapped to a structure record
                      property.setStructureValue(propertyValue);
                      break;
                  case CmsProperty.RESOURCE_RECORD_MAPPING:
                      // this property value is mapped to a resource record
                      property.setResourceValue(propertyValue);
                      break;
                  default:
                      throw new CmsDbConsistencyException(
                          Messages.get().container(
                              Messages.ERR_UNKNOWN_PROPERTY_VALUE_MAPPING_3,
                              resource.getRootPath(),
                              new Integer(mappingType),
                              propertyKey));
              }
          } else {
              // there doesn't exist a property for this key yet
              property = new CmsProperty();
              property.setName(propertyKey);
  
              switch (mappingType) {
                  case CmsProperty.STRUCTURE_RECORD_MAPPING:
                      // this property value is mapped to a structure record
                      property.setStructureValue(propertyValue);
                      property.setResourceValue(null);
                      break;
                  case CmsProperty.RESOURCE_RECORD_MAPPING:
                      // this property value is mapped to a resource record
                      property.setStructureValue(null);
                      property.setResourceValue(propertyValue);
                      break;
                  default:
                      throw new CmsDbConsistencyException(
                          Messages.get().container(
                              Messages.ERR_UNKNOWN_PROPERTY_VALUE_MAPPING_3,
                              resource.getRootPath(),
                              new Integer(mappingType),
                              propertyKey));
              }
              propertyMap.put(propertyKey, property);
          }
      }
docs: Updates the property map for the given resource with the given property data.<p>
  
  @param propertyMap the map to update
  @param resource the resource the properties belong to
  @param propertyKey the property key
  @param propertyValue the property value
  @param mappingType the mapping type
  
  @throws CmsDbConsistencyException if the mapping type is wrong