code: public static final int jcrPropertyTypeFor( org.modeshape.jcr.value.Property property ) {
          for (Object value : property) {
              if (value != null) {
                  return jcrPropertyTypeFor(org.modeshape.jcr.value.PropertyType.discoverType(value));
              }
          }
          return PropertyType.STRING;
      }
docs: Compute the JCR {@link PropertyType} for the given ModeShape {@link org.modeshape.jcr.value.PropertyType}.
  <p>
  See MODE-328 for complete discussion on why this method works the way it does. The best option appears to be basing the
  PropertyType on the first value, since that should be compatible with the PropertyType that was used when the values were
  set on the property in the first place.
  </p>
  
  @param property the ModeShape property for which the {@link PropertyType} is to be determined; never null
  @return the JCR property type; always a valid value and never {@link PropertyType#UNDEFINED}.